08-25-2008 01:03 PM
<type name="my_wf:reviewTask">
<parent>wf:reviewTask</parent>
<overrides>
<property name="bpm:packageActionGroup">
<default>add_package_item_actions</default>
</property>
</overrides>
</type>
<task-node name="review">
<task name="sgu_wf:reviewTask">
<assignment
class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{reviewer}</actor>
</assignment>
</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>
08-26-2008 02:17 AM
08-26-2008 03:03 AM
08-26-2008 08:54 AM
for(var i = 0; i < bpm_package.children.length; i++) {
bpm_package.children[i].setPermission("Editor", reviewer.properties.userName);
}
Note that variable reviewer is defined defined in a ForEachFork action from bpm_assignees.08-27-2008 02:52 AM
<task-node name="approved">
<task name="wf:approvedParallelTask" swimlane="initiator" />
<transition to="end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_assignees" access="read" />
<variable name="bpm_package" access="read, write" />
<expression>
for(var j = 0; j < bpm_assignees.size(); j++) {
var userName = bpm_assignees.get(j).properties.userName;
for(var i = 0; i < bpm_package.children.length; i++) {
var resource = bpm_package.children[i];
resource.removePermission("Editor", userName);
}
}
</expression>
</script>
</action>
</transition>
</task-node>
<end-state name="end" />
08-27-2008 04:57 AM
bpm_package;
08-27-2008 09:03 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.