10-14-2009 10:00 PM
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="ncwf:reviewapprovePurchaseRequest">
<swimlane name="initiator"></swimlane>
<start-state name="Start">
<task name="ncwf:submitPurchaseRequestTask" swimlane="initiator"/>
<transition to="InitiateRequest"></transition>
<event type="task-end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<expression>
var requestShortDescription = taskInstance.getVariable("ncwf_requestShortDescription");
executionContext.setVariable("ncwf_requestShortDescription",requestShortDescription);
var department = taskInstance.getVariable("ncwf_department");
executionContext.setVariable("ncwf_department",department);
</expression>
</script>
</action>
</event>
</start-state>
<swimlane name="assignee">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<node name="InitiateRequest">
<transition to="Review" name="toReview"></transition>
</node>
<task-node name="Review">
<task name="ncwf:reviewPurchaseRequestTask" swimlane="assignee" />
<transition to="Approved" name="toApproved"> </transition>
<transition to="Rejected" name="toRejected"> </transition>
<event type="task-create">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<expression>
var department=executionContext.getVariable("ncwf_department");
taskInstance.setVariable("ncwf:department", department);
var requestShortDescription=executionContext.getVariable("ncwf_requestShortDescription");
taskInstance.setVariable("ncwf:requestShortDescription", requestShortDescription);
</expression>
</script>
</action>
</event>
</task-node>
<?xml version="1.0" encoding="UTF-8"?>
<model name="ncwf:wfModelPurchaseRequest" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Custom Workflow Model</description>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/workflow/nc/1.0" prefix="ncwf"/>
</namespaces>
<types>
<!– Basic Review & Approve Tasks –>
<!– –>
<type name="ncwf:submitPurchaseRequestTask">
<parent>bpm:startTask</parent>
<overrides>
<property name="bpm:packageActionGroup">
<default>add_package_item_actions</default>
</property>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
</overrides>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
<aspect>ncwf:requestData</aspect>
</mandatory-aspects>
</type>
<type name="ncwf:reviewPurchaseRequestTask">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
</overrides>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
<aspect>ncwf:requestData</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<aspect name="ncwf:requestData">
<properties>
<property name="ncwf:requestShortDescription">
<type>d:text</type>
<mandatory>true</mandatory>
<default></default>
</property>
<property name="ncwf:department">
<type>d:text</type>
<mandatory>true</mandatory>
<default></default>
<constraints>
<constraint type="LIST">
<parameter name="allowedValues">
<list>
<value>Information Technology</value>
<value>Marketing</value>
<value>Sales</value>
<value>Finance</value>
</list>
</parameter>
<parameter name="caseSensitive"><value>true</value></parameter>
</constraint>
</constraints>
</property>
<property name="ncwf:approvedAmount">
<type>d:int</type>
<mandatory>false</mandatory>
<default>0</default>
<constraints>
<constraint type="MINMAX">
<parameter name="minValue"><value>0</value></parameter>
<parameter name="maxValue"><value>999999</value></parameter>
</constraint>
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>
10-31-2009 09:44 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.