Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel2
outlinetrue
stylenone

Introduction

Configurable Workflows are an optional feature that may be enabled for use only within DSpace XMLUI.  As of DSpace 7, Configurable Workflow is the only workflow system available in DSpace.  It has fully replaced the older "traditional/basic workflow" system.

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
languagehtml/xml
<aspect name="Submission and Workflow" path="resource://aspects/Submission/" />
<aspect name="Original Workflow" path="resource://aspects/Workflow/" />

And the xmlui.xconf configuration for the new XML configurable workflow is the following:

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

[dspace]/config/spring/api/core-services.xml

You also have to configure DSpace to load the right services. This is done by commenting the basic workflow services and uncommenting the xmlworkflow services in [dspace]/config/spring/api/core-services.xml. After enabling the configurable workflow the mentioned file should contain the following:

Code Block
languagehtml/xml
    <!--Basic workflow services, comment or remove when switching to the configurable workflow -->
    <!--
    <bean class="org.dspace.workflowbasic.TaskListItemServiceImpl"/>
    <bean class="org.dspace.workflowbasic.BasicWorkflowItemServiceImpl"/>
    <bean class="org.dspace.workflowbasic.BasicWorkflowServiceImpl"/>
    -->

    <!--Configurable workflow services, uncomment the xml workflow beans below to enable the configurable workflow-->
    <bean class="org.dspace.xmlworkflow.storedcomponents.ClaimedTaskServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.storedcomponents.CollectionRoleServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.storedcomponents.InProgressUserServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.storedcomponents.PoolTaskServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.storedcomponents.WorkflowItemRoleServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItemServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.XmlWorkflowServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.WorkflowRequirementsServiceImpl"/>
    <bean class="org.dspace.xmlworkflow.XmlWorkflowFactoryImpl"/>
Warning
Please be careful while editing [dspace]/config/spring/api/core-services.xml as it controls which parts of DSpace are loaded. Accidentally uncommenting the wrong parts my result in your DSpace instance not loading properly anymore.

[dspace]/config/spring/api/core-factory-services.xml

Same as for the core-services.xml from above, comment out the basic workflow factory & enable the xmlworkflow factory in [dspace]/config/spring/api/core-factory-services.xml. After enabling the configurable workflow the mentioned file should contain the following:
Code Block
languagexml
<!--Basic workflow services, comment or remove when switching to the configurable workflow -->
<!--<bean id="workflowServiceFactory" class="org.dspace.workflowbasic.factory.BasicWorkflowServiceFactoryImpl"/>-->
<!--Configurable workflow services, uncomment to enable-->
<bean id="workflowServiceFactory" class="org.dspace.xmlworkflow.factory.XmlWorkflowServiceFactoryImpl"/>

[dspace]/config/hibernate.cfg.xml

With the xmlworkflow come some separate tables which hibernate needs to be aware of, and the tables for the basic workflow can be disregarded. So edit the [dspace]/config/hibernate.cfg.xml file and comment out the basic workflow classes & enable the xmlworkflow classes. The result is displayed below:

Code Block
languagexml
<!--<mapping class="org.dspace.workflowbasic.BasicWorkflowItem"/>-->
<!--<mapping class="org.dspace.workflowbasic.TaskListItem"/>-->
<mapping class="org.dspace.xmlworkflow.storedcomponents.ClaimedTask"/>
<mapping class="org.dspace.xmlworkflow.storedcomponents.CollectionRole"/>
<mapping class="org.dspace.xmlworkflow.storedcomponents.InProgressUser"/>
<mapping class="org.dspace.xmlworkflow.storedcomponents.PoolTask"/>
<mapping class="org.dspace.xmlworkflow.storedcomponents.WorkflowItemRole"/>
<mapping class="org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem"/>


Info
titleWorkflow Data Migration

You will also need to follow the Data Migration Procedure below.

Data Migration

Info
titleWorkflow Data Migration

You will also need to follow the Data Migration Procedure below.

Data Migration

...

Workflowitem conversion/migration scripts

Depending on the workflow that is used by a DSpace installation, different scripts can be used when migrating to the new workflow.

Automatic migration

Automatic 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 automated migration will migrate the As part of the upgrade to DSpace 7 or above, all your old policies, roles, tasks and workflowitems will be automatically updated from the original workflow to the new workflow Configurable Workflow framework.Manually kick off this migration by simply running  This is done via this command:

Code Block
[dspace]/bin/dspace database migrate ignored

The "ignored" parameter will tell DSpace to run any previously-ignored migrations on your database.  After enabling As the Configurable Workflow in your Spring configs (see above), the new automatic migrations will be made available to the "database migrate" command. As these new migrations were not previously run by "database migrate", they will be "ignored" until you trigger them by manually running the above commandmigrations have existed in the DSpace codebase for some time, this is the only way to force them to be run.

For more information on the "database migrate" command, please see Database Utilities.

...

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.

To execute the script, run the following CLI command:

...