12-10-2013 10:09 PM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="Serial Approval">
<swimlane name="initiator" />
<start-state name="start">
<task name="ncm:startTask" description="Submit Serial Review Task" swimlane="initiator" />
<event type="node-leave">
<script>
<variable name="approveCount" access="write" />
<expression>approveCount = 0;</expression>
</script>
</event>
<transition name="Send For Review" to="review" />
</start-state>
<task-node name="review">
<task name="ncm:reviewTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignees.get(approveCount)}</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>
<event type="task-assign" />
</task>
<event type="node-enter">
<script>
<variable name="reviewerCount" access="write" />
<expression>reviewerCount = bpm_assignees.size();</expression>
</script>
</event>
<transition name="Approve" to="isLast">
<script>
<variable name="approveCount" access="write" />
<expression>approveCount = approveCount + 1 ;</expression>
</script>
</transition>
<transition name="Reject" to="re_submit" />
</task-node>
<decision name="isLast">
<transition name="No" to="review">
<condition>#{approveCount < reviewerCount}</condition>
</transition>
<transition name="Yes" to="FinalSubmit">
<condition>#{approveCount == reviewerCount}</condition>
</transition>
</decision>
<end-state name="end" />
<task-node name="re_submit">
<task name="ncm:reviewTask" swimlane="initiator">
<event type="task-create">
<script>if (bpm_workflowDueDate != void)
taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void)
taskInstance.priority = bpm_workflowPriority;</script>
</event>
<event type="task-assign" />
</task>
<transition name="ReSubmit" to="review">
<script>
<variable name="approveCount" access="write" />
<expression>approveCount =0 ;</expression>
</script>
</transition>
<transition name="Finish" to="end" />
</task-node>
<task-node name="FinalSubmit">
<task name="ncm:reviewTask" swimlane="initiator">
<event type="task-assign" />
</task>
<transition name="Finish" to="end" />
</task-node>
</process-definition>
<task name="ncm:reviewTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignees.get(approveCount)}</actor>
</assignment>
<event type="task-create">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="docNodeRef" access="read, write" />
<variable name="bpm_package" access="read" />
<expression>
if (bpm_workflowDueDate != void)
taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void)
taskInstance.priority = bpm_workflowPriority;
<expression>
</script>
</action>
</event>
12-10-2013 10:51 PM
<event type="task-create">
<script>
<expression>
if (bpm_workflowDueDate != void)
taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void)
taskInstance.priority = bpm_workflowPriority;
<expression>
</script>
</event>
12-10-2013 11:56 PM
"bpm_package.children[0].properties["cm:name"];"
12-23-2013 01:32 AM
01-10-2014 07:00 AM
taskInstance.desciption = "updated document" + bpm_package.children[0].properties["cm:name"];
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.