Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Configurable Workflow

Table of Contents
minLevel2
outlinetrue
stylenone

...

The primary focus of the workflow framework is to create a more flexible solution for the administrator to configure, and even to allow an application developer to implement custom steps, which may be configured in the workflow for the collection through a simple configuration file. The concept behind this approach was modeled on the configurable submission system already present in DSpace.

For more information, see the Configurable Workflow Introductory Video

Instructions for Enabling Configurable Reviewer Workflow in XMLUI

Warning

Please note that enabling the Configurable Reviewer Workflow makes changes to the structure of your database that are currently irreversible in any graceful manner, so please backup your database in advance to allow you to restore to that point should you wish to do so. It should also be noted that only the XMLUI has been changed to cope with the database changes. The JSPUI will no longer work if the Configurable Reviewer Workflow is enabled.

...

 dspace/config/xmlui.xconf

The submission aspect has been split up into muliple aspects: one submission aspect for the submission process, one workflow aspect containing the code for the original workflow and one xmlworkflow aspect containing the code for the new XML configurable workflow framework. In order to enable one of the two aspects, either the workflow or xmlworkflow aspect should be enabled in the {{\[dspace-install-dir\]/config/xmlui.xconf}} configuration file. This means that the xmlui.xconf configuration for the original workflow is the following:

Code Block
<aspect name="Submission and Workflow" path="resource://aspects/Submission/" />
<aspect name="Original Workflow" path="resource://aspects/Workflow/" />

...

Code Block
<aspect name="Submission and Workflow" path="resource://aspects/Submission/" />
<aspect name="XMLWorkflow" path="resource://aspects/XMLWorkflow/" />

...

dspace/config/modules/workflow.cfg

Besides that, a workflow configuration file has been created that specifies the workflow that will be used in the back-end of the DSpace code. It is important that the option selected in this configuration file matches the aspect that was enabled. The workflow configuration file is available in {{\[dspace-install-dir\]/config/modules/workflow.cfg}}. This configuration file has been added because it is important that a CLI import process uses the correct workflow and this should not depend on the UI configuration. The workflow.cfg configration file contains the following property:

Code Block
# Original Workflow
#workflow.framework: originalworkflow
#XML configurable workflow
workflow.framework: xmlworkflow

...

SQL based migration can be used when the out of the box original workflow framework is used by your DSpace installation. This means that your DSpace installation uses the workflow steps and roles that are available out of the box. The migration script will migrate the policies, roles, tasks and workflowitems from the original workflow to the new workflow framework. The following SQL scripts are available depending on the database that is used by the DSpace installation:

...

  • {{\[dspace-install-dir\]}}/etc/oracle/xmlworkflow/workflow_migration.sqlunmigrated-wiki-markup{{\
  • [dspace-install-dir\]}}/]/etc/postgres/xmlworkflow/workflow_migration.sql

Java based migration

In case your DSpace installation uses a customized version of the workflow, the migration script might not work properly and a different approach is recommended. Therefore, an additional Java based script has been created that restarts the workflow for all the workflowitems that exist in the original workflow framework. The script will take all the existing workflowitems and place them in the first step of the XML configurable workflow framework thereby taking into account the XML configuration that exists at that time for the collection to which the item has been submitted. This script can also be used to restart the workflow for workflowitems in the original workflow but not to restart the workflow for items in the XML configurable workflow.

...

Configuration

DSpace.cfg configuration

Currently, there are no workflow configuration options added to the DSpace.cfg configuration file.

Main workflow configuration

The workflow configuration file is available in [dspace]/config/modules/workflow.cfg. This configuration file has been added because it is important that a CLI import process uses the correct workflow and this should not depend on the UI configuration. The workflow.cfg configration file contains the following property:

Code Block

# Original Workflow
#workflow.framework: originalworkflow
#XML configurable workflow
workflow.framework: xmlworkflow


Main workflow configuration

The workflow main configuration can be found in the workflow.xml file, located in [dspace]/config/workflow.xmlThe workflow main configuration can be found in the workflow.xml file, located in {dspace.dir}/config. An example of this workflow configuration file can be found bellow.

...

