02-11-2010 04:58 AM
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var all_members = people.getMembers(bpm_groupAssignee);
for(var i=0; i < all_members.length; i++ )
{
var mail = actions.create("mail");
mail.parameters.to = all_members[i].properties.email;
mail.parameters.subject = "New document is waiting";
mail.parameters.from = "admin@alfresco.com";
mail.parameters.text = "Some text";
mail.execute(bpm_package);
}
</script>
</action>
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:parallelgroupreview">
<swimlane name="initiator"></swimlane>
<start-state name="start">
<task name="wf:submitGroupReviewTask" swimlane="initiator" />
<transition name="" to="startreview">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var all_members = people.getMembers(bpm_groupAssignee);
for(var i=0; i < all_members.length; i++ )
{
var mail = actions.create("mail");
mail.parameters.to = all_members[i].properties.email;
mail.parameters.subject = "New document is waiting";
mail.parameters.from = "admin@alfresco.com";
mail.parameters.text = "Some text";
mail.execute(bpm_package);
}
</script>
</action>
</transition>
</start-state>
<node name="startreview">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getMembers(bpm_groupAssignee)}</foreach>
<var>reviewer</var>
</action>
<event type="node-enter">
<script>
<variable name="wf_approveCount" access="write" />
<expression>
wf_approveCount = 0;
</expression>
</script>
</action>
</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="reject" to="endreview" />
<transition name="approve" to="endreview">
<script>
<variable name="wf_approveCount" access="read,write" />
<expression>
wf_approveCount = wf_approveCount +1;
</expression>
</script>
</transition>
</task-node>
<join name="endreview">
<transition to="isapproved" />
</join>
<decision name="isapproved">
<event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="wf_reviewerCount" access="write"/>
<expression>people.getMembers(bpm_groupAssignee).length;</expression>
</script>
</action>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="wf_requiredPercent" access="write"/>
<expression>wf_requiredPercent = wf_requiredApprovePercent;</expression>
</script>
</action>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="wf_actualPercent" access="write"/>
<expression>wf_actualPercent = ((wf_approveCount * 100) / people.getMembers(bpm_groupAssignee).length);</expression>
</script>
</action>
</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>
Am I doing something wrong, because no email is being sent?02-12-2010 05:50 AM
04-26-2010 05:12 PM
09-24-2010 09:46 AM
09-27-2010 03:26 AM
10-05-2010 03:44 PM
10-06-2010 01:19 AM
05-03-2018 09:49 AM
Hey,
What I should do to disable the Group and Pooled Review and Approve options from the drop-down menu.
In which file i should get that options to disable.
Thanks in advance,
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.