mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
The pooled and parallel workflow definitions are now enabled by default, all corresponding form configuration for the start tasks and other task types are also defined, some tweaking may be need after review from Linton. Fixed a potential NPE when transition id's are returned as null. Log warnings added to the task type config evaluator when the type can not be retrieved, which gives an indication as to why forms display all the default fields rather than the configured ones. Changed process definitions to use a consistent ordering for the Approve and Reject transitions. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22336 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
87 lines
2.9 KiB
XML
87 lines
2.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:parallelreview">
|
|
|
|
<swimlane name="initiator" />
|
|
|
|
<start-state name="start">
|
|
<task name="wf:submitParallelReviewTask" swimlane="initiator" />
|
|
<transition name="" to="startreview"/>
|
|
</start-state>
|
|
|
|
<node name="startreview">
|
|
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
|
|
<foreach>#{bpm_assignees}</foreach>
|
|
<var>reviewer</var>
|
|
</action>
|
|
<event type="node-enter">
|
|
<script>
|
|
<variable name="wf_approveCount" access="write" />
|
|
<expression>
|
|
wf_approveCount = 0;
|
|
</expression>
|
|
</script>
|
|
</event>
|
|
<transition name="review" to="review" />
|
|
</node>
|
|
|
|
<task-node name="review">
|
|
<task name="wf:reviewTask">
|
|
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
|
|
<actor>#{reviewer}</actor>
|
|
</assignment>
|
|
<event type="task-create">
|
|
<script>
|
|
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
|
|
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
|
|
</script>
|
|
</event>
|
|
</task>
|
|
<transition name="approve" to="endreview">
|
|
<script>
|
|
<variable name="wf_approveCount" access="read,write" />
|
|
<expression>
|
|
wf_approveCount = wf_approveCount +1;
|
|
</expression>
|
|
</script>
|
|
</transition>
|
|
<transition name="reject" to="endreview" />
|
|
</task-node>
|
|
|
|
<join name="endreview">
|
|
<transition to="isapproved" />
|
|
</join>
|
|
|
|
<decision name="isapproved">
|
|
<event type="node-enter">
|
|
<script>
|
|
<variable name="wf_reviewerCount" access="write"/>
|
|
<variable name="wf_requiredPercent" access="write"/>
|
|
<variable name="wf_actualPercent" access="write"/>
|
|
<expression>
|
|
wf_requiredPercent = wf_requiredApprovePercent;
|
|
wf_reviewerCount = bpm_assignees.size();
|
|
wf_actualPercent = ((wf_approveCount * 100) / wf_reviewerCount);
|
|
</expression>
|
|
</script>
|
|
</event>
|
|
<transition name="reject" to="rejected" />
|
|
<transition name="approve" to="approved">
|
|
<condition>#{wf_actualPercent >= wf_requiredApprovePercent}</condition>
|
|
</transition>
|
|
</decision>
|
|
|
|
<task-node name="rejected">
|
|
<task name="wf:rejectedParallelTask" swimlane="initiator" />
|
|
<transition to="end" />
|
|
</task-node>
|
|
|
|
<task-node name="approved">
|
|
<task name="wf:approvedParallelTask" swimlane="initiator" />
|
|
<transition to="end" />
|
|
</task-node>
|
|
|
|
<end-state name="end"/>
|
|
|
|
</process-definition>
|