01-20-2011 12:20 PM
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitParallelReviewTask" swimlane="initiator" />
<transition name="" to="startreview">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for(var i=0; i < bpm_assignees.length; i++ )
{
var mail = actions.create("mail");
mail.parameters.to = bpm_assignees[i].properties.email;
mail.parameters.subject = "Document for approval";
mail.parameters.from = initiator.properties.email;
mail.parameters.text = initiator.properties.firstName + " "
+ initiator.properties.lastName
+ " has requested a document review: "
+ "\u000D\u000D"
+ bpm_workflowDescription
+ "\u000D\u000D"
+ "Log on to Alfresco here: http://10.136.1.176:8080/share";
mail.execute(bpm_package);
}
</script>
</action>
</transition>
</start-state>
01-24-2011 07:09 AM
<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>user</var>
</action>
<transition name="transName" to="dosomething">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var mail = actions.create("mail");
mail.parameters.to = user.properties.email;
mail.parameters.subject ="Document for approval";
mail.parameters.from = initiator.properties.email;
mail.parameters.text = mail.parameters.text = initiator.properties.firstName + " "
+ initiator.properties.lastName
+ " has requested a document review: "
+ "\u000D\u000D"
+ bpm_workflowDescription
+ "\u000D\u000D"
+ "Log on to Alfresco here: http://10.136.1.176:8080/share";
mail.execute(bpm_package);
</script>
</action>
</transition>
</node>
01-26-2011 09:01 AM
01-30-2011 06:33 PM
<?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>
<transition name="transName" to="dosomething">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
var mail = actions.create("mail");
mail.parameters.to = reviewer.properties.email;
mail.parameters.subject ="Document for your review";
mail.parameters.from = initiator.properties.email;
mail.parameters.text = mail.parameters.text = initiator.properties.firstName + " "
+ initiator.properties.lastName
+ " has requested a document review: "
+ "\u000D\u000D"
+ bpm_workflowDescription
+ "\u000D\u000D"
+ "Log on to Share here: ";
mail.execute(bpm_package);
</script>
</action>
</transition>
<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>
01-31-2011 05:30 AM
<?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">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var mail = actions.create("mail");
mail.parameters.to = reviewer.properties.email;
mail.parameters.subject ="Document for approval";
mail.parameters.from = initiator.properties.email;
mail.parameters.text = mail.parameters.text = initiator.properties.firstName + " "
+ initiator.properties.lastName
+ " has requested a document review: "
+ "\u000D\u000D"
+ bpm_workflowDescription
+ "\u000D\u000D"
+ "Log on to Alfresco here: http://10.136.1.176:8080/share";
mail.execute(bpm_package);
</script>
</action>
</transition>
</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">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="wf_approveCount" access="read,write" />
<expression>
wf_approveCount = wf_approveCount +1;
</expression>
</script>
</action>
<script>
</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>
01-31-2011 02:09 PM
02-01-2011 09:54 AM
02-01-2011 10:14 AM
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.