All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
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. |
...
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="XMLWorkflow" path="resource://aspects/XMLWorkflow/" /> |
...
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
|
...
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 | ||
---|---|---|
| ||
<!--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
....
Code Block | |
---|---|
|
...
|
...
<!--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"/> |
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 | ||
---|---|---|
| ||
<!--<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 | ||
---|---|---|
| ||
You will also need to follow the Data Migration Procedure below. |
...
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 policies, roles, tasks and workflowitems from the original workflow to the new workflow framework.
This process will occur automatically by simply restarting Tomcat (or your servlet container) after enabling "xmlworkflow" in the workflow.cfg.
You can also choose to manually Manually kick off this migration by simply running:
Code Block |
---|
[dspace]/bin/dspace database migrate/bin/dspace database migrate ignored |
The "ignored" parameter will tell DSpace to run any previously-ignored migrations on your database. After enabling 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 command.
For more information on the "database migrate" command, please see Database Utilities.
...
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
|
...
...
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<wf-config>
<workflow-map>
<!-- collection to workflow mapping -->
<name-map collection="default" workflow="{workflow.id}"/>
<name-map collection="123456789/0" workflow="{workflow.id2}"/>
</workflow-map>
<workflow start="{start.step.id}" id="{workflow.id}">
<roles>
<!-- Roles used in the workflow -->
</roles>
<!-- Steps come here-->
<step id="ExampleStep1" nextStep="ExampleStep2" userSelectionMethod="{UserSelectionActionId}">
<!-- Step1 config-->
</step>
<step id="ExampleStep2" userSelectionMethod="{UserSelectionActionId}">
</step>
</workflow>
<workflow start="{start.step.id2}" id="{workflow.id}">
<!-- Another workflow configuration-->
</workflow>
</wf-config>
|
...
Code Block | ||
---|---|---|
| ||
<roles>
<role id="{unique.role.id}" description="{role.description}" scope="{role.scope}" name="{role.name}" internal="true/false"/>
</roles>
|
...
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">
<!-- At the top are our bean class identifiers --->
<bean id="{action.api.id}" class="{class.path}" scope="prototype"/>
<bean id="{action.api.id.2}" class="{class.path}" scope="prototype"/>
<!-- Below the class identifiers come the declarations for out actions/userSelectionMethods -->
<!-- Use class workflowActionConfig for an action -->
<bean id="{action.id}" class="oorg.dspace.xmlworkflow.state.actions.WorkflowActionConfig" scope="prototype">
<constructor-arg type="java.lang.String" value="{action.id}"/>
<property name="processingAction" ref="{action.api.id}"/>
<property name="requiresUI" value="{true/false}"/>
</bean>
<!-- Use class UserSelectionActionConfig for a user selection method -->
<!--User selection actions-->
<bean id="{action.api.id.2}" class="org.dspace.xmlworkflow.state.actions.UserSelectionActionConfig" scope="prototype">
<constructor-arg type="java.lang.String" value="{action.api.id.2}"/>
<property name="processingAction" ref="{user.selection.bean.id}"/>
<property name="requiresUI" value="{true/false}"/>
</bean>
</beans> |
...
The configuration file for the workflow user interface actions is located in the [dspace]/config/spring/xmlui/
and is named "workflow-actions-xmlui.xml". BEach Each 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>
|
...
minimumAcceptanceScore
property passed to evaluationactionAPI
in config/spring/api/workflow-actions.xml
.)...