11-18-2008 09:46 PM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="sloan2910">
<swimlane name="initiator"></swimlane>
<start-state name="start">
<task name="wf:startStaffTask" swimlane="initiator"></task>
<transition to="submitView" name="startStaffLoan"></transition>
</start-state>
<task-node name="Viewed">
<event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_package" access="read" />
<variable name="user" access="read" />
<expression>
for (var j = 0; j < bpm_package.children.length; j++)
{
var resource = bpm_package.children[j];
resource.setPermission("Coordinator", user.properties.userName);
}
</expression>
</script>
</action>
</event>
<task name="wf:viewStaffTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactorsNTIS>#{people.getIVBMembers(bpm_NTISgroupAssignees)}</pooledactorsNTIS>
</assignment>
<event type="task-create">
<script>
<variable name="wf_dueDate" access="read,write" />
<variable name="wf_priority" access="read,write" />
<expression>
taskInstance.dueDate = wf_dueDate;
taskInstance.priority = wf_priority;
</expression>
</script>
</event>
</task>
<transition to="viewApproved" name="Approved"></transition>
<transition to="Rejected" name="Rejected"></transition>
</task-node>
<task-node name="AppRe">
<task name="wf:submitStaffTask" >
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactorsNTIS>#{user}</pooledactorsNTIS>
</assignment>
<event type="task-create">
<script>
<variable name="wf_dueDate" access="read,write" />
<variable name="wf_priority" access="read,write" />
<expression>
taskInstance.dueDate = wf_dueDate;
taskInstance.priority = wf_priority;
</expression>
</script>
</event>
</task>
<transition to="node" name="Continue"></transition>
</task-node>
<task-node name="Approved">
<event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="bpm_package" access="read" />
<variable name="user" access="read" />
<expression>
for (var e = 0; e < bpm_package.children.length; e++)
{
var resource = bpm_package.children[e];
resource.setPermission("Coordinator", user.properties.userName);
}
</expression>
</script>
</action>
</event>
<transition to="Viewed" name="Continue"></transition>
<task name="wf:approveStaffTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactorsNTIS>#{user}</pooledactorsNTIS>
</assignment>
<event type="task-create">
<script>
<variable name="wf_dueDate" access="read,write" />
<variable name="wf_priority" access="read,write" />
<expression>
taskInstance.dueDate = wf_dueDate;
taskInstance.priority = wf_priority;
</expression>
</script>
</event>
</task>
</task-node>
<task-node name="Rejected">
<task name="wf:rejectStaffTask" swimlane="initiator">
<event type="task-create">
<script>
<variable name="wf_dueDate" access="read,write" />
<variable name="wf_priority" access="read,write" />
<expression>
taskInstance.dueDate = wf_dueDate;
taskInstance.priority = wf_priority;
</expression>
</script>
</event>
</task>
<transition to="end" name="End"></transition>
</task-node>
<node name="submitView">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getIVBMembers(bpm_NTISgroupAssignees)}</foreach>
<var>user</var>
</action>
<event type="node-enter">
<script>
<variable name="wf_dueDate" access="write" />
<variable name="wf_priority" access="write" />
<expression>
if (bpm_workflowDueDate != void) wf_dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority.equals("Urgent")) wf_priority = 1;
if (bpm_workflowPriority.equals("Intermediate")) wf_priority = 2;
if (bpm_workflowPriority.equals("Normal")) wf_priority = 3;
</expression>
</script>
</event>
<transition to="AppRe">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
if (wf_staffNotifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = user.properties.email;
mail.parameters.subject = "Staff Document Task " + bpm_workflowDescription;
mail.parameters.from = initiator.properties.email;
mail.parameters.text = "You have a STAFF TASK from" + initiator;
mail.execute(bpm_package);
var mail1 = actions.create("mail");
mail1.parameters.to = initiator.properties.email;
mail1.parameters.subject = "List email assignee: " + user.properties.userName;
mail1.parameters.from = initiator.properties.email;
mail1.parameters.text = "You have a STAFF TASK from" + initiator;
mail1.execute(bpm_package);
}
for (var i = 0; i < bpm_package.children.length; i++)
{
var resource = bpm_package.children[i];
resource.setPermission("Coordinator", user.properties.userName);
}
</script>
</action>
</transition>
</node>
<task-node name="viewApproved">
<task name="wf:viewApproveStaffTask" swimlane="initiator">
<event type="task-create">
<script>
<variable name="wf_dueDate" access="read,write" />
<variable name="wf_priority" access="read,write" />
<expression>
taskInstance.dueDate = wf_dueDate;
taskInstance.priority = wf_priority;
</expression>
</script>
</event>
</task>
<transition to="end" name="End"></transition>
</task-node>
<node name="node">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getIVBMembers(bpm_NTISgroupAssignees)}</foreach>
<var>user</var>
</action>
<transition to="Approved"></transition>
</node>
<end-state name="end"></end-state>
</process-definition>
<type name="wf:startStaffTask">
<parent>bpm:startTask</parent>
<properties>
<property name="wf:staffNotifyMe">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
<mandatory-aspects>
<!– <aspect>bpm:assignee</aspect> –>
<aspect>bpm:NTISgroupAssignees</aspect>
</mandatory-aspects>
</type>
<type name="wf:submitStaffTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
<property name="bpm:status">
<default>Wait for Process</default>
</property>
</overrides>
<mandatory-aspects>
<!– <aspect>bpm:assignee</aspect> –>
<aspect>bpm:NTISgroupAssignees</aspect>
</mandatory-aspects>
</type>
<type name="wf:approveStaffTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>read_package_item_actions</default>
</property>
<property name="bpm:packageActionGroup">
<default>add_package_item_actions</default>
</property>
<property name="bpm:status">
<default>Wait for Process</default>
</property>
</overrides>
<mandatory-aspects>
<!– <aspect>bpm:assignee</aspect> –>
<aspect>bpm:NTISgroupAssignees</aspect>
</mandatory-aspects>
</type>
<type name="wf:rejectStaffTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>read_package_item_actions</default>
</property>
<property name="bpm:status">
<default>Rejected</default>
</property>
</overrides>
</type>
<type name="wf:viewStaffTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>read_package_item_actions</default>
</property>
<property name="bpm:status">
<default>Wait for Process</default>
</property>
</overrides>
</type>
<type name="wf:viewApproveStaffTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>read_package_item_actions</default>
</property>
<property name="bpm:status">
<default>Approved</default>
</property>
</overrides>
</type>
<config evaluator="node-type" condition="wf:startStaffTask" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" read-only="false"/>
<show-property name="bpm:workflowDueDate" read-only="false" />
<show-property name="bpm:workflowPriority" read-only="false" />
<show-property name="wf:staffNotifyMe" />
<separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator"/>
<show-association name="bpm:NTISgroupAssignees" display-label-id="wf_adhoc_assign_to" />
</property-sheet>
</config>
<config evaluator="node-type" condition="wf:submitStaffTask" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
<show-property name="bpm:dueDate" read-only="true" />
<show-property name="bpm:priority" read-only="true" />
<show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
<show-association name="bpm:NTISgroupAssignees" display-label-id="wf_adhoc_assign_to" />
</property-sheet>
</config>
<config evaluator="node-type" condition="wf:approveStaffTask" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
<show-property name="bpm:dueDate" read-only="true" />
<show-property name="bpm:priority" read-only="true" />
<show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
<separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
<show-association name="bpm:NTISgroupAssignees" display-label-id="wf_adhoc_assign_to" />
</property-sheet>
</config>
<config evaluator="node-type" condition="wf:rejectStaffTask" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
<show-property name="bpm:dueDate" read-only="true" />
<show-property name="bpm:priority" read-only="true" />
<show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
</property-sheet>
</config>
<config evaluator="node-type" condition="wf:viewStaffTask" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
<show-property name="bpm:dueDate" read-only="true" />
<show-property name="bpm:priority" read-only="true" />
<show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
</property-sheet>
</config>
<config evaluator="node-type" condition="wf:viewApproveStaffTask" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
<show-property name="bpm:dueDate" read-only="true" />
<show-property name="bpm:priority" read-only="true" />
<show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
</property-sheet>
</config>
11-20-2008 03:12 AM
11-22-2008 09:15 AM
<aspect name="wfcustom:customassignees">
<associations>
<association name="wfcustom:customassignees">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:person</class>
<mandatory>true</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
Hope this helps.11-23-2008 08:59 PM
<aspects>
<aspect name="bpm_NTISgroupAssignees">
<associations>
<association name="bpm_NTISgroupAssignees">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:person</class>
<mandatory>true</mandatory>
<many>false</many>
</target>
</association>
</associations>
</aspect>
</aspects>
I saw it in GUI of Webclient but i have that error. I check for 3 Node with use Foreach in every Node I will the same error. Thanks!
11-24-2008 01:53 AM
<target>
<class>cm:person</class>
<mandatory>true</mandatory>
<many>false</many>
</target>
11-24-2008 03:59 AM
<aspect name="bpm:NTISgroupAssignees">
<associations>
<association name="bpm:NTISgroupAssignees">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<!– TODO: Refactor when group is pulled into content model –>
<class>cm:person</class>
<mandatory>true</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
11-24-2008 04:04 AM
11-25-2008 03:07 AM
<node name="nodeapproved">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getMembers(bpm_groupAssignee)}</foreach>
<var>user</var>
</action>
<transition to="adhoc"></transition>
</node>
<task name="wf:adhocTask" >
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{user}</actor>
</assignment>
</task>
11-26-2008 03:59 AM
<swimlane name="assignee">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactors>#{bpm_groupAssignee}</pooledactors>
</assignment>
</swimlane>
12-10-2008 10:44 PM
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
<var>user</var>
</action>
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:adhoc">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitAdhocTask" swimlane="initiator" />
<transition name="start" to="node1" />
</start-state>
<task-node name="adhoc">
<task name="wf:adhocTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{user}</actor>
</assignment>
</task>
<transition name="view" to="node2"></transition>
</task-node>
<task-node name="completed">
<task name="wf:completedAdhocTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{user}</actor>
</assignment>
</task>
<transition name="" to="end"/>
</task-node>
<node name="node1">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
<var>user</var>
</action>
<transition to="adhoc"></transition>
</node>
<node name="node2">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
<var>user</var>
</action>
<transition to="viewed"></transition>
</node>
<task-node name="viewed">
<task name="wf:viewedAdhocTask">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{user}</actor>
</assignment>
</task>
<transition name="completed" to="node3"></transition>
</task-node>
<node name="node3">
<action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
<foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
<var>user</var>
</action>
<transition to="completed"></transition>
</node>
<end-state name="end" />
</process-definition>
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.