User: admin@spiffworkflow.org clicked save for playground/tencent/pairing-with-dan-and-alex/main.bpmn

This commit is contained in:
sartography-automated-committer 2023-08-14 18:43:05 +00:00
parent 8b6c18a8e0
commit 5f2ecc38e2

View File

@ -20,13 +20,61 @@
<bpmn:flowNodeRef>Activity_0c72gmg</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_1l8m0lz" name="approvers_two">
<bpmn:flowNodeRef>Gateway_1jml3b2</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_0nhehc8</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Activity_1uwpon2</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:scriptTask id="Activity_0u39yj2" name="set lane owners">
<bpmn:extensionElements>
<spiffworkflow:unitTests>
<spiffworkflow:unitTest id="sanity_check">
<spiffworkflow:inputJson>{
"approvers": [
"dan@sartography.com"
]
}</spiffworkflow:inputJson>
<spiffworkflow:expectedOutputJson>{
"approvers": [
"dan@sartography.com"
],
"lane_owners": {
"approvers_one": [
"dan@sartography.com"
]
}
}</spiffworkflow:expectedOutputJson>
</spiffworkflow:unitTest>
<spiffworkflow:unitTest id="sanity_check_two">
<spiffworkflow:inputJson>{
"approvers": [
"dan@sartography.com",
"dingli@gmail.com"
]
}</spiffworkflow:inputJson>
<spiffworkflow:expectedOutputJson>{
"approvers": [
"dan@sartography.com",
"dingli@gmail.com"
],
"lane_owners": {
"approvers_one": [
"dan@sartography.com"
],
"approvers_two": [
"dingli@gmail.com"
]
}
}</spiffworkflow:expectedOutputJson>
</spiffworkflow:unitTest>
</spiffworkflow:unitTests>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0gi8bwf</bpmn:incoming>
<bpmn:outgoing>Flow_0qdzj5v</bpmn:outgoing>
<bpmn:script>lane_owners = {"approvers_one": approvers}</bpmn:script>
<bpmn:script>lane_owners = {"approvers_one": [approvers[0]]}
if len(approvers) &gt; 1:
lane_owners["approvers_two"] = [approvers[1]]</bpmn:script>
</bpmn:scriptTask>
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_130ey79</bpmn:outgoing>
@ -54,21 +102,21 @@
<bpmn:sequenceFlow id="Flow_130ey79" sourceRef="StartEvent_1" targetRef="Activity_19x8z4q" />
<bpmn:sequenceFlow id="Flow_1gfzcde" sourceRef="Activity_19x8z4q" targetRef="Activity_0wl95bx" />
<bpmn:sequenceFlow id="Flow_0pjve0h" sourceRef="Gateway_0jycv6k" targetRef="Activity_1kdx24p" />
<bpmn:sequenceFlow id="Flow_0ejuqyx" sourceRef="Gateway_0jycv6k" targetRef="Activity_1uwpon2" />
<bpmn:sequenceFlow id="Flow_0ejuqyx" sourceRef="Gateway_0jycv6k" targetRef="Gateway_1jml3b2" />
<bpmn:parallelGateway id="Gateway_0jycv6k">
<bpmn:incoming>Flow_0qdzj5v</bpmn:incoming>
<bpmn:outgoing>Flow_0pjve0h</bpmn:outgoing>
<bpmn:outgoing>Flow_0ejuqyx</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:sequenceFlow id="Flow_1brfsjf" sourceRef="Activity_1uwpon2" targetRef="Gateway_0fp8qlg" />
<bpmn:sequenceFlow id="Flow_1brfsjf" sourceRef="Activity_1uwpon2" targetRef="Gateway_0nhehc8" />
<bpmn:parallelGateway id="Gateway_0fp8qlg">
<bpmn:incoming>Flow_12aqem8</bpmn:incoming>
<bpmn:incoming>Flow_1brfsjf</bpmn:incoming>
<bpmn:incoming>Flow_1k5uue7</bpmn:incoming>
<bpmn:outgoing>Flow_1l5hvh4</bpmn:outgoing>
</bpmn:parallelGateway>
<bpmn:sequenceFlow id="Flow_1cfkj9x" sourceRef="Gateway_1vfdi2v" targetRef="Event_1dt5ijd" />
<bpmn:sequenceFlow id="Flow_0e6s3lk" sourceRef="Gateway_1vfdi2v" targetRef="Event_1mrcpko">
<bpmn:conditionExpression>do_you_approve == "rejected"</bpmn:conditionExpression>
<bpmn:conditionExpression>approved</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1l5hvh4" sourceRef="Gateway_0fp8qlg" targetRef="Activity_0c72gmg" />
<bpmn:exclusiveGateway id="Gateway_1vfdi2v" name="approved?" default="Flow_1cfkj9x">
@ -86,7 +134,7 @@
<bpmn:scriptTask id="Activity_0c72gmg" name="All Approved?">
<bpmn:incoming>Flow_1l5hvh4</bpmn:incoming>
<bpmn:outgoing>Flow_1etxa8x</bpmn:outgoing>
<bpmn:script>approval</bpmn:script>
<bpmn:script>approved = approval_one and approval_two </bpmn:script>
</bpmn:scriptTask>
<bpmn:userTask id="Activity_1kdx24p" name="Approve Request">
<bpmn:extensionElements>
@ -106,15 +154,30 @@ By clicking the button below you approve this request.
<bpmn:incoming>Flow_0pjve0h</bpmn:incoming>
<bpmn:outgoing>Flow_12aqem8</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Activity_1uwpon2" name="Approve Request">
<bpmn:exclusiveGateway id="Gateway_1jml3b2" name="has second approver?" default="Flow_03muudp">
<bpmn:incoming>Flow_0ejuqyx</bpmn:incoming>
<bpmn:outgoing>Flow_03muudp</bpmn:outgoing>
<bpmn:outgoing>Flow_1j9t6zx</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_03muudp" sourceRef="Gateway_1jml3b2" targetRef="Activity_1uwpon2" />
<bpmn:exclusiveGateway id="Gateway_0nhehc8">
<bpmn:incoming>Flow_1brfsjf</bpmn:incoming>
<bpmn:incoming>Flow_1j9t6zx</bpmn:incoming>
<bpmn:outgoing>Flow_1k5uue7</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1k5uue7" sourceRef="Gateway_0nhehc8" targetRef="Gateway_0fp8qlg" />
<bpmn:userTask id="Activity_1uwpon2" name="Approve Request">
<bpmn:incoming>Flow_03muudp</bpmn:incoming>
<bpmn:outgoing>Flow_1brfsjf</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_1j9t6zx" sourceRef="Gateway_1jml3b2" targetRef="Gateway_0nhehc8">
<bpmn:conditionExpression>len(approvers) == 1</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1gv878q">
<bpmndi:BPMNShape id="Participant_0m2fswd_di" bpmnElement="Participant_0m2fswd" isHorizontal="true">
<dc:Bounds x="-420" y="-80" width="1270" height="530" />
<dc:Bounds x="-420" y="-80" width="1270" height="570" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_1hrnzcs_di" bpmnElement="Lane_1hrnzcs" isHorizontal="true">
<dc:Bounds x="-390" y="110" width="1240" height="200" />
@ -124,7 +187,7 @@ By clicking the button below you approve this request.
<dc:Bounds x="-390" y="-80" width="1240" height="190" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_1l8m0lz_di" bpmnElement="Lane_1l8m0lz" isHorizontal="true">
<dc:Bounds x="-390" y="310" width="1240" height="140" />
<dc:Bounds x="-390" y="310" width="1240" height="180" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0dbxi08_di" bpmnElement="Activity_0u39yj2">
@ -171,10 +234,19 @@ By clicking the button below you approve this request.
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0o2c103_di" bpmnElement="Activity_1kdx24p">
<dc:Bounds x="90" y="170" width="100" height="80" />
<dc:Bounds x="110" y="170" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1jml3b2_di" bpmnElement="Gateway_1jml3b2" isMarkerVisible="true">
<dc:Bounds x="15" y="355" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="12" y="325" width="57" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0nhehc8_di" bpmnElement="Gateway_0nhehc8" isMarkerVisible="true">
<dc:Bounds x="235" y="355" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0p6bw0p_di" bpmnElement="Activity_1uwpon2">
<dc:Bounds x="90" y="340" width="100" height="80" />
<dc:Bounds x="100" y="340" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0gi8bwf_di" bpmnElement="Flow_0gi8bwf">
<di:waypoint x="-90" y="30" />
@ -185,7 +257,7 @@ By clicking the button below you approve this request.
<di:waypoint x="-20" y="85" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_12aqem8_di" bpmnElement="Flow_12aqem8">
<di:waypoint x="190" y="210" />
<di:waypoint x="210" y="210" />
<di:waypoint x="310" y="210" />
<di:waypoint x="310" y="135" />
</bpmndi:BPMNEdge>
@ -200,17 +272,16 @@ By clicking the button below you approve this request.
<bpmndi:BPMNEdge id="Flow_0pjve0h_di" bpmnElement="Flow_0pjve0h">
<di:waypoint x="-20" y="135" />
<di:waypoint x="-20" y="210" />
<di:waypoint x="90" y="210" />
<di:waypoint x="110" y="210" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ejuqyx_di" bpmnElement="Flow_0ejuqyx">
<di:waypoint x="-20" y="135" />
<di:waypoint x="-20" y="380" />
<di:waypoint x="90" y="380" />
<di:waypoint x="15" y="380" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1brfsjf_di" bpmnElement="Flow_1brfsjf">
<di:waypoint x="190" y="380" />
<di:waypoint x="310" y="380" />
<di:waypoint x="310" y="135" />
<di:waypoint x="200" y="380" />
<di:waypoint x="235" y="380" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1cfkj9x_di" bpmnElement="Flow_1cfkj9x">
<di:waypoint x="545" y="0" />
@ -230,6 +301,21 @@ By clicking the button below you approve this request.
<di:waypoint x="460" y="0" />
<di:waypoint x="495" y="0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_03muudp_di" bpmnElement="Flow_03muudp">
<di:waypoint x="65" y="380" />
<di:waypoint x="100" y="380" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1k5uue7_di" bpmnElement="Flow_1k5uue7">
<di:waypoint x="285" y="380" />
<di:waypoint x="310" y="380" />
<di:waypoint x="310" y="135" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1j9t6zx_di" bpmnElement="Flow_1j9t6zx">
<di:waypoint x="40" y="405" />
<di:waypoint x="40" y="460" />
<di:waypoint x="260" y="460" />
<di:waypoint x="260" y="405" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>