All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
Info |
---|
As of DSpace 7, the workflow.xml configuration file has been migrated to use Spring Bean syntax (instead of a custom XML format). The structure of this XML has changed. If you need help migrating your old workflow.xml file (which started with a <wf-config> tag) to the new format (using <bean> tags), an XSLT script is available: workflow-migration.xsl |
The workflow main configuration can be found in the workflow.xml file, located in [dspace]/config/spring/api/workflow.xml
. An example of this workflow configuration file can be found bellowbelow.
Code Block | ||
---|---|---|
| ||
<wf-config><beans> <workflow-map> <bean class="org.dspace.xmlworkflow.XmlWorkflowFactoryImpl"> <!-- collection to workflow mapping --> <property name="workflowMapping"> <name-map collection="default" workflow="{workflow.id}"/> <util:map> <name-map collection="123456789/0" workflow="{workflow.id2} <entry key="defaultWorkflow" value-ref="defaultWorkflow"/> <!-- </workflow-map> <workflow<entry startkey="{start.step.id}123456789/4" idvalue-ref="{workflow.id}"> selectSingleReviewer"/>--> <!-- <roles> <entry key="123456789/5" value-ref="scoreReview"/>--> <!-- Roles used in the workflow --> </util:map> </roles>property> </bean> <!--Standard StepsDSpace come hereworkflow--> <bean name="defaultWorkflow" class="org.dspace.xmlworkflow.state.Workflow"> <step id="ExampleStep1" nextStep <property name="ExampleStep2firstStep" userSelectionMethodref="{UserSelectionActionId}reviewstep"/> <property name="steps"> <!-- Step1 config--> <util:list> </step> <step id="ExampleStep2" userSelectionMethod<ref bean="{UserSelectionActionId}reviewstep"/> </step> </workflow> <workflow<ref startbean="{start.step.id2}" id="{workflow.id}"editstep"/> <ref bean="finaleditstep"/> <!-- Another workflow configuration--> </util:list> </workflow>property> </wf-config> |
bean>
<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>
|
The workflow The workflow map contains a mapping between collections in DSpace and a workflow configuration. Similar to the configuration of the submission process, the mapping can be done based on the handle of the collection. The mapping with "defaultdefaultWorkflow" as the value for the collection mapping, will be used for the collections not occurring in other mapping tags. Each mapping is defined by a "name-mapentry" tag with two attributes:
The workflow element bean is a repeatable XML element and the configuration between two "workflow" tags represents one workflow process. It requires the following 2 attributes::
...
Each workflow process step has a number of roles defined between the "rolesrole" tagsproperty. A role represents one or more DSpace EPersons or Groups and can be used to assign them to one or more steps in the workflow process. One role is represented by one "role" tag bean and has the following attributes:
Code Block | ||
---|---|---|
| ||
<roles><bean id="reviewer" class="org.dspace.xmlworkflow.Role"> <role id<property name="scope" value="{unique.role.id}" description="{role.description}" scope="{role.scope}" name="{role.name}" internal="true/false#{ T(org.dspace.xmlworkflow.Role.Scope).COLLECTION}"/> <property name="name" value="Reviewer"/> <property name="description" value="The people responsible for this step are able to edit the metadata of incoming submissions, and then accept or reject them."/> </roles> bean> |
The step element represents one step in the workflow process. A step represents a number of actions that must be executed by one specified role. In case no role attribute is specified, the workflow framework assumes that the DSpace system is responsible for the execution of the step and that no user interface will be available for each of the actions in this step. The step element has the following attributes in order to further configure it:
Code Block | ||
---|---|---|
| ||
<step id="{step.id}" nextStep="{next.step.id}" userSelectionMethod="{user.selection.bean.id}" role="{role.id}" > <!-- optional alternate outcomes, depending on the outcome of the actions you can alter the next step here --> <alternativeOutcome> <step status="{integer}">{alternate.step.id}</step> </alternativeOutcome> <action id="{action.bean.id}"/> <action id="{action.bean.id.1}"/> </step> <bean name="reviewstep" class="org.dspace.xmlworkflow.state.Step"> <property name="userSelectionMethod" ref="claimaction"/> <property name="role" ref="reviewer"/> <property name="outcomes"> <util:map> <entry key="#{ T(org.dspace.xmlworkflow.state.actions.ActionResult).OUTCOME_COMPLETE}" value-ref="editstep"/> </util:map> </property> <property name="actions"> <util:list> <ref bean="reviewaction"/> </util:list> </property> </bean> |
Each step contains a number of actions that the workflow item will go through. In case the action has a user interface, the users responsible for the exectution of this step will have to execute these actions before the workflow item can proceed to the next action or the end of the step.
There is also an optional subsection that can be defined for a step part called "alternativeOutcomeoutcomes". This can be used to define outcomes for the step that differ from the one specified in the nextStep attribute. Each action returns an integer depending on the result of the action. The default value is "0" and will make the workflow item proceed to the next action or to the end of the step.
In case an action returns a different outcome than the default "0", the alternative outcomes will be used to lookup the next step. The alternativeOutcome "outcomes" element contains a number of steps, each having a status attribute. This status attribute defines the return value of an action. The value of the element will be used to lookup the next step the workflow item will go through in case an action returns that specified status.
...