The workflow actions configuration is located in the {[dspace.dir}]/config/spring/api/ directory and is named "workflow-actions.xml". This configuration file describes the different Action Java classes that are used by the workflow framework. Because the workflow framework uses Spring framework for loading these action classes, this configuration file contains Spring configuration.

...

The configuration file for the workflow user interface actions is located in the {[dspace.dir}]/config/spring/xmlui/ and is named "workflow-actions-xmlui.xml". BEach bean defined here has an id which is the action identifier and the class is a classpath which links to the xmlui class responsible for generating the User Interface side of the workflow action. Each of the class defined here must extend the //org.dspace.app.xmlui.aspect.submission.workflow.AbstractXMLUIAction// class, this class contains some basic settings for an action and has a method called //addWorkflowItemInformation()// which which will render the given item with a show full link so you don't have to write the same code in each of your actions if you want to display the item. The id attribute used for the beans in the configuration must correspond to the id used in the workflow configuration. In case an action requires a User Interface class, the workflow framework will look for a UI class in this configuration file.

...

  • READ
  • WRITE
  • ADD
  • DELETE

Database

Database changes - Original text

The changes made to the database can always be found in the {dspace.src.dir}/etc directory in the file //collection- workflow -changes.sql//.
The workflow uses a separate metadata schema named //workflow// the fields this schema contains can be found in the {dspace.dir} [dspace]/config/registries directory and in the file //workflow-types.xml//.

The tables //collectionrole//, //workflowitemrole// where created and are used by the workflow system for the roles (the roles have been described above).
The //tasklistitem// table was altered to contain the step and the action identifiers so that the workflow system knows where in the workflow the item is.
The table //taskowner// was created so that multiple user can claim one item (this was not possible in the old workflow, there the owning user was a field in the workflowitem table).

Database additions

There are a number of important database changes in order to support the new reviewer workflow framework. The following tables have been added:

collectionrole

The collectionrole table stores the the groups that are assigned to one of the collection scope roles. A new entry in this table is created when an administrator creates a new collection role group in the Edit Collection interface. The table has the following columns:

  • collectionrole_id (INTEGER): Unique ID for a row in the collectionrole table
  • role_id: The (TEXT): Stores the name of this role as specified in the XML configuration document
  • collection_id: (INTEGER, REFERENCES collection(collection_id)): The ID of the collection for which the role is defined.
  • group_id: (INTEGER, REFERENCES epersongroup(eperson_group_id)): The ID of the group that contains the members of this role.

workflowitemrole

This table stores the the group or eperson that has been assigned to one of the workflow items to perform one of the steps in the workflow. This table stores the item scope workflow roles. For one item, multiple groups or epersons can be configured so multiple rows in this table can correspond to the same item, step and workflow. The selection of the members of these item roles is performed by another action earlier in the workflow. This table contains the following columns:

  • workflowitemrole_id (INTEGER): Unique ID for a row in the workflowitemrole table.
  • role_id (TEXT): Stores the name of this role as specified in the XML configuration document.
  • workflow_item_id (INTEGER, REFERENCES workflowitem(workflow_id)): The workflow item for which the role has been configured.
  • eperson_id (INTEGER, REFERENCES eperson(eperson_id)): The eperson that has been configured for this workflow item role. This value can be empty in case a group has been configured.
  • group_id (INTEGER REFERENCES epersongroup(eperson_group_id)): The group that has been configured for this workflow item role. This value can be empty in case an eperson has been configured.

taskowner

This table contains all the tasks that belong to an eperson. Entries in this table are created when a user claims a certain task from the task pool or can be automatically created when automated action assigns the user to a task. The taskowner table contains the following columns:

  • taskowner_id (INTEGER): Unique ID for a row in the taskowner table.
  • workflow_item_id (INTEGER, REFERENCES workflowitem(workflow_id)): The ID of the workflow item for which an eperson has a task assigned/claimed.
  • action_id (TEXT): The ID of the action the eperson has claimed or has been assigned to.
  • step_id (TEXT): The ID of the step that contains the action.
  • workflow_id (TEXT): The ID of the workflow process that contains the step.
  • owner_id (INTEGER, REFERENCES eperson(eperson_id)): The ID of the eperson who owns the task.

