This repository was archived by the owner on Feb 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdecide-on-seasonal-drink.bpmn
More file actions
286 lines (286 loc) · 13.7 KB
/
Copy pathdecide-on-seasonal-drink.bpmn
File metadata and controls
286 lines (286 loc) · 13.7 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Web Modeler" exporterVersion="f45a2d4" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.1.0" camunda:diagramRelationId="4be84788-5290-4079-baee-c46bb52ee4af">
<bpmn:process id="SeasonalDrink" name="Seasonal Drink" isExecutable="true">
<bpmn:extensionElements>
<zeebe:userTaskForm id="userTaskForm_0hfvg3b">{
"components": [
{
"text": "# Lets find what drink you'd like\n",
"type": "text",
"id": "Field_1rp63cr"
},
{
"label": "Your Name",
"type": "textfield",
"id": "Field_0aqa0k1",
"key": "name"
},
{
"label": "Warm?",
"type": "checkbox",
"id": "Field_19o3mau",
"key": "warm",
"description": "Would you like a warm drink?"
},
{
"values": [
{
"label": "None",
"value": "None"
},
{
"label": "Some",
"value": "Some"
},
{
"label": "Lots",
"value": "Lots"
}
],
"label": "How much alcohol",
"type": "select",
"id": "Field_0mz0wq1",
"key": "alcohol"
},
{
"values": [
{
"label": "Australasia",
"value": "Australasia"
},
{
"label": "Europe",
"value": "Europe"
},
{
"label": "The Americas",
"value": "The Americas"
},
{
"label": "Africa",
"value": "Africa"
},
{
"label": "Asia",
"value": "Asia"
}
],
"label": "Region",
"type": "select",
"id": "Field_13clqxk",
"key": "region",
"description": "What part of the world would you like the drink to be from>"
},
{
"label": "Email Address",
"type": "textfield",
"id": "Field_0xn3j7p",
"key": "emailAddress",
"description": "What is your email address"
}
],
"schemaVersion": 5,
"exporter": {
"name": "Camunda Web Modeler",
"version": "36b94aa"
},
"type": "default",
"id": "Form_42b19276-fc36-4f01-8aea-24e15ca69ca1",
"executionPlatform": "Camunda Cloud",
"executionPlatformVersion": "8.1.0"
}</zeebe:userTaskForm>
<zeebe:userTaskForm id="userTaskForm_37sbfoo">{
"components": [
{
"text": "# Select the Drinks you'd like",
"type": "text",
"id": "Field_0s38u80"
},
{
"label": "Select the drink",
"type": "radio",
"id": "Field_175h3pg",
"key": "drinkChoice",
"valuesKey": "drinkList"
}
],
"schemaVersion": 5,
"exporter": {
"name": "Camunda Web Modeler",
"version": "6f76121"
},
"type": "default",
"id": "Form_0b922893-cae2-4569-b0f9-ab4efb6b007a",
"executionPlatform": "Camunda Cloud",
"executionPlatformVersion": "8.1.0"
}</zeebe:userTaskForm>
</bpmn:extensionElements>
<bpmn:startEvent id="StartEvent_1" name="Want to drink something">
<bpmn:outgoing>Flow_1iazfvs</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1iazfvs" sourceRef="StartEvent_1" targetRef="Activity_1iic5sk" />
<bpmn:userTask id="Activity_1iic5sk" name="Add Drink Criteria">
<bpmn:extensionElements>
<zeebe:formDefinition formKey="camunda-forms:bpmn:userTaskForm_0hfvg3b" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_1iazfvs</bpmn:incoming>
<bpmn:outgoing>Flow_0jq07fr</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_0jq07fr" sourceRef="Activity_1iic5sk" targetRef="Activity_1lq3mah" />
<bpmn:sequenceFlow id="Flow_00pgzmj" sourceRef="Activity_1lq3mah" targetRef="Gateway_1w1t4nl" />
<bpmn:endEvent id="Event_0ban7sk" name="Got something to drink">
<bpmn:incoming>Flow_105nl3f</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_105nl3f" sourceRef="Activity_0msrcm5" targetRef="Event_0ban7sk" />
<bpmn:serviceTask id="Activity_0msrcm5" name="Email Drink Details" zeebe:modelerTemplate="io.camunda.connectors.SendGrid.v2" zeebe:modelerTemplateIcon="data:image/svg+xml;utf8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M0.285706%205.40847H5.43837V10.5611H0.285706V5.40847Z%22%20fill%3D%22white%22%2F%3E%0A%3Cpath%20d%3D%22M0.285706%205.40847H5.43837V10.5611H0.285706V5.40847Z%22%20fill%3D%22%2399E1F4%22%2F%3E%0A%3Cpath%20d%3D%22M5.43837%2010.5611L10.5611%2010.5616V15.6844H5.43837V10.5611Z%22%20fill%3D%22white%22%2F%3E%0A%3Cpath%20d%3D%22M5.43837%2010.5611L10.5611%2010.5616V15.6844H5.43837V10.5611Z%22%20fill%3D%22%2399E1F4%22%2F%3E%0A%3Cpath%20d%3D%22M0.285706%2015.6846L5.43837%2015.6844V15.7143H0.285706V15.6846ZM0.285706%2010.5619H5.43837V15.6844L0.285706%2015.6846V10.5619Z%22%20fill%3D%22%231A82E2%22%2F%3E%0A%3Cpath%20d%3D%22M5.43837%200.285706H10.5611V5.40847H5.43837V0.285706ZM10.5616%205.43837H15.7143V10.5611H10.5616V5.43837Z%22%20fill%3D%22%2300B3E3%22%2F%3E%0A%3Cpath%20d%3D%22M5.43837%2010.5611L10.5611%2010.5616V5.40847H5.43837V10.5611Z%22%20fill%3D%22%23009DD9%22%2F%3E%0A%3Cpath%20d%3D%22M10.5611%200.285706H15.7143V5.40847H10.5611V0.285706Z%22%20fill%3D%22%231A82E2%22%2F%3E%0A%3Cpath%20d%3D%22M10.5611%205.40847H15.7143V5.43837H10.5616L10.5611%205.40847Z%22%20fill%3D%22%231A82E2%22%2F%3E%0A%3C%2Fsvg%3E">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:sendgrid:1" />
<zeebe:ioMapping>
<zeebe:input source="mail" target="unMappedFieldNotUseInModel.mailType" />
<zeebe:input source="secrets.sendgrid" target="apiKey" />
<zeebe:input source="Nele" target="from.name" />
<zeebe:input source="nele.uhlemann@camunda.com" target="from.email" />
<zeebe:input source="=name" target="to.name" />
<zeebe:input source="=emailAddress" target="to.email" />
<zeebe:input source="="Seasonal Drink"" target="content.subject" />
<zeebe:input source="text/plain" target="content.type" />
<zeebe:input source="="Your drink is "+drinksSelected[1].drinkname+" and it was recomended to you by " + drinksSelected[1].recommender + " For more information take a look here: "+drinksSelected[1].url" target="content.value" />
</zeebe:ioMapping>
<zeebe:taskHeaders />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0z5wvey</bpmn:incoming>
<bpmn:outgoing>Flow_105nl3f</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:businessRuleTask id="Activity_1lq3mah" name="Decide on drink">
<bpmn:extensionElements>
<zeebe:calledDecision decisionId="Decision_choose_drink" resultVariable="drinksSelected" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0jq07fr</bpmn:incoming>
<bpmn:outgoing>Flow_00pgzmj</bpmn:outgoing>
</bpmn:businessRuleTask>
<bpmn:exclusiveGateway id="Gateway_1w1t4nl" name="More than one drink?" default="Flow_0g122ks">
<bpmn:incoming>Flow_00pgzmj</bpmn:incoming>
<bpmn:outgoing>Flow_1cvkx36</bpmn:outgoing>
<bpmn:outgoing>Flow_0rzhgx2</bpmn:outgoing>
<bpmn:outgoing>Flow_0g122ks</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1cvkx36" name="No" sourceRef="Gateway_1w1t4nl" targetRef="Gateway_1yb109c">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=count(drinksSelected) = 1</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="Gateway_1yb109c">
<bpmn:incoming>Flow_1cvkx36</bpmn:incoming>
<bpmn:incoming>Flow_0ixkd1z</bpmn:incoming>
<bpmn:outgoing>Flow_0z5wvey</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0z5wvey" sourceRef="Gateway_1yb109c" targetRef="Activity_0msrcm5" />
<bpmn:sequenceFlow id="Flow_0rzhgx2" name="Yes" sourceRef="Gateway_1w1t4nl" targetRef="Activity_0s6x6n7">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=count(drinksSelected) > 1</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_0ixkd1z" sourceRef="Activity_0s6x6n7" targetRef="Gateway_1yb109c" />
<bpmn:userTask id="Activity_0s6x6n7" name="Select Drinks">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:input source="=({ "drinkNames": distinct values(for selection in drinksSelected return selection.drinkname), "result": for drink in drinkNames return { "value": drink, "label": drink } }).result" target="drinkList" />
<zeebe:output source="=({ "result": drinksSelected[drinkname = drinkChoice] }).result" target="drinksSelected" />
</zeebe:ioMapping>
<zeebe:formDefinition formKey="camunda-forms:bpmn:userTaskForm_37sbfoo" />
</bpmn:extensionElements>
<bpmn:incoming>Flow_0rzhgx2</bpmn:incoming>
<bpmn:outgoing>Flow_0ixkd1z</bpmn:outgoing>
</bpmn:userTask>
<bpmn:endEvent id="Event_1e88kh9">
<bpmn:incoming>Flow_0g122ks</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0g122ks" name="No matches" sourceRef="Gateway_1w1t4nl" targetRef="Event_1e88kh9" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="SeasonalDrink">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="150" y="210" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="137" y="253" width="64" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_11z156t_di" bpmnElement="Activity_1iic5sk">
<dc:Bounds x="240" y="188" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0ban7sk_di" bpmnElement="Event_0ban7sk">
<dc:Bounds x="1072" y="210" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1049" y="253" width="82" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0wmtihg_di" bpmnElement="Activity_0msrcm5">
<dc:Bounds x="900" y="188" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0x37u6n_di" bpmnElement="Activity_1lq3mah">
<dc:Bounds x="400" y="188" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1w1t4nl_di" bpmnElement="Gateway_1w1t4nl" isMarkerVisible="true">
<dc:Bounds x="545" y="203" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="485" y="276" width="70" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1yb109c_di" bpmnElement="Gateway_1yb109c" isMarkerVisible="true">
<dc:Bounds x="785" y="203" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_11n8htw_di" bpmnElement="Activity_0s6x6n7">
<dc:Bounds x="640" y="300" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1e88kh9_di" bpmnElement="Event_1e88kh9">
<dc:Bounds x="642" y="82" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1iazfvs_di" bpmnElement="Flow_1iazfvs">
<di:waypoint x="186" y="228" />
<di:waypoint x="240" y="228" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0jq07fr_di" bpmnElement="Flow_0jq07fr">
<di:waypoint x="340" y="228" />
<di:waypoint x="400" y="228" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_00pgzmj_di" bpmnElement="Flow_00pgzmj">
<di:waypoint x="500" y="228" />
<di:waypoint x="545" y="228" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_105nl3f_di" bpmnElement="Flow_105nl3f">
<di:waypoint x="1000" y="228" />
<di:waypoint x="1072" y="228" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1cvkx36_di" bpmnElement="Flow_1cvkx36">
<di:waypoint x="595" y="228" />
<di:waypoint x="785" y="228" />
<bpmndi:BPMNLabel>
<dc:Bounds x="683" y="210" width="14" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0z5wvey_di" bpmnElement="Flow_0z5wvey">
<di:waypoint x="835" y="228" />
<di:waypoint x="900" y="228" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0rzhgx2_di" bpmnElement="Flow_0rzhgx2">
<di:waypoint x="570" y="253" />
<di:waypoint x="570" y="340" />
<di:waypoint x="640" y="340" />
<bpmndi:BPMNLabel>
<dc:Bounds x="575" y="294" width="20" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0ixkd1z_di" bpmnElement="Flow_0ixkd1z">
<di:waypoint x="740" y="340" />
<di:waypoint x="810" y="340" />
<di:waypoint x="810" y="253" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0g122ks_di" bpmnElement="Flow_0g122ks">
<di:waypoint x="570" y="203" />
<di:waypoint x="570" y="100" />
<di:waypoint x="642" y="100" />
<bpmndi:BPMNLabel>
<dc:Bounds x="581" y="149" width="58" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>