wiki:metadataworkflow

Version 30 (modified by simonp, 13 years ago) ( diff )

--

Metadata status: capturing the lifecycle of a metadata record

Date 2011/12/12
Contact(s) Simon Pigot
Last edited 2011-12-12T19:10:00
Status complete
Assigned to release 2.7
Resources Resources available
Ticket # #738

Overview

Metadata records have a lifecycle that typically goes through one or more states. eg when a record is created and edited by an 'Editor' user it is in the 'Draft' state. Whilst it is reviewed by a 'Content Reviewer' user it would typically be in a 'Submitted' state. If the record is found to be complete and correct by the 'Content Reviewer' it would be in the 'Approved' state and may be made available for casual search and harvest by assigning privileges to the GeoNetwork 'All' group. Eventually, the record may be superseded or replaced and the state would be 'Retired'. At present GeoNetwork doesn't have a formal process by which the state of the record can be captured. This makes it more difficult to manage and administer metadata records. This proposal adds:

  • state (or status) to records in GeoNetwork: 'Unknown', 'Draft', 'Submitted', 'Approved', 'Rejected', 'Retired'. The status is held in a database table called MetadataStatus. Extra states can be added to this table if required. A user interface has been added to allow the user to set these status values.
  • two status change action hooks (in Java) that can be used by sites to provide specific behaviours: The first action (statusChange) is called when status is changed by a user eg. when 'Draft' records are set to 'Submitted' and could be used for example to send notifications to other users affected by this change. The second action (onEdit) is called when a record is edited and saved and could be used for example to reset records with an 'Approved' status to 'Draft' status. A default set of actions is provided. These can be customised or replaced by sites that wish to provide different or more extensive behaviour.
  • an extra 'Restrict to' search option in the 'Advanced Search' tab that allows the user to search on 'Status'

Proposal Type

  • Type: GUI Change, Core Change
  • App: GeoNetwork
  • Module: eg. Kernel, Data Manager, Metadata Import, Lucene Index, Search Interface

Voting History

  • Vote proposed: result +1 Francois, +1 Emanuele, +1 Patrizia, +1 Jeroen

Motivations

GeoNetwork already has some components that could be used to help define a metadata workflow. These are the user profiles that give different levels of privilege over a metadata record eg. only a content reviewer (or administrator) profile user can assign privileges to a metadata record that would allow an unregistered user to see the record in search or, to put it another way, only a content reviewer can assign privileges to the special GeoNetwork groups 'All' or 'Internet'

This proposal adds to these components with:

  1. A status value for any metadata record describing its current state in a lifecycle that ranges from 'Draft' or 'Unknown' through 'Submitted', 'Approved', 'Rejected' and 'Retired'. All status changes are kept in the MetadataStatus table with the most recent status change being the current status. These states are localized and extra states can be added by adding additional status values to the 'StatusValues' and 'StatusValuesDes' tables.
  1. Users with different profiles can set the status on one record through the 'Other Actions' menu

or any number of selected records through the 'Actions on selected records' menu.

The status set interface looks like the following:

  1. A default pair of metadata status change actions defined in Java - see the class org.fao.geonet.services.metadata.DefaultStatusActions.java. The first change action is called when a status change is required. The default action taken depends on the status change taking place:
  • when an 'Editor' changes the state on a metadata record(s) from 'Draft' or 'Unknown' to 'Submitted', the Content Reviewers from the groupOwner of the record are informed of the status change via email which looks like the following. They can log in and click on the link supplied in the email to access the submitted records.
Date: Tue, 13 Dec 2011 12:58:58 +1100 (EST)
From: Metadata Workflow <feedback@localgeonetwork.org.au>
Subject: Metadata records SUBMITTED by userone@localgeonetwork.org.au (User One) on
 2011-12-13T12:58:58
To: "reviewer@localgeonetwork.org.au" <Reviewer@localgeonetwork.org.au>
Reply-to: User One <userone@localgeonetwork.org.au.au>
Message-id: <1968852534.01323741538713.JavaMail.geonetwork@localgeonetwork.org.au>

These records are complete. Please review.

Records are available from the following URL:
http://localgeonetwork.org.au/geonetwork/srv/en/main.search?_status=4&_statusChangeDate=2011-12-13T12:58:58

  • when a 'Content Reviewer' changes the state on a metadata record(s) from 'Submitted' to 'Accepted' or 'Rejected', the owner of the metadata record is informed of the status change via email. The email received by the metadata record owner looks like the following. Again, the user can log in and use the link supplied in the email to access the approved/rejected records.
Date: Wed, 14 Dec 2011 12:28:01 +1100 (EST)
From: Metadata Workflow <feedback@localgeonetwork.org.au>
Subject: Metadata records APPROVED by reviewer@localgeonetwork.org.au (Reviewer)
 on 2011-12-14T12:28:00
To: "User One" <userone@localgeonetwork.org.au>
Message-ID: <1064170697.31323826081004.JavaMail.geonetwork@localgeonetwork.org.au>
Reply-To: Reviewer <reviewer@localgeonetwork.org.au>

Records approved - please resubmit for approval when online resources attached

Records are available from the following URL:
http://localgeonetwork.org.au/geonetwork/srv/en/main.search?_status=2&_statusChangeDate=2011-12-14T12:28:00

The second status change action is called when a record is edited and saved by a user. If the user did not indicate that the edit changes were a 'Minor edit' and the current status of the record is 'Approved', then the default action is to set the status to 'Draft' and remove the privileges for the GeoNetwork group 'All'.

These actions can be replaced with different behaviours by:

  • writing Java code in the form of a new class that implements the interface defined in org.fao.geonet.services.metadata.StatusActions.java and placing a compiled version of the class in the GeoNetwork class path
  • defining the name of the new class in the statusActionsClass configuration parameter in WEB-INF/config.xml
  1. Metadata status along with the status change date is indexed in Lucene. The 'Advanced Search' interface has an additional 'Restrict to' option that allows search on status values. CSW search can also search on Metadata status by defining queries using the _status property name.

Backwards Compatibility Issues

Existing Metadata records receive status 'Unknown' by default.

In all versions prior to 2.7, editing a metadata record did not remove the privileges for the GeoNetwork group 'All'. From 2.7 onwards, these privileges will be removed if the edit was not a 'Minor edit'.

New libraries added

None.

Risks

Everything is risky..

Participants

  • Simon Pigot, CSIRO Marine and Atmospheric Research
  • LISASoft (James Sewell) for review

Attachments (4)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.