05-07-2014 11:48 PM
<!– Review and Approve workflow definitions –>
<props>
<prop key="engineId">jbpm</prop>
<prop key="location">alfresco/workflow/review_processdefinition.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">true</prop>
</props>
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:review">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator" />
<transition name="" to="review" />
</start-state>
<swimlane name="reviewer">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<task-node name="review">
<task name="wf:reviewTask" swimlane="reviewer">
<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="reject" to="rejected" >
</transition>
<transition name="approve" to="approved" />
</task-node>
<task-node name="rejected">
<task name="wf:rejectedTask" swimlane="reviewer" />
<transition name="" to="end" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var dest = companyhome.childByNamePath(bpm_rejectDestination);
for (var i = 0 ; i < bpm_package.children.length; i++)
{
bpm_package.children.move(dest);
}
</script>
</action>
</transition>
</task-node>
<task-node name="approved">
<task name="wf:approvedTask" swimlane="reviewer" />
<transition name="" to="end" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var dest = companyhome.childByNamePath(bpm_approveDestination);
for (var i = 0 ; i < bpm_package.children.length; i++)
{
bpm_package.children.move(dest);
}
</script>
</action>
</transition>
</task-node>
<end-state name="end" />
</process-definition>
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:review";
workflow.parameters["bpm:workflowDescription"] = "Sila review dokumen ini";
workflow.parameters["bpm:assignee"] = "us1";
workflow.parameters["bpm:approveDestination"] = "Sites/test-script";
workflow.execute(document);
<prop key="redeploy">true</prop>
05-09-2014 05:44 AM
<prop key="redeploy">true</prop>
05-09-2014 10:57 AM
05-09-2014 09:26 PM
<prop key="redeploy">true</prop>
,this flag tells alfresco whether or not it should automatically redeploy the process on startup. 05-09-2014 10:05 PM
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.