-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathducks.bpmn
142 lines (142 loc) · 7.58 KB
/
ducks.bpmn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1ntgj7m" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
<bpmn:process id="duck_process" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="interview_client" />
<bpmn:sequenceFlow id="Flow_2" sourceRef="interview_client" targetRef="Activity_1jz3ih0" />
<bpmn:endEvent id="Event_0fj8eo7">
<bpmn:incoming>Flow_4</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_4" sourceRef="Activity_0fmjk85" targetRef="Event_0fj8eo7" />
<bpmn:userTask id="interview_client" name="Interview Client" camunda:formKey="duck_application">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="variety" label="What is your favorite kind of duck?" type="enum">
<camunda:value id="Mallard" name="Mallard" />
<camunda:value id="Wood_Duck" name="Wood Duck" />
<camunda:value id="Widgeon" name="Widgeon" />
<camunda:value id="Dead" name="Dead ducks" />
</camunda:formField>
<camunda:formField id="tolerant" label="I don't mind finding feathers and eggs in my home." type="boolean" />
</camunda:formData>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1</bpmn:incoming>
<bpmn:outgoing>Flow_2</bpmn:outgoing>
</bpmn:userTask>
<bpmn:scriptTask id="Activity_0fmjk85" name="Deliver real Duck">
<bpmn:incoming>Flow_06xo1t0</bpmn:incoming>
<bpmn:outgoing>Flow_4</bpmn:outgoing>
<bpmn:script>print("Delivering a Real Duck!")</bpmn:script>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="Gateway_0vqsmxy" name="will real duck be safe?">
<bpmn:incoming>Flow_1olpa6l</bpmn:incoming>
<bpmn:outgoing>Flow_06xo1t0</bpmn:outgoing>
<bpmn:outgoing>Flow_0wkvu0e</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_06xo1t0" name="is_safe == True" sourceRef="Gateway_0vqsmxy" targetRef="Activity_0fmjk85">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">is_safe == True</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0wkvu0e" name="is_safe == False" sourceRef="Gateway_0vqsmxy" targetRef="Activity_0mwove7">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">is_safe == False</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:endEvent id="Event_1pkdfjl">
<bpmn:incoming>Flow_0wmf1w5</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0wmf1w5" sourceRef="Activity_0mwove7" targetRef="Event_1pkdfjl" />
<bpmn:sequenceFlow id="Flow_1olpa6l" sourceRef="Activity_1jz3ih0" targetRef="Gateway_0vqsmxy" />
<bpmn:scriptTask id="Activity_1jz3ih0" name="Determine Duck Worthiness">
<bpmn:incoming>Flow_2</bpmn:incoming>
<bpmn:outgoing>Flow_1olpa6l</bpmn:outgoing>
<bpmn:script>if not tolerant or variety == 'Dead':
is_safe = False
else:
is_safe = True
</bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="Activity_0mwove7" name="Deliver Decoy Duck">
<bpmn:incoming>Flow_0wkvu0e</bpmn:incoming>
<bpmn:outgoing>Flow_0wmf1w5</bpmn:outgoing>
<bpmn:script>print("Just Delivering a Decoy Duck, you can't kill it!")</bpmn:script>
</bpmn:scriptTask>
<bpmn:textAnnotation id="TextAnnotation_1183juq">
<bpmn:text>Receive Request for Duck</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_1ae1me3" sourceRef="StartEvent_1" targetRef="TextAnnotation_1183juq" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="duck_process">
<bpmndi:BPMNShape id="TextAnnotation_1183juq_di" bpmnElement="TextAnnotation_1183juq">
<dc:Bounds x="250" y="80" width="100" height="54" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_10fi2h2_di" bpmnElement="Flow_4">
<di:waypoint x="750" y="150" />
<di:waypoint x="832" y="150" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_05jq9uf_di" bpmnElement="Flow_2">
<di:waypoint x="330" y="210" />
<di:waypoint x="370" y="210" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0k4fjav_di" bpmnElement="Flow_1">
<di:waypoint x="188" y="210" />
<di:waypoint x="230" y="210" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_06xo1t0_di" bpmnElement="Flow_06xo1t0">
<di:waypoint x="540" y="185" />
<di:waypoint x="540" y="150" />
<di:waypoint x="650" y="150" />
<bpmndi:BPMNLabel>
<dc:Bounds x="552" y="133" width="77" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0wkvu0e_di" bpmnElement="Flow_0wkvu0e">
<di:waypoint x="540" y="235" />
<di:waypoint x="540" y="280" />
<di:waypoint x="650" y="280" />
<bpmndi:BPMNLabel>
<dc:Bounds x="549" y="283" width="81" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0wmf1w5_di" bpmnElement="Flow_0wmf1w5">
<di:waypoint x="750" y="280" />
<di:waypoint x="832" y="280" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1olpa6l_di" bpmnElement="Flow_1olpa6l">
<di:waypoint x="470" y="210" />
<di:waypoint x="515" y="210" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Gateway_0vqsmxy_di" bpmnElement="Gateway_0vqsmxy" isMarkerVisible="true">
<dc:Bounds x="515" y="185" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="575" y="196" width="78" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_127rgpv_di" bpmnElement="Activity_0fmjk85">
<dc:Bounds x="650" y="110" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0fj8eo7_di" bpmnElement="Event_0fj8eo7">
<dc:Bounds x="832" y="132" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="152" y="192" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1n58cog_di" bpmnElement="interview_client">
<dc:Bounds x="230" y="170" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0i9k91k_di" bpmnElement="Activity_1jz3ih0">
<dc:Bounds x="370" y="170" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1jv20eg_di" bpmnElement="Activity_0mwove7">
<dc:Bounds x="650" y="240" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1pkdfjl_di" bpmnElement="Event_1pkdfjl">
<dc:Bounds x="832" y="262" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_1ae1me3_di" bpmnElement="Association_1ae1me3">
<di:waypoint x="184" y="199" />
<di:waypoint x="262" y="134" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>