Database changes

. This schema is only used when using the score reviewing system at the moment, but one could always use this schema if metadata is required for custom workflow steps.

The changes made to the database can always be found in the [dspace]/etc/[database-type]/xmlworkflow/ directory in the file xml_workflow.sql. The following tables have been added to the DSpace database. All tables are prefixed with 'cwf_' to avoid any confusion with the existing workflow related database tables:

cwf_workflowitem

The cwf_workflowitem table contains the different workflowitems in the workflow. This table has the following columns:

  • workflowitem_id: The identifier of the workflowitem and primary key of this table
  • item_id: The identifier of the DSpace item to which this workflowitem refers.
  • collection_id: The collection to which this workflowitem is submitted.
  • multiple_titles: Specifies whether the submission has multiple titles (important for submission steps)
  • published_before: Specifies whether the submission has been published before (important for submission steps)
  • multiple_files: Specifies whether the submission has multiple files attached (important for submission steps)

cwf_collectionrole

The cwf_collectionrole table represents a workflow role for one collection. This type of role is the same as the roles that existed in the original workflow meaning that for each collection a separate group is defined to described the role. The cwf_collectionrole table has the following columns:

  • collectionrol_id: The identifier of the collectionrole and the primaty key of this table
  • role_id: The identifier/name used by the workflow configuration to refer to the collectionrole
  • collection_id: The collection identifier for which this collectionrole has been defined
  • group_id: The group identifier of the group that defines the collection role

cwf_workflowitemrole

The cwf_workflowitemrole table represents roles that are defined at the level of an item. These roles are temporary roles and only exist during the execution of the workflow for that specific item. Once the item is archived, the workflowitemrole is deleted. Multiple rows can exist for one workflowitem with e.g. one row containing a group and a few containing epersons. All these rows together make up the workflowitemrole The cwf_workflowitemrole table has the following columns:

  • workflowitemrole_id: The identifier of the workflowitemrole and the primaty key of this table
  • role_id: The identifier/name used by the workflow configuration to refer to the workflowitemrole
  • workflowitem_id: The cwf_workflowitem identifier for which this workflowitemrole has been defined
  • group_id: The group identifier of the group that defines the workflowitemrole role
  • eperson_id: The eperson identifier of the eperson that defines the workflowitemrole role

cwf_pooltask

The cwf_pooltask table represents the different task pools that exist for a workflowitem. These task pools can be available at the beginning of a step and contain all the users that are allowed to claim a task in this step. Multiple rows can exist for one task pool containing multiple groups and epersons. The cwf_pooltask table has the following columns:

  • pooltask_id: The identifier of the pooltask and the primaty key of this table
  • workflowitem_id: The identifier of the workflowitem for which this task pool exists
  • workflow_id: The identifier of the workflow configuration used for this workflowitem
  • step_id: The identifier of the step for which this task pool was created
  • action_id: The identifier of the action that needs to be displayed/executed when the user selects the task from the task pool
  • eperson_id: The identifier of an eperson that is part of the task pool
  • group_id: The identifier of a group that is part of the task pool

cwf_claimtask

The cwf_claimtask table represents a task that has been claimed by a user. Claimed tasks can be assigned to users or can be the result of a claim from the task pool. Because a step can contain multiple actions, the claimed task defines the action at which the user has arrived in a particular step. This makes it possible to stop working halfway the step and continue later. The cwf_claimtask table contains the following columns:

  • claimtask_id: The identifier of the claimtask and the primary key of this table
  • workflowitem_id: The identifier of the workflowitem for which this task exists
  • workflow_id: The id of the workflow configuration that was used for this workflowitem
  • step_id: The step that is currenlty processing the workflowitem
  • action_id: The action that should be executed by the owner of this claimtask
  • owner_id: References the eperson that is responsible for the execution of this task

cwf_in_progress_user

The cwf_in_progess_user table keeps track of the different users that are performing a certain step. This table is used because some steps might require multiple users to perform the step before the workflowitem can proceed. The cwf_in_progress_user table contains the following columns:

...