Page History
Configurable Workflow
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
...
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
\]/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
\]/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:
{{\Wiki Markup [dspace
\]
}}/etc/oracle/xmlworkflow/workflow_migration.sqlWiki Markup - {{\
[dspace
\]
}}/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
...
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
.dir}]/config/workflow.xml
. An example of this workflow configuration file can be found bellow.
...
Workflow actions configuration
API configuration
...
The workflow actions configuration is located in the {{\[dspace
\]/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.
This file contains the beans for the actions and user selection methods referred to in the workflow.xml. In order for the workflow framework to work properly, each of the required actions must be part of this configuration.
...
User Interface configuration
The configuration file for the workflow user interface actions is located in the {{\ Wiki Markup [dspace
\]/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 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.
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> <bean id="{action.id}" class="{classpath}" scope="prototype"/> <bean id="{action.id.2}" class="{classpath}" scope="prototype"/> </beans> |
...
- READ
- WRITE
- ADD
- DELETE
Database
...
The workflow uses a separate metadata schema named {{workflow
}} the fields this schema contains can be found in the \{{\[dspace
\]/config/registries
}} directory and in the file {{workflow-types.xml
}}. 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 {{\ Wiki Markup [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:
...