As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<?xml version="1.0" encoding="UTF-8" ?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org"> <process id="activitiReview" name="Review And Approve Activiti Process"> <startEvent id="start" activiti:formKey="wf:submitReviewTask" /> <sequenceFlow id='flow1' sourceRef='start' targetRef='reviewTask' /> <userTask id="reviewTask" name="Review Task" activiti:formKey="wf:activitiReviewTask"> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string> if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; </activiti:string> </activiti:field> </activiti:taskListener> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string> execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome')); </activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${bpm_assignee.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer> </userTask> <sequenceFlow id='flow2' sourceRef='reviewTask' targetRef='reviewDecision' /> <exclusiveGateway id="reviewDecision" name="Review Decision" /> <sequenceFlow id='flow3' sourceRef='reviewDecision' targetRef='approved' > <conditionExpression xsi:type="tFormalExpression">${wf_reviewOutcome == 'Approve'}</conditionExpression> </sequenceFlow> <sequenceFlow id='flow4' sourceRef='reviewDecision' targetRef='rejected' /> <userTask id="approved" name="Document Approved" activiti:formKey="wf:approvedTask" > <documentation> The document was reviewed and approved. </documentation> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string> if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; </activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${initiator.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer> </userTask> <userTask id="rejected" name="Document Rejected" activiti:formKey="wf:rejectedTask" > <documentation> The document was reviewed and rejected. </documentation> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string> if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; </activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${initiator.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer> </userTask> <sequenceFlow id='flow5' sourceRef='approved' targetRef='end' /> <sequenceFlow id='flow6' sourceRef='rejected' targetRef='end' /> <endEvent id="end" /> </process> <!– Graphical representaion of diagram –> <bpmndi:BPMNDiagram id="BPMNDiagram_activitiReview"> <bpmndi:BPMNPlane bpmnElement="activitiReview" id="BPMNPlane_activitiReview"> <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start"> <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewTask" id="BPMNShape_reviewTask"> <omgdc:Bounds height="55" width="105" x="125" y="190"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewDecision" id="BPMNShape_reviewDecision"> <omgdc:Bounds height="40" width="40" x="290" y="197"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="approved" id="BPMNShape_approved"> <omgdc:Bounds height="55" width="105" x="390" y="97"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="rejected" id="BPMNShape_rejected"> <omgdc:Bounds height="55" width="105" x="390" y="297"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end"> <omgdc:Bounds height="35" width="35" x="555" y="307"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="65" y="217"></omgdi:waypoint> <omgdi:waypoint x="125" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="230" y="217"></omgdi:waypoint> <omgdi:waypoint x="290" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"> <omgdi:waypoint x="310" y="197"></omgdi:waypoint> <omgdi:waypoint x="310" y="124"></omgdi:waypoint> <omgdi:waypoint x="390" y="124"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4"> <omgdi:waypoint x="310" y="237"></omgdi:waypoint> <omgdi:waypoint x="310" y="324"></omgdi:waypoint> <omgdi:waypoint x="390" y="324"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5"> <omgdi:waypoint x="495" y="124"></omgdi:waypoint> <omgdi:waypoint x="572" y="124"></omgdi:waypoint> <omgdi:waypoint x="572" y="307"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6"> <omgdi:waypoint x="495" y="324"></omgdi:waypoint> <omgdi:waypoint x="555" y="324"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
<humanPerformer> <resourceAssignmentExpression> <formalExpression>${initiator.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer>
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org"> <process id="reviewTest" name="Review And Approve Test"> <startEvent id="start" name="Start" activiti:formKey="wf:submitReviewTask"></startEvent> <userTask id="reviewTask" name="Review Task" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wf:activitiReviewTask"> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:taskListener> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string>execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));</activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> </userTask> <exclusiveGateway id="reviewDecision" name="Review Decision"></exclusiveGateway> <endEvent id="end" name="End"></endEvent> <sequenceFlow id="flow1" name="" sourceRef="start" targetRef="reviewTask"></sequenceFlow> <sequenceFlow id="flow2" name="" sourceRef="reviewTask" targetRef="reviewDecision"></sequenceFlow> <sequenceFlow id="flow7" name="Approve" sourceRef="reviewDecision" targetRef="end"> <extensionElements> <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:executionListener> </extensionElements> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="flow8" name="Reject" sourceRef="reviewDecision" targetRef="end"> <extensionElements> <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:executionListener> </extensionElements> </sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_reviewTest"> <bpmndi:BPMNPlane bpmnElement="reviewTest" id="BPMNPlane_reviewTest"> <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start"> <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewTask" id="BPMNShape_reviewTask"> <omgdc:Bounds height="55" width="105" x="105" y="190"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewDecision" id="BPMNShape_reviewDecision"> <omgdc:Bounds height="40" width="40" x="250" y="197"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end"> <omgdc:Bounds height="35" width="35" x="475" y="207"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="65" y="217"></omgdi:waypoint> <omgdi:waypoint x="105" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="210" y="217"></omgdi:waypoint> <omgdi:waypoint x="250" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7"> <omgdi:waypoint x="270" y="197"></omgdi:waypoint> <omgdi:waypoint x="270" y="176"></omgdi:waypoint> <omgdi:waypoint x="492" y="176"></omgdi:waypoint> <omgdi:waypoint x="492" y="207"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"> <omgdi:waypoint x="270" y="237"></omgdi:waypoint> <omgdi:waypoint x="270" y="275"></omgdi:waypoint> <omgdi:waypoint x="492" y="275"></omgdi:waypoint> <omgdi:waypoint x="492" y="242"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
<userTask id="approved" name="Document Approved" activiti:formKey="wf:approvedTask" > <documentation> The document was reviewed and approved. </documentation> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string> if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; </activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> <humanPerformer> <resourceAssignmentExpression> <formalExpression>${initiator.properties.userName}</formalExpression> </resourceAssignmentExpression> </humanPerformer> </userTask>
<sequenceFlow id="flow7" name="Approve" sourceRef="reviewDecision" targetRef="end"> <extensionElements> <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:executionListener> </extensionElements> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression> </sequenceFlow>
<serviceTask id="approved" name="Document Approved" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"> <documentation> The document was reviewed and approved. </documentation> <extensionElements> <activiti:field name="runAs"> <activiti:string>System</activiti:string> </activiti:field> <activiti:field name="script"> <activiti:string> if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; </activiti:string> </activiti:field> </extensionElements> </serviceTask>
<?xml version="1.0" encoding="ASCII"?> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL-XMI" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms"> <pi:Diagram visible="true" gridUnit="10" diagramTypeId="BPMNdiagram" name="reviewTest" snapToGrid="true" showGuides="true" pictogramLinks="/0/@children.0/@link /0/@children.1/@link /0/@children.1/@children.0/@link /0/@children.2/@link /0/@children.3/@link /0/@connections.0/@link /0/@connections.1/@link /0/@connections.2/@link /0/@connections.3/@link /0/@children.4/@link /0/@children.4/@children.0/@link /0/@connections.4/@link /0/@children.5/@link /0/@children.5/@children.0/@link /0/@connections.5/@link"> <graphicsAlgorithm xsi:type="al:Rectangle" background="/0/@colors.1" foreground="/0/@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> <children xsi:type="pi:ContainerShape" visible="true" active="true"> <graphicsAlgorithm xsi:type="al:Ellipse" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="35" height="35" x="30" y="200"> <graphicsAlgorithmChildren xsi:type="al:Ellipse" lineWidth="1" transparency="0.0" width="35" height="35" style="/0/@styles.0"/> </graphicsAlgorithm> <link businessObjects="start"/> <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.0"/> <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="1.0" relativeHeight="0.51"> <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/> </anchors> <children visible="true"> <graphicsAlgorithm xsi:type="al:Image" lineWidth="1" transparency="0.0" width="16" height="16" x="10" y="10" id="org.activiti.designer.alfresco.logo" stretchH="false" stretchV="false" proportional="false"/> </children> </children> <children xsi:type="pi:ContainerShape" visible="true" active="true"> <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="105" height="55" x="105" y="190"> <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" lineWidth="1" transparency="0.0" width="105" height="55" style="/0/@styles.1" cornerHeight="20" cornerWidth="20"/> </graphicsAlgorithm> <link businessObjects="reviewTask"/> <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.1" incomingConnections="/0/@connections.0"/> <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="1.0" relativeHeight="0.51"> <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/> </anchors> <children visible="true"> <graphicsAlgorithm xsi:type="al:MultiText" lineWidth="1" transparency="0.0" width="105" height="30" y="20" style="/0/@styles.1" font="/0/@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Review Task"/> <link businessObjects="reviewTask"/> </children> <children visible="true"> <graphicsAlgorithm xsi:type="al:Image" lineWidth="1" transparency="0.0" width="16" height="16" x="5" y="5" id="org.activiti.designer.usertask" stretchH="false" stretchV="false" proportional="false"/> </children> <children visible="true"> <graphicsAlgorithm xsi:type="al:Image" lineWidth="1" transparency="0.0" width="16" height="16" x="85" y="3" id="org.activiti.designer.alfresco.logo" stretchH="false" stretchV="false" proportional="false"/> </children> </children> <children xsi:type="pi:ContainerShape" visible="true" active="true"> <graphicsAlgorithm xsi:type="al:Polygon" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="250" y="197"> <graphicsAlgorithmChildren xsi:type="al:Polygon" lineWidth="1" transparency="0.0" width="40" height="40" style="/0/@styles.0"> <points y="20"/> <points x="20"/> <points x="40" y="20"/> <points x="20" y="40"/> <points y="20"/> </graphicsAlgorithmChildren> <points y="20"/> <points x="20"/> <points x="40" y="20"/> <points x="20" y="40"/> <points y="20"/> </graphicsAlgorithm> <link businessObjects="reviewDecision"/> <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.2 /0/@connections.3" incomingConnections="/0/@connections.1"/> <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="0.51" relativeHeight="0.1"> <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/> </anchors> <anchors xsi:type="pi:ChopboxAnchor"/> <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="0.51" relativeHeight="0.93"> <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/> </anchors> <children visible="true"> <graphicsAlgorithm xsi:type="al:Polyline" lineWidth="5" filled="false" transparency="0.0" style="/0/@styles.0"> <points x="30" y="10"/> <points x="10" y="30"/> </graphicsAlgorithm> </children> <children visible="true"> <graphicsAlgorithm xsi:type="al:Polyline" lineWidth="5" filled="false" transparency="0.0" style="/0/@styles.0"> <points x="10" y="10"/> <points x="30" y="30"/> </graphicsAlgorithm> </children> </children> <children xsi:type="pi:ContainerShape" visible="true" active="true"> <graphicsAlgorithm xsi:type="al:Ellipse" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="35" height="35" x="475" y="207"> <graphicsAlgorithmChildren xsi:type="al:Ellipse" lineWidth="3" transparency="0.0" width="35" height="35" style="/0/@styles.0"/> </graphicsAlgorithm> <link businessObjects="end"/> <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="/0/@connections.4 /0/@connections.5"/> </children> <children xsi:type="pi:ContainerShape" visible="true" active="true"> <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="105" height="55" x="330" y="146"> <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" lineWidth="1" transparency="0.0" width="105" height="55" style="/0/@styles.1" cornerHeight="20" cornerWidth="20"/> </graphicsAlgorithm> <link businessObjects="servicetask1"/> <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.4" incomingConnections="/0/@connections.2"/> <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="1.0" relativeHeight="0.51"> <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/> </anchors> <children visible="true"> <graphicsAlgorithm xsi:type="al:MultiText" lineWidth="1" transparency="0.0" width="105" height="30" y="20" style="/0/@styles.1" font="/0/@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Approve Service Task"/> <link businessObjects="servicetask1"/> </children> <children visible="true"> <graphicsAlgorithm xsi:type="al:Image" lineWidth="1" transparency="0.0" width="16" height="16" x="5" y="5" id="org.activiti.designer.servicetask" stretchH="false" stretchV="false" proportional="false"/> </children> </children> <children xsi:type="pi:ContainerShape" visible="true" active="true"> <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="105" height="55" x="330" y="244"> <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" lineWidth="1" transparency="0.0" width="105" height="55" style="/0/@styles.1" cornerHeight="20" cornerWidth="20"/> </graphicsAlgorithm> <link businessObjects="servicetask2"/> <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.5" incomingConnections="/0/@connections.3"/> <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.5/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="1.0" relativeHeight="0.51"> <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/> </anchors> <children visible="true"> <graphicsAlgorithm xsi:type="al:MultiText" lineWidth="1" transparency="0.0" width="105" height="30" y="20" style="/0/@styles.1" font="/0/@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Reject Service Task"/> <link businessObjects="servicetask2"/> </children> <children visible="true"> <graphicsAlgorithm xsi:type="al:Image" lineWidth="1" transparency="0.0" width="16" height="16" x="5" y="5" id="org.activiti.designer.servicetask" stretchH="false" stretchV="false" proportional="false"/> </children> </children> <styles foreground="/0/@colors.2" lineWidth="20" id="EVENT"> <renderingStyle> <adaptedGradientColoredAreas definedStyleId="bpmnEventStyle" gradientType="0"> <adaptedGradientColoredAreas styleAdaption="0"> <gradientColor> <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0"> <color red="250" green="251" blue="252"/> </start> <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0"> <color red="250" green="251" blue="252"/> </end> </gradientColor> </adaptedGradientColoredAreas> <adaptedGradientColoredAreas styleAdaption="0"> <gradientColor> <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0"> <color red="229" green="229" blue="194"/> </start> <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0"> <color red="229" green="229" blue="194"/> </end> </gradientColor> </adaptedGradientColoredAreas> <adaptedGradientColoredAreas styleAdaption="0"> <gradientColor> <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0"> <color red="229" green="229" blue="194"/> </start> <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0"> <color red="229" green="229" blue="194"/> </end> </gradientColor> </adaptedGradientColoredAreas> </adaptedGradientColoredAreas> </renderingStyle> </styles> <styles foreground="/0/@colors.2" lineWidth="20" id="TASK"> <renderingStyle> <adaptedGradientColoredAreas definedStyleId="bpmnTaskStyle" gradientType="0"> <adaptedGradientColoredAreas styleAdaption="0"> <gradientColor> <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0"> <color red="250" green="251" blue="252"/> </start> <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0"> <color red="255" green="255" blue="204"/> </end> </gradientColor> </adaptedGradientColoredAreas> <adaptedGradientColoredAreas styleAdaption="0"> <gradientColor> <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0"> <color red="229" green="229" blue="194"/> </start> <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0"> <color red="229" green="229" blue="194"/> </end> </gradientColor> </adaptedGradientColoredAreas> <adaptedGradientColoredAreas styleAdaption="0"> <gradientColor> <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0"> <color red="229" green="229" blue="194"/> </start> <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0"> <color red="229" green="229" blue="194"/> </end> </gradientColor> </adaptedGradientColoredAreas> </adaptedGradientColoredAreas> </renderingStyle> </styles> <styles background="/0/@colors.2" foreground="/0/@colors.2" lineWidth="1" id="BPMN-POLYGON-ARROW"/> <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.0/@anchors.0" end="/0/@children.1/@anchors.0"> <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.2" lineWidth="1" filled="false" transparency="0.0"/> <link businessObjects="flow1"/> <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> <graphicsAlgorithm xsi:type="al:Text" lineWidth="1" transparency="0.0" x="10" style="/0/@styles.1" font="/0/@fonts.0"/> </connectionDecorators> <connectionDecorators visible="true" locationRelative="true" location="1.0"> <graphicsAlgorithm xsi:type="al:Polygon" lineWidth="1" transparency="0.0" style="/0/@styles.2"> <points x="-10" y="-5" before="3" after="3"/> <points/> <points x="-10" y="5" before="3" after="3"/> <points x="-8" before="3" after="3"/> </graphicsAlgorithm> </connectionDecorators> </connections> <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.1/@anchors.0" end="/0/@children.2/@anchors.0"> <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.2" lineWidth="1" filled="false" transparency="0.0"/> <link businessObjects="flow2"/> <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> <graphicsAlgorithm xsi:type="al:Text" lineWidth="1" transparency="0.0" x="10" style="/0/@styles.1" font="/0/@fonts.0"/> </connectionDecorators> <connectionDecorators visible="true" locationRelative="true" location="1.0"> <graphicsAlgorithm xsi:type="al:Polygon" lineWidth="1" transparency="0.0" style="/0/@styles.2"> <points x="-10" y="-5" before="3" after="3"/> <points/> <points x="-10" y="5" before="3" after="3"/> <points x="-8" before="3" after="3"/> </graphicsAlgorithm> </connectionDecorators> </connections> <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.2/@anchors.0" end="/0/@children.4/@anchors.0"> <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.2" lineWidth="1" filled="false" transparency="0.0"/> <link businessObjects="flow7"/> <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> <graphicsAlgorithm xsi:type="al:Text" lineWidth="1" transparency="0.0" x="10" style="/0/@styles.1" font="/0/@fonts.0" value=""/> </connectionDecorators> <connectionDecorators visible="true" locationRelative="true" location="1.0"> <graphicsAlgorithm xsi:type="al:Polygon" lineWidth="1" transparency="0.0" style="/0/@styles.2"> <points x="-10" y="-5" before="3" after="3"/> <points/> <points x="-10" y="5" before="3" after="3"/> <points x="-8" before="3" after="3"/> </graphicsAlgorithm> </connectionDecorators> <bendpoints x="270" y="176"/> </connections> <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.2/@anchors.0" end="/0/@children.5/@anchors.0"> <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.2" lineWidth="1" filled="false" transparency="0.0"/> <link businessObjects="flow8"/> <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> <graphicsAlgorithm xsi:type="al:Text" lineWidth="1" transparency="0.0" x="10" style="/0/@styles.1" font="/0/@fonts.0" value=""/> </connectionDecorators> <connectionDecorators visible="true" locationRelative="true" location="1.0"> <graphicsAlgorithm xsi:type="al:Polygon" lineWidth="1" transparency="0.0" style="/0/@styles.2"> <points x="-10" y="-5" before="3" after="3"/> <points/> <points x="-10" y="5" before="3" after="3"/> <points x="-8" before="3" after="3"/> </graphicsAlgorithm> </connectionDecorators> <bendpoints x="270" y="275"/> </connections> <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.4/@anchors.0" end="/0/@children.3/@anchors.0"> <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.2" lineWidth="1" filled="false" transparency="0.0"/> <link businessObjects="flow9"/> <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> <graphicsAlgorithm xsi:type="al:Text" lineWidth="1" transparency="0.0" x="10" style="/0/@styles.1" font="/0/@fonts.0" value=""/> </connectionDecorators> <connectionDecorators visible="true" locationRelative="true" location="1.0"> <graphicsAlgorithm xsi:type="al:Polygon" lineWidth="1" transparency="0.0" style="/0/@styles.2"> <points x="-10" y="-5" before="3" after="3"/> <points/> <points x="-10" y="5" before="3" after="3"/> <points x="-8" before="3" after="3"/> </graphicsAlgorithm> </connectionDecorators> <bendpoints x="492" y="173"/> </connections> <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.5/@anchors.0" end="/0/@children.3/@anchors.0"> <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.2" lineWidth="1" filled="false" transparency="0.0"/> <link businessObjects="flow10"/> <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> <graphicsAlgorithm xsi:type="al:Text" lineWidth="1" transparency="0.0" x="10" style="/0/@styles.1" font="/0/@fonts.0" value=""/> </connectionDecorators> <connectionDecorators visible="true" locationRelative="true" location="1.0"> <graphicsAlgorithm xsi:type="al:Polygon" lineWidth="1" transparency="0.0" style="/0/@styles.2"> <points x="-10" y="-5" before="3" after="3"/> <points/> <points x="-10" y="5" before="3" after="3"/> <points x="-8" before="3" after="3"/> </graphicsAlgorithm> </connectionDecorators> <bendpoints x="492" y="271"/> </connections> <colors red="227" green="238" blue="249"/> <colors red="255" green="255" blue="255"/> <colors/> <fonts name="Arial" size="8"/> </pi:Diagram> <bpmn2:Process id="reviewTest" name="Review And Approve Test" namespace="http://alfresco.org"> <documentation id="documentation_process" text=""/> </bpmn2:Process> <bpmn2:AlfrescoStartEvent id="start" name="Start" outgoing="flow1" formKey="wf:submitReviewTask"/> <bpmn2:AlfrescoUserTask id="reviewTask" name="Review Task" incoming="flow1" outgoing="flow2" assignee="${bpm_assignee.properties.userName}" formKey="wf:activitiReviewTask"> <activitiListeners implementationType="alfrescoScriptType" implementation="if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;" event="create"/> <activitiListeners implementationType="alfrescoScriptType" implementation="execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));" event="complete"/> </bpmn2:AlfrescoUserTask> <bpmn2:ExclusiveGateway id="reviewDecision" name="Review Decision" incoming="flow2" outgoing="flow7 flow8"/> <bpmn2:EndEvent id="end" name="End" incoming="flow9 flow10"/> <bpmn2:SequenceFlow id="flow1" sourceRef="start" targetRef="reviewTask"/> <bpmn2:SequenceFlow id="flow2" sourceRef="reviewTask" targetRef="reviewDecision"/> <bpmn2:SequenceFlow id="flow7" name="" sourceRef="reviewDecision" targetRef="servicetask1"> <conditionExpression id="flow7_condition" body="${wf_reviewOutcome == 'Approve'}"/> </bpmn2:SequenceFlow> <bpmn2:SequenceFlow id="flow8" name="" sourceRef="reviewDecision" targetRef="servicetask2"/> <bpmn2:ServiceTask id="servicetask1" name="Approve Service Task" incoming="flow7" outgoing="flow9"> <activitiListeners implementationType="alfrescoScriptType" implementation="if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;" event="start" runAs="" scriptProcessor=""/> </bpmn2:ServiceTask> <bpmn2:SequenceFlow id="flow9" name="" sourceRef="servicetask1" targetRef="end"/> <bpmn2:ServiceTask id="servicetask2" name="Reject Service Task" incoming="flow8" outgoing="flow10"> <activitiListeners implementationType="alfrescoScriptType" implementation="if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;" event="start" runAs="" scriptProcessor=""/> </bpmn2:ServiceTask> <bpmn2:SequenceFlow id="flow10" name="" sourceRef="servicetask2" targetRef="end"/> </xmi:XMI>
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org"> <process id="reviewTest" name="Review And Approve Test"> <startEvent id="start" name="Start" activiti:formKey="wf:submitReviewTask"></startEvent> <userTask id="reviewTask" name="Review Task" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wf:activitiReviewTask"> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:taskListener> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string>execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));</activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> </userTask> <exclusiveGateway id="reviewDecision" name="Review Decision"></exclusiveGateway> <endEvent id="end" name="End"></endEvent> <sequenceFlow id="flow1" name="" sourceRef="start" targetRef="reviewTask"></sequenceFlow> <sequenceFlow id="flow2" name="" sourceRef="reviewTask" targetRef="reviewDecision"></sequenceFlow> <sequenceFlow id="flow7" name="Approve" sourceRef="reviewDecision" targetRef="end"> <extensionElements> <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:executionListener> </extensionElements> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="flow8" name="Reject" sourceRef="reviewDecision" targetRef="end"> <extensionElements> <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:executionListener> </extensionElements> </sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_reviewTest"> <bpmndi:BPMNPlane bpmnElement="reviewTest" id="BPMNPlane_reviewTest"> <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start"> <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewTask" id="BPMNShape_reviewTask"> <omgdc:Bounds height="55" width="105" x="105" y="190"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewDecision" id="BPMNShape_reviewDecision"> <omgdc:Bounds height="40" width="40" x="250" y="197"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end"> <omgdc:Bounds height="35" width="35" x="475" y="207"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="65" y="217"></omgdi:waypoint> <omgdi:waypoint x="105" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="210" y="217"></omgdi:waypoint> <omgdi:waypoint x="250" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7"> <omgdi:waypoint x="270" y="197"></omgdi:waypoint> <omgdi:waypoint x="270" y="176"></omgdi:waypoint> <omgdi:waypoint x="492" y="176"></omgdi:waypoint> <omgdi:waypoint x="492" y="207"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"> <omgdi:waypoint x="270" y="237"></omgdi:waypoint> <omgdi:waypoint x="270" y="275"></omgdi:waypoint> <omgdi:waypoint x="492" y="275"></omgdi:waypoint> <omgdi:waypoint x="492" y="242"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
Basing my learning on the out of box review.bpmn20.xml workflow I took the suggestion from @mitpatoliya to remove the User Tasks (Approved, Rejected) and route the decision directly to the End task. Here is the resulting definition:
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org"> <process id="reviewService" name="Review-Approve Service"> <startEvent id="start" name="Start" activiti:formKey="wf:submitReviewTask"></startEvent> <userTask id="reviewTask" name="Review Task" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wf:activitiReviewTask"> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:taskListener> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string>execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));</activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> </userTask> <exclusiveGateway id="reviewDecision" name="Review Decision"></exclusiveGateway> <endEvent id="end" name="End"></endEvent> <sequenceFlow id="flow1" name="" sourceRef="start" targetRef="reviewTask"></sequenceFlow> <sequenceFlow id="flow2" name="" sourceRef="reviewTask" targetRef="reviewDecision"></sequenceFlow> <sequenceFlow id="flow7" name="" sourceRef="reviewDecision" targetRef="servicetask1"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="flow8" name="" sourceRef="reviewDecision" targetRef="servicetask2"></sequenceFlow> <serviceTask id="servicetask1" name="Approve Service Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"> <extensionElements> <activiti:field name="runAs"> <activiti:string>System</activiti:string> </activiti:field> <activiti:field name="script"> <activiti:string> if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; </activiti:string> </activiti:field> </extensionElements> </serviceTask> <sequenceFlow id="flow9" name="" sourceRef="servicetask1" targetRef="end"></sequenceFlow> <serviceTask id="servicetask2" name="Reject Service Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"> <extensionElements> <activiti:field name="runAs"> <activiti:string>System</activiti:string> </activiti:field> <activiti:field name="script"> <activiti:string> if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; </activiti:string> </activiti:field> </extensionElements> </serviceTask> <sequenceFlow id="flow10" name="" sourceRef="servicetask2" targetRef="end"></sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_reviewService"> <bpmndi:BPMNPlane bpmnElement="reviewService" id="BPMNPlane_reviewService"> <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start"> <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewTask" id="BPMNShape_reviewTask"> <omgdc:Bounds height="55" width="105" x="105" y="190"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="reviewDecision" id="BPMNShape_reviewDecision"> <omgdc:Bounds height="40" width="40" x="250" y="197"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end"> <omgdc:Bounds height="35" width="35" x="475" y="207"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1"> <omgdc:Bounds height="55" width="105" x="330" y="146"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2"> <omgdc:Bounds height="55" width="105" x="330" y="244"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="65" y="217"></omgdi:waypoint> <omgdi:waypoint x="105" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="210" y="217"></omgdi:waypoint> <omgdi:waypoint x="250" y="217"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7"> <omgdi:waypoint x="270" y="197"></omgdi:waypoint> <omgdi:waypoint x="270" y="176"></omgdi:waypoint> <omgdi:waypoint x="330" y="173"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8"> <omgdi:waypoint x="270" y="237"></omgdi:waypoint> <omgdi:waypoint x="270" y="275"></omgdi:waypoint> <omgdi:waypoint x="330" y="271"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9"> <omgdi:waypoint x="435" y="173"></omgdi:waypoint> <omgdi:waypoint x="492" y="173"></omgdi:waypoint> <omgdi:waypoint x="492" y="207"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10"> <omgdi:waypoint x="435" y="271"></omgdi:waypoint> <omgdi:waypoint x="492" y="271"></omgdi:waypoint> <omgdi:waypoint x="492" y="242"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;</activiti:string> </activiti:field> </activiti:taskListener>