generated from camunda-community-hub/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspacetraders-deliver-contract-goods.bpmn
387 lines (387 loc) · 63.6 KB
/
spacetraders-deliver-contract-goods.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
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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<?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="4e488fc" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.3.0" camunda:diagramRelationId="80080f63-8a1f-406c-95cf-3ee310c54eed">
<bpmn:process id="space-traders-deliver-contract-goods" name="SpaceTraders Deliver contract goods" isExecutable="true">
<bpmn:extensionElements />
<bpmn:startEvent id="StartEvent_1" name="Deliver contract goods">
<bpmn:extensionElements />
<bpmn:outgoing>Flow_14sorii</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:endEvent id="Event_039o9rs" name="Contract fulfilled">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=true" target="contract_fulfilled" />
<zeebe:output source="=true" target="goods_delivered" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1c9inve</bpmn:incoming>
</bpmn:endEvent>
<bpmn:exclusiveGateway id="Gateway_1yzbhs3" name="Has delivered all goods?" default="Flow_0otnh62">
<bpmn:incoming>Flow_0s1e5t2</bpmn:incoming>
<bpmn:outgoing>Flow_0jkwsfe</bpmn:outgoing>
<bpmn:outgoing>Flow_0otnh62</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0jkwsfe" name="Yes" sourceRef="Gateway_1yzbhs3" targetRef="Activity_0x4r1kj">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=every trade_to_deliver in contract.terms.deliver satisfies trade_to_deliver.unitsFulfilled >= trade_to_deliver.unitsRequired</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1c9inve" sourceRef="Activity_0x4r1kj" targetRef="Event_039o9rs" />
<bpmn:endEvent id="Event_0buj847" name="Delivered goods">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=false" target="contract_fulfilled" />
<zeebe:output source="=true" target="goods_delivered" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0otnh62</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0otnh62" name="No" sourceRef="Gateway_1yzbhs3" targetRef="Event_0buj847" />
<bpmn:sequenceFlow id="Flow_14sorii" sourceRef="StartEvent_1" targetRef="Activity_04aurzq" />
<bpmn:exclusiveGateway id="Gateway_12bg5mf" name="Has goods to deliver?" default="Flow_1tc5yrh">
<bpmn:incoming>Flow_1sn75w4</bpmn:incoming>
<bpmn:outgoing>Flow_1wd0cgz</bpmn:outgoing>
<bpmn:outgoing>Flow_1tc5yrh</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_1sn75w4" sourceRef="Activity_04aurzq" targetRef="Gateway_12bg5mf" />
<bpmn:sequenceFlow id="Flow_1wd0cgz" name="Yes" sourceRef="Gateway_12bg5mf" targetRef="Activity_098u3y0">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=some good in cargo.inventory.symbol satisfies list contains(contract.terms.deliver.tradeSymbol, good)</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:subProcess id="Activity_009182e" name="Deliver contract goods for destinations">
<bpmn:incoming>Flow_0hj7dc4</bpmn:incoming>
<bpmn:outgoing>Flow_1mh7sk1</bpmn:outgoing>
<bpmn:multiInstanceLoopCharacteristics isSequential="true">
<bpmn:extensionElements>
<zeebe:loopCharacteristics inputCollection="=distinct values(contract.terms.deliver[list contains(cargo.inventory.symbol, tradeSymbol)].destinationSymbol)" inputElement="contract_destination" />
</bpmn:extensionElements>
</bpmn:multiInstanceLoopCharacteristics>
<bpmn:startEvent id="Event_0acqlks">
<bpmn:outgoing>Flow_08g5apu</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_08g5apu" sourceRef="Event_0acqlks" targetRef="Activity_1pq3s6x" />
<bpmn:endEvent id="Event_0907mye">
<bpmn:incoming>Flow_0r58khn</bpmn:incoming>
</bpmn:endEvent>
<bpmn:serviceTask id="Activity_1pq3s6x" name="Deliver contract goods" zeebe:modelerTemplate="com.camunda.SpaceTradersApi" zeebe:modelerTemplateVersion="5" zeebe:modelerTemplateIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAFsElEQVRYR+2WW2wUVRzGf2d2t9vthd6AllZKAVvEUqAFBOItQYKQNEATAlFDgiYC8YFo8IE3UUNIfFAfUKzQGhKUYNHAgwgaCWnjBVEEAq0SoVxaKNKLpbftbnfGnHNmdme3LRaffGCSzVz2zPm+833f/39GtNYutoRhIIT9MwyQ184z+zzis+h7AsuywDKxTBMr4ayej/JM/A8ILHIp4IGElTtKIATC8Gil1BihlZJn5M+KqaBWK++1IlgR9V+iOpgmorV2kRWb1IgRSLBBg2nw6LUiIcHtQ4IouW07XLJLsDgbLJN4AsIF7sqEVkQMA1eKRMG1AupQJDSRuEyMkhHRWiMt0ACJQXOvOia5HOeASwViAmgOjhUOiZgVipSjhB1M0VqzUGUgHswBcUvukIydJZzGFxLW8UGJIcHCYZPm9gjtQ8lM9AeZmimzoK1QSskMtNQ8pjMwgr/D/XbCp4OnHYiXQCrd1h3hxOBUmjJmQUERmBGevXyYxanNdhBjFomWvZKATHi8ClpmTcy5vnPX5PebITrumphARoqHKRN9TMv14zWU+Hx7K4P6ySvw5uVHvSkKCBY0vM+M7N5h/UK07F2gFIgCRonEpG5sGWJ/Qy8XroekcnGHvM1IMXh9dQ5NgRL+LK/CSPKR13OZzqSJhPzpLLHuUHqxmoyAtsbdtETLnvmWU8+JklsIPvt+gLof+zFt4NTUAOHwEIbHIDgw6ASfJyvLCVWuR3g8eAd7WXnqLb4Mzmda1TrmXfyKGZEzMe9dVSJufDxPK2BXgluN/Q1B6k4N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e+CChBrdiHsCxPSehqBxz+DdYvgpy0sYP/ewbGOJdU2P1hNsbXdKruGcL7mek/jn1A4IEC/wB+OnlF9mGuwgAAAABJRU5ErkJggg==">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:http-json:1" retries="10" />
<zeebe:ioMapping>
<zeebe:input source="placeholder" target="objects" />
<zeebe:input source="=contract.id" target="objects.deliverContract_contractId" />
<zeebe:input source="=current_ship" target="objects.deliverContract_deliverContractRequest.shipSymbol" />
<zeebe:input source="=deliver_good" target="objects.deliverContract_deliverContractRequest.tradeSymbol" />
<zeebe:input source="={ cargo_units: cargo.inventory[symbol = deliver_good][1].units, to_deliver: contract.terms.deliver[tradeSymbol = deliver_good][1], remaining_units: to_deliver.unitsRequired - to_deliver.unitsFulfilled, units_to_deliver: min(cargo_units, remaining_units) }.units_to_deliver" target="objects.deliverContract_deliverContractRequest.units" />
<zeebe:input source="bearer" target="authentication.type" />
<zeebe:input source="=token" target="authentication.token" />
<zeebe:input source="post" target="method" />
<zeebe:input source="="https://api.spacetraders.io/v2/my/contracts/" + string(objects.deliverContract_contractId) + "/deliver"" target="url" />
<zeebe:input source="={ }" target="queryParameters" />
<zeebe:input source="= objects.deliverContract_deliverContractRequest" target="body" />
</zeebe:ioMapping>
<zeebe:taskHeaders>
<zeebe:header key="category" value="contracts" />
<zeebe:header key="operation" value="deliverContract" />
<zeebe:header key="resultExpression" value="={ "contract": response.body.data.contract, "cargo": response.body.data.cargo }" />
<zeebe:header key="errorExpression" value="=if matches(error.code, "4\d\d") then { error_code: substring after(extract(error.message,"\"code\":\d{4}")[1], ":"), error_message: substring(extract(error.message, "\"message\":\"(\w|\d|\s|\.|\-)+")[1], 12), error_code_by_name: { "4000":"cooldownConflictError", "4001":"waypointNoAccessError", "4100":"tokenEmptyError", "4101":"tokenMissingSubjectError", "4102":"tokenInvalidSubjectError", "4103":"missingTokenRequestError", "4104":"invalidTokenRequestError", "4105":"invalidTokenSubjectError", "4106":"accountNotExistsError", "4107":"agentNotExistsError", "4108":"accountHasNoAgentError", "4109":"registerAgentExistsError", "4110":"registerAgentSymbolReservedError", "4111":"registerAgentConflictSymbolError", "4200":"navigateInTransitError", "4201":"navigateInvalidDestinationError", "4202":"navigateOutsideSystemError", "4203":"navigateInsufficientFuelError", "4204":"navigateSameDestinationError", "4205":"shipExtractInvalidWaypointError", "4206":"shipExtractPermissionError", "4207":"shipJumpNoSystemError", "4208":"shipJumpSameSystemError", "4210":"shipJumpMissingModuleError", "4211":"shipJumpNoValidWaypointError", "4212":"shipJumpMissingAntimatterError", "4214":"shipInTransitError", "4215":"shipMissingSensorArraysError", "4216":"purchaseShipCreditsError", "4217":"shipCargoExceedsLimitError", "4218":"shipCargoMissingError", "4219":"shipCargoUnitCountError", "4220":"shipSurveyVerificationError", "4221":"shipSurveyExpirationError", "4222":"shipSurveyWaypointTypeError", "4223":"shipSurveyOrbitError", "4224":"shipSurveyExhaustedError", "4225":"shipRefuelDockedError", "4226":"shipRefuelInvalidWaypointError", "4227":"shipMissingMountsError", "4228":"shipCargoFullError", "4229":"shipJumpFromGateToGateError", "4230":"waypointChartedError", "4231":"shipTransferShipNotFound", "4232":"shipTransferAgentConflict", "4233":"shipTransferSameShipConflict", "4234":"shipTransferLocationConflict", "4235":"warpInsideSystemError", "4236":"shipNotInOrbitError", "4237":"shipInvalidRefineryGoodError", "4238":"shipInvalidRefineryTypeError", "4239":"shipMissingRefineryError", "4240":"shipMissingSurveyorError", "4241":"shipMissingWarpDriveError", "4242":"shipMissingMineralProcessorError", "4243":"shipMissingMiningLasersError", "4244":"shipNotDockedError", "4245":"purchaseShipNotPresentError", "4246":"shipMountNoShipyardError", "4247":"shipMissingMountError", "4248":"shipMountInsufficientCreditsError", "4249":"shipMissingPowerError", "4250":"shipMissingSlotsError", "4251":"shipMissingMountsError", "4252":"shipMissingCrewError", "4253":"shipExtractDestabilizedError", "4254":"shipJumpInvalidOriginError", "4255":"shipJumpInvalidWaypointError", "4256":"shipJumpOriginUnderConstructionError", "4257":"shipMissingGasProcessorError", "4258":"shipMissingGasSiphonsError", "4259":"shipSiphonInvalidWaypointError", "4260":"shipSiphonPermissionError", "4261":"waypointNoYieldError", "4262":"shipJumpDestinationUnderConstructionError", "4500":"acceptContractNotAuthorizedError", "4501":"acceptContractConflictError", "4502":"fulfillContractDeliveryError", "4503":"contractDeadlineError", "4504":"contractFulfilledError", "4505":"contractNotAcceptedError", "4506":"contractNotAuthorizedError", "4508":"shipDeliverTermsError", "4509":"shipDeliverFulfilledError", "4510":"shipDeliverInvalidLocationError", "4511":"existingContractError", "4600":"marketTradeInsufficientCreditsError", "4601":"marketTradeNoPurchaseError", "4602":"marketTradeNotSoldError", "4603":"marketNotFoundError", "4604":"marketTradeUnitLimitError", "4700":"waypointNoFactionError", "4800":"constructionMaterialNotRequired", "4801":"constructionMaterialFulfilled", "4802":"shipConstructionInvalidLocationError" }, bpmn_error_code: get or else(get value(error_code_by_name, error_code), error_code), error_data: {error_code: error_code, error_message: error_message, error_name: bpmn_error_code}, bpmnError: bpmnError(bpmn_error_code, error_message, error_data) }.bpmnError else null" />
<zeebe:header key="retryBackoff" value="PT1S" />
</zeebe:taskHeaders>
<zeebe:properties>
<zeebe:property name="custom_error_handling" value="by_error_name" />
</zeebe:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_08g5apu</bpmn:incoming>
<bpmn:outgoing>Flow_0r58khn</bpmn:outgoing>
<bpmn:multiInstanceLoopCharacteristics isSequential="true">
<bpmn:extensionElements>
<zeebe:loopCharacteristics inputCollection="=contract.terms.deliver[destinationSymbol = contract_destination].tradeSymbol" inputElement="deliver_good" />
</bpmn:extensionElements>
</bpmn:multiInstanceLoopCharacteristics>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_0r58khn" sourceRef="Activity_1pq3s6x" targetRef="Event_0907mye" />
</bpmn:subProcess>
<bpmn:endEvent id="Event_1oh4kzd" name="No goods to deliver">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:output source="=false" target="contract_fulfilled" />
<zeebe:output source="=false" target="goods_delivered" />
</zeebe:ioMapping>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1tc5yrh</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_1tc5yrh" name="No" sourceRef="Gateway_12bg5mf" targetRef="Event_1oh4kzd" />
<bpmn:sequenceFlow id="Flow_1mh7sk1" sourceRef="Activity_009182e" targetRef="Gateway_0e9mesr" />
<bpmn:serviceTask id="Activity_04aurzq" name="Get ship cargo" zeebe:modelerTemplate="com.camunda.SpaceTradersApi" zeebe:modelerTemplateVersion="5" zeebe:modelerTemplateIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAFsElEQVRYR+2WW2wUVRzGf2d2t9vthd6AllZKAVvEUqAFBOItQYKQNEATAlFDgiYC8YFo8IE3UUNIfFAfUKzQGhKUYNHAgwgaCWnjBVEEAq0SoVxaKNKLpbftbnfGnHNmdme3LRaffGCSzVz2zPm+833f/39GtNYutoRhIIT9MwyQ184z+zzis+h7AsuywDKxTBMr4ayej/JM/A8ILHIp4IGElTtKIATC8Gil1BihlZJn5M+KqaBWK++1IlgR9V+iOpgmorV2kRWb1IgRSLBBg2nw6LUiIcHtQ4IouW07XLJLsDgbLJN4AsIF7sqEVkQMA1eKRMG1AupQJDSRuEyMkhHRWiMt0ACJQXOvOia5HOeASwViAmgOjhUOiZgVipSjhB1M0VqzUGUgHswBcUvukIydJZzGFxLW8UGJIcHCYZPm9gjtQ8lM9AeZmimzoK1QSskMtNQ8pjMwgr/D/XbCp4OnHYiXQCrd1h3hxOBUmjJmQUERmBGevXyYxanNdhBjFomWvZKATHi8ClpmTcy5vnPX5PebITrumphARoqHKRN9TMv14zWU+Hx7K4P6ySvw5uVHvSkKCBY0vM+M7N5h/UK07F2gFIgCRonEpG5sGWJ/Qy8XroekcnGHvM1IMXh9dQ5NgRL+LK/CSPKR13OZzqSJhPzpLLHuUHqxmoyAt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snONQYeNdb+UogGMV60exNwje3qh5vdgtJ8uNOjSzM/Uw840QS7T+ooBXzwdhUUZjsva/9HO8ZMQE7QO6j2LFKS4PZdSE+GFD988avg4Gl9v3WZxaOTRgdM/Oe+CChBrdiHsCxPSehqBxz+DdYvgpy0sYP/ewbGOJdU2P1hNsbXdKruGcL7mek/jn1A4IEC/wB+OnlF9mGuwgAAAABJRU5ErkJggg==">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:http-json:1" retries="10" />
<zeebe:ioMapping>
<zeebe:input source="placeholder" target="objects" />
<zeebe:input source="=current_ship" target="objects.getMyShipCargo_shipSymbol" />
<zeebe:input source="bearer" target="authentication.type" />
<zeebe:input source="=token" target="authentication.token" />
<zeebe:input source="get" target="method" />
<zeebe:input source="="https://api.spacetraders.io/v2/my/ships/" + string(objects.getMyShipCargo_shipSymbol) + "/cargo"" target="url" />
<zeebe:input source="={ }" target="queryParameters" />
</zeebe:ioMapping>
<zeebe:taskHeaders>
<zeebe:header key="category" value="fleet" />
<zeebe:header key="operation" value="getMyShipCargo" />
<zeebe:header key="resultExpression" value="={ "cargo": response.body.data, "ship_cargo": cargo }" />
<zeebe:header key="errorExpression" value="=if matches(error.code, "4\d\d") then { error_code: substring after(extract(error.message,"\"code\":\d{4}")[1], ":"), error_message: substring(extract(error.message, "\"message\":\"(\w|\d|\s|\.|\-)+")[1], 12), error_code_by_name: { "4000":"cooldownConflictError", "4001":"waypointNoAccessError", "4100":"tokenEmptyError", "4101":"tokenMissingSubjectError", "4102":"tokenInvalidSubjectError", "4103":"missingTokenRequestError", "4104":"invalidTokenRequestError", "4105":"invalidTokenSubjectError", "4106":"accountNotExistsError", "4107":"agentNotExistsError", "4108":"accountHasNoAgentError", "4109":"registerAgentExistsError", "4110":"registerAgentSymbolReservedError", "4111":"registerAgentConflictSymbolError", "4200":"navigateInTransitError", "4201":"navigateInvalidDestinationError", "4202":"navigateOutsideSystemError", "4203":"navigateInsufficientFuelError", "4204":"navigateSameDestinationError", "4205":"shipExtractInvalidWaypointError", "4206":"shipExtractPermissionError", "4207":"shipJumpNoSystemError", "4208":"shipJumpSameSystemError", "4210":"shipJumpMissingModuleError", "4211":"shipJumpNoValidWaypointError", "4212":"shipJumpMissingAntimatterError", "4214":"shipInTransitError", "4215":"shipMissingSensorArraysError", "4216":"purchaseShipCreditsError", "4217":"shipCargoExceedsLimitError", "4218":"shipCargoMissingError", "4219":"shipCargoUnitCountError", "4220":"shipSurveyVerificationError", "4221":"shipSurveyExpirationError", "4222":"shipSurveyWaypointTypeError", "4223":"shipSurveyOrbitError", "4224":"shipSurveyExhaustedError", "4225":"shipRefuelDockedError", "4226":"shipRefuelInvalidWaypointError", "4227":"shipMissingMountsError", "4228":"shipCargoFullError", "4229":"shipJumpFromGateToGateError", "4230":"waypointChartedError", "4231":"shipTransferShipNotFound", "4232":"shipTransferAgentConflict", "4233":"shipTransferSameShipConflict", "4234":"shipTransferLocationConflict", "4235":"warpInsideSystemError", "4236":"shipNotInOrbitError", "4237":"shipInvalidRefineryGoodError", "4238":"shipInvalidRefineryTypeError", "4239":"shipMissingRefineryError", "4240":"shipMissingSurveyorError", "4241":"shipMissingWarpDriveError", "4242":"shipMissingMineralProcessorError", "4243":"shipMissingMiningLasersError", "4244":"shipNotDockedError", "4245":"purchaseShipNotPresentError", "4246":"shipMountNoShipyardError", "4247":"shipMissingMountError", "4248":"shipMountInsufficientCreditsError", "4249":"shipMissingPowerError", "4250":"shipMissingSlotsError", "4251":"shipMissingMountsError", "4252":"shipMissingCrewError", "4253":"shipExtractDestabilizedError", "4254":"shipJumpInvalidOriginError", "4255":"shipJumpInvalidWaypointError", "4256":"shipJumpOriginUnderConstructionError", "4257":"shipMissingGasProcessorError", "4258":"shipMissingGasSiphonsError", "4259":"shipSiphonInvalidWaypointError", "4260":"shipSiphonPermissionError", "4261":"waypointNoYieldError", "4262":"shipJumpDestinationUnderConstructionError", "4500":"acceptContractNotAuthorizedError", "4501":"acceptContractConflictError", "4502":"fulfillContractDeliveryError", "4503":"contractDeadlineError", "4504":"contractFulfilledError", "4505":"contractNotAcceptedError", "4506":"contractNotAuthorizedError", "4508":"shipDeliverTermsError", "4509":"shipDeliverFulfilledError", "4510":"shipDeliverInvalidLocationError", "4511":"existingContractError", "4600":"marketTradeInsufficientCreditsError", "4601":"marketTradeNoPurchaseError", "4602":"marketTradeNotSoldError", "4603":"marketNotFoundError", "4604":"marketTradeUnitLimitError", "4700":"waypointNoFactionError", "4800":"constructionMaterialNotRequired", "4801":"constructionMaterialFulfilled", "4802":"shipConstructionInvalidLocationError" }, bpmn_error_code: get or else(get value(error_code_by_name, error_code), error_code), error_data: {error_code: error_code, error_message: error_message, error_name: bpmn_error_code}, bpmnError: bpmnError(bpmn_error_code, error_message, error_data) }.bpmnError else null" />
<zeebe:header key="retryBackoff" value="PT1S" />
</zeebe:taskHeaders>
<zeebe:properties>
<zeebe:property name="custom_error_handling" value="by_error_name" />
</zeebe:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_14sorii</bpmn:incoming>
<bpmn:outgoing>Flow_1sn75w4</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Activity_0x4r1kj" name="Fulfill contract" zeebe:modelerTemplate="com.camunda.SpaceTradersApi" zeebe:modelerTemplateVersion="5" zeebe:modelerTemplateIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAFsElEQVRYR+2WW2wUVRzGf2d2t9vthd6AllZKAVvEUqAFBOItQYKQNEATAlFDgiYC8YFo8IE3UUNIfFAfUKzQGhKUYNHAgwgaCWnjBVEEAq0SoVxaKNKLpbftbnfGnHNmdme3LRaffGCSzVz2zPm+833f/39GtNYutoRhIIT9MwyQ184z+zzis+h7AsuywDKxTBMr4ayej/JM/A8ILHIp4IGElTtKIATC8Gil1BihlZJn5M+KqaBWK++1IlgR9V+iOpgmorV2kRWb1IgRSLBBg2nw6LUiIcHtQ4IouW07XLJLsDgbLJN4AsIF7sq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WvL/Tz1iFfLPiIJSWBXqa2AQ0K32SFTcOkvmJxlqB6QHjDY/EmQzj6LVfN8LCvzcu6ayZ6Tg9FKeXrrRqzr16ivO66I7lzrZ8Yk2SJt70cgoQk4LV0GUV3HPjRu98DEdE3u6/MRMlMEj5d4GQjB1gNBbjuVYlnkL6zg1umzasWyTex72U+ydEAB61YdC6KdgSgBJ+5xW60GlgpeatOej0/TW3Ft/RBHz0eGFUlW9ji6Ou9S9pDgjdWO/5qEbsHxJRlTwD2VvctFP7dURqC7H6VAOAKNNy1qG0zl/+CQftldIa8u8/BEsati3MC2IuqdYQqMQEQF1PHJtQUHw/o76J2jES60wsPFk2m+0kphlsnONQYeNdb+UogGMV60exNwje3qh5vdgtJ8uNOjSzM/Uw840QS7T+ooBXzwdhUUZjsva/9HO8ZMQE7QO6j2LFKS4PZdSE+GFD988avg4Gl9v3WZxaOTRgdM/Oe+CChBrdiHsCxPSehqBxz+DdYvgpy0sYP/ewbGOJdU2P1hNsbXdKruGcL7mek/jn1A4IEC/wB+OnlF9mGuwgAAAABJRU5ErkJggg==">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:http-json:1" retries="10" />
<zeebe:ioMapping>
<zeebe:input source="placeholder" target="objects" />
<zeebe:input source="=contract.id" target="objects.fulfillContract_contractId" />
<zeebe:input source="bearer" target="authentication.type" />
<zeebe:input source="=token" target="authentication.token" />
<zeebe:input source="post" target="method" />
<zeebe:input source="="https://api.spacetraders.io/v2/my/contracts/" + string(objects.fulfillContract_contractId) + "/fulfill"" target="url" />
<zeebe:input source="={ }" target="queryParameters" />
<zeebe:input source="={}" target="body" />
</zeebe:ioMapping>
<zeebe:taskHeaders>
<zeebe:header key="category" value="contracts" />
<zeebe:header key="operation" value="fulfillContract" />
<zeebe:header key="resultExpression" value="={ "agent": response.body.data.agent, "contract": response.body.data.contract }" />
<zeebe:header key="errorExpression" value="=if matches(error.code, "4\d\d") then { error_code: substring after(extract(error.message,"\"code\":\d{4}")[1], ":"), error_message: substring(extract(error.message, "\"message\":\"(\w|\d|\s|\.|\-)+")[1], 12), error_code_by_name: { "4000":"cooldownConflictError", "4001":"waypointNoAccessError", "4100":"tokenEmptyError", "4101":"tokenMissingSubjectError", "4102":"tokenInvalidSubjectError", "4103":"missingTokenRequestError", "4104":"invalidTokenRequestError", "4105":"invalidTokenSubjectError", "4106":"accountNotExistsError", "4107":"agentNotExistsError", "4108":"accountHasNoAgentError", "4109":"registerAgentExistsError", "4110":"registerAgentSymbolReservedError", "4111":"registerAgentConflictSymbolError", "4200":"navigateInTransitError", "4201":"navigateInvalidDestinationError", "4202":"navigateOutsideSystemError", "4203":"navigateInsufficientFuelError", "4204":"navigateSameDestinationError", "4205":"shipExtractInvalidWaypointError", "4206":"shipExtractPermissionError", "4207":"shipJumpNoSystemError", "4208":"shipJumpSameSystemError", "4210":"shipJumpMissingModuleError", "4211":"shipJumpNoValidWaypointError", "4212":"shipJumpMissingAntimatterError", "4214":"shipInTransitError", "4215":"shipMissingSensorArraysError", "4216":"purchaseShipCreditsError", "4217":"shipCargoExceedsLimitError", "4218":"shipCargoMissingError", "4219":"shipCargoUnitCountError", "4220":"shipSurveyVerificationError", "4221":"shipSurveyExpirationError", "4222":"shipSurveyWaypointTypeError", "4223":"shipSurveyOrbitError", "4224":"shipSurveyExhaustedError", "4225":"shipRefuelDockedError", "4226":"shipRefuelInvalidWaypointError", "4227":"shipMissingMountsError", "4228":"shipCargoFullError", "4229":"shipJumpFromGateToGateError", "4230":"waypointChartedError", "4231":"shipTransferShipNotFound", "4232":"shipTransferAgentConflict", "4233":"shipTransferSameShipConflict", "4234":"shipTransferLocationConflict", "4235":"warpInsideSystemError", "4236":"shipNotInOrbitError", "4237":"shipInvalidRefineryGoodError", "4238":"shipInvalidRefineryTypeError", "4239":"shipMissingRefineryError", "4240":"shipMissingSurveyorError", "4241":"shipMissingWarpDriveError", "4242":"shipMissingMineralProcessorError", "4243":"shipMissingMiningLasersError", "4244":"shipNotDockedError", "4245":"purchaseShipNotPresentError", "4246":"shipMountNoShipyardError", "4247":"shipMissingMountError", "4248":"shipMountInsufficientCreditsError", "4249":"shipMissingPowerError", "4250":"shipMissingSlotsError", "4251":"shipMissingMountsError", "4252":"shipMissingCrewError", "4253":"shipExtractDestabilizedError", "4254":"shipJumpInvalidOriginError", "4255":"shipJumpInvalidWaypointError", "4256":"shipJumpOriginUnderConstructionError", "4257":"shipMissingGasProcessorError", "4258":"shipMissingGasSiphonsError", "4259":"shipSiphonInvalidWaypointError", "4260":"shipSiphonPermissionError", "4261":"waypointNoYieldError", "4262":"shipJumpDestinationUnderConstructionError", "4500":"acceptContractNotAuthorizedError", "4501":"acceptContractConflictError", "4502":"fulfillContractDeliveryError", "4503":"contractDeadlineError", "4504":"contractFulfilledError", "4505":"contractNotAcceptedError", "4506":"contractNotAuthorizedError", "4508":"shipDeliverTermsError", "4509":"shipDeliverFulfilledError", "4510":"shipDeliverInvalidLocationError", "4511":"existingContractError", "4600":"marketTradeInsufficientCreditsError", "4601":"marketTradeNoPurchaseError", "4602":"marketTradeNotSoldError", "4603":"marketNotFoundError", "4604":"marketTradeUnitLimitError", "4700":"waypointNoFactionError", "4800":"constructionMaterialNotRequired", "4801":"constructionMaterialFulfilled", "4802":"shipConstructionInvalidLocationError" }, bpmn_error_code: get or else(get value(error_code_by_name, error_code), error_code), error_data: {error_code: error_code, error_message: error_message, error_name: bpmn_error_code}, bpmnError: bpmnError(bpmn_error_code, error_message, error_data) }.bpmnError else null" />
<zeebe:header key="retryBackoff" value="PT1S" />
</zeebe:taskHeaders>
<zeebe:properties>
<zeebe:property name="custom_error_handling" value="by_error_name" />
</zeebe:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0jkwsfe</bpmn:incoming>
<bpmn:outgoing>Flow_1c9inve</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Activity_098u3y0" name="Dock ship" zeebe:modelerTemplate="com.camunda.SpaceTradersApi" zeebe:modelerTemplateVersion="5" zeebe:mod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4dPw52YR7+0jPzqAwxWDpeINbxw8xU5zDUCU6Un+QBD6aqxVw+rowaPgjwnvHtL+jHTJIknjRc2vImjub5k8/Z+2W51lZkoUvFOLYgYOUehuZkG53R90cXErodi2u7Z5t94HY5mIiONEYoSDLQ362Qd1PIY6eC+uWI+yt12YWyMkid0oB216pJD83i8MNTRw59B0dV26weWmA5XOSFHC0RdtE9BZtIa59WBZVwFHC3Wol4JAJG6r76A8JMjPT6OrqUfA56YLMVIOucBobN63im0gmCyqKOf5uDVdPnWXTkmSWz/HpfcJZfdyuaSGufjBLZWA0cPm8Jwg7jgxyqU22H1TTqSxPoiTfQ+3JIO09Wtry7dtYV1HAmy9tJ9jRyWvL/Tz1iFfLPiIJSWBXqa2AQ0K32SFTcOkvmJxlqB6QHjDY/EmQzj6LVfN8LCvzcu6ayZ6Tg9FKeXrrRqzr16ivO66I7lzrZ8Yk2SJt70cgoQk4LV0GUV3HPjRu98DEdE3u6/MRMlMEj5d4GQjB1gNBbjuVYlnkL6zg1umzasWyTex72U+ydEAB61YdC6KdgSgBJ+5xW60GlgpeatOej0/TW3Ft/RBHz0eGFUlW9ji6Ou9S9pDgjdWO/5qEbsHxJRlTwD2VvctFP7dURqC7H6VAOAKNNy1qG0zl/+CQftldIa8u8/BEsati3MC2IuqdYQqMQEQF1PHJtQUHw/o76J2jES60wsPFk2m+0kphlsnONQYeNdb+UogGMV60exNwje3qh5vdgtJ8uNOjSzM/Uw840QS7T+ooBXzwdhUUZjsva/9HO8ZMQE7QO6j2LFKS4PZdSE+GFD988avg4Gl9v3WZxaOTRgdM/Oe+CChBrdiHsCxPSehqBxz+DdYvgpy0sYP/ewbGOJdU2P1hNsbXdKruGcL7mek/jn1A4IEC/wB+OnlF9mGuwgAAAABJRU5ErkJggg==">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:http-json:1" retries="10" />
<zeebe:ioMapping>
<zeebe:input source="placeholder" target="objects" />
<zeebe:input source="=current_ship" target="objects.dockShip_shipSymbol" />
<zeebe:input source="bearer" target="authentication.type" />
<zeebe:input source="=token" target="authentication.token" />
<zeebe:input source="post" target="method" />
<zeebe:input source="="https://api.spacetraders.io/v2/my/ships/" + string(objects.dockShip_shipSymbol) + "/dock"" target="url" />
<zeebe:input source="={ }" target="queryParameters" />
</zeebe:ioMapping>
<zeebe:taskHeaders>
<zeebe:header key="category" value="fleet" />
<zeebe:header key="operation" value="dockShip" />
<zeebe:header key="resultExpression" value="={ "nav": response.body.data.nav }" />
<zeebe:header key="errorExpression" value="=if matches(error.code, "4\d\d") then { error_code: substring after(extract(error.message,"\"code\":\d{4}")[1], ":"), error_message: substring(extract(error.message, "\"message\":\"(\w|\d|\s|\.|\-)+")[1], 12), error_code_by_name: { "4000":"cooldownConflictError", "4001":"waypointNoAccessError", "4100":"tokenEmptyError", "4101":"tokenMissingSubjectError", "4102":"tokenInvalidSubjectError", "4103":"missingTokenRequestError", "4104":"invalidTokenRequestError", "4105":"invalidTokenSubjectError", "4106":"accountNotExistsError", "4107":"agentNotExistsError", "4108":"accountHasNoAgentError", "4109":"registerAgentExistsError", "4110":"registerAgentSymbolReservedError", "4111":"registerAgentConflictSymbolError", "4200":"navigateInTransitError", "4201":"navigateInvalidDestinationError", "4202":"navigateOutsideSystemError", "4203":"navigateInsufficientFuelError", "4204":"navigateSameDestinationError", "4205":"shipExtractInvalidWaypointError", "4206":"shipExtractPermissionError", "4207":"shipJumpNoSystemError", "4208":"shipJumpSameSystemError", "4210":"shipJumpMissingModuleError", "4211":"shipJumpNoValidWaypointError", "4212":"shipJumpMissingAntimatterError", "4214":"shipInTransitError", "4215":"shipMissingSensorArraysError", "4216":"purchaseShipCreditsError", "4217":"shipCargoExceedsLimitError", "4218":"shipCargoMissingError", "4219":"shipCargoUnitCountError", "4220":"shipSurveyVerificationError", "4221":"shipSurveyExpirationError", "4222":"shipSurveyWaypointTypeError", "4223":"shipSurveyOrbitError", "4224":"shipSurveyExhaustedError", "4225":"shipRefuelDockedError", "4226":"shipRefuelInvalidWaypointError", "4227":"shipMissingMountsError", "4228":"shipCargoFullError", "4229":"shipJumpFromGateToGateError", "4230":"waypointChartedError", "4231":"shipTransferShipNotFound", "4232":"shipTransferAgentConflict", "4233":"shipTransferSameShipConflict", "4234":"shipTransferLocationConflict", "4235":"warpInsideSystemError", "4236":"shipNotInOrbitError", "4237":"shipInvalidRefineryGoodError", "4238":"shipInvalidRefineryTypeError", "4239":"shipMissingRefineryError", "4240":"shipMissingSurveyorError", "4241":"shipMissingWarpDriveError", "4242":"shipMissingMineralProcessorError", "4243":"shipMissingMiningLasersError", "4244":"shipNotDockedError", "4245":"purchaseShipNotPresentError", "4246":"shipMountNoShipyardError", "4247":"shipMissingMountError", "4248":"shipMountInsufficientCreditsError", "4249":"shipMissingPowerError", "4250":"shipMissingSlotsError", "4251":"shipMissingMountsError", "4252":"shipMissingCrewError", "4253":"shipExtractDestabilizedError", "4254":"shipJumpInvalidOriginError", "4255":"shipJumpInvalidWaypointError", "4256":"shipJumpOriginUnderConstructionError", "4257":"shipMissingGasProcessorError", "4258":"shipMissingGasSiphonsError", "4259":"shipSiphonInvalidWaypointError", "4260":"shipSiphonPermissionError", "4261":"waypointNoYieldError", "4262":"shipJumpDestinationUnderConstructionError", "4500":"acceptContractNotAuthorizedError", "4501":"acceptContractConflictError", "4502":"fulfillContractDeliveryError", "4503":"contractDeadlineError", "4504":"contractFulfilledError", "4505":"contractNotAcceptedError", "4506":"contractNotAuthorizedError", "4508":"shipDeliverTermsError", "4509":"shipDeliverFulfilledError", "4510":"shipDeliverInvalidLocationError", "4511":"existingContractError", "4600":"marketTradeInsufficientCreditsError", "4601":"marketTradeNoPurchaseError", "4602":"marketTradeNotSoldError", "4603":"marketNotFoundError", "4604":"marketTradeUnitLimitError", "4700":"waypointNoFactionError", "4800":"constructionMaterialNotRequired", "4801":"constructionMaterialFulfilled", "4802":"shipConstructionInvalidLocationError" }, bpmn_error_code: get or else(get value(error_code_by_name, error_code), error_code), error_data: {error_code: error_code, error_message: error_message, error_name: bpmn_error_code}, bpmnError: bpmnError(bpmn_error_code, error_message, error_data) }.bpmnError else null" />
<zeebe:header key="retryBackoff" value="PT1S" />
</zeebe:taskHeaders>
<zeebe:properties>
<zeebe:property name="custom_error_handling" value="by_error_name" />
</zeebe:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_1wd0cgz</bpmn:incoming>
<bpmn:outgoing>Flow_0v14jge</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="Flow_0v14jge" sourceRef="Activity_098u3y0" targetRef="Activity_0lewwy2" />
<bpmn:boundaryEvent id="Event_11mlvos" name="Delivery failed" attachedToRef="Activity_009182e">
<bpmn:outgoing>Flow_0xiajvd</bpmn:outgoing>
<bpmn:errorEventDefinition id="ErrorEventDefinition_0p84m3j" errorRef="Error_1tvd5oh" />
</bpmn:boundaryEvent>
<bpmn:exclusiveGateway id="Gateway_0e9mesr">
<bpmn:incoming>Flow_1mh7sk1</bpmn:incoming>
<bpmn:incoming>Flow_0xiajvd</bpmn:incoming>
<bpmn:outgoing>Flow_0s1e5t2</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_0s1e5t2" sourceRef="Gateway_0e9mesr" targetRef="Gateway_1yzbhs3" />
<bpmn:sequenceFlow id="Flow_0xiajvd" sourceRef="Event_11mlvos" targetRef="Gateway_0e9mesr" />
<bpmn:sequenceFlow id="Flow_0hj7dc4" sourceRef="Activity_0lewwy2" targetRef="Activity_009182e" />
<bpmn:serviceTask id="Activity_0lewwy2" name="Get contract details" zeebe:modelerTemplate="com.camunda.SpaceTradersApi" zeebe:modelerTemplateVersion="5" zeebe:modelerTemplateIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAFsElEQVRYR+2WW2wUVRzGf2d2t9vthd6AllZKAVvEUqAFBOItQYKQNEATAlFDgiYC8YFo8IE3UUNIfFAfUKzQGhKUYNHAgwgaCWnjBVEEAq0SoVx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i8MNTRw59B0dV26weWmA5XOSFHC0RdtE9BZtIa59WBZVwFHC3Wol4JAJG6r76A8JMjPT6OrqUfA56YLMVIOucBobN63im0gmCyqKOf5uDVdPnWXTkmSWz/HpfcJZfdyuaSGufjBLZWA0cPm8Jwg7jgxyqU22H1TTqSxPoiTfQ+3JIO09Wtry7dtYV1HAmy9tJ9jRyWvL/Tz1iFfLPiIJSWBXqa2AQ0K32SFTcOkvmJxlqB6QHjDY/EmQzj6LVfN8LCvzcu6ayZ6Tg9FKeXrrRqzr16ivO66I7lzrZ8Yk2SJt70cgoQk4LV0GUV3HPjRu98DEdE3u6/MRMlMEj5d4GQjB1gNBbjuVYlnkL6zg1umzasWyTex72U+ydEAB61YdC6KdgSgBJ+5xW60GlgpeatOej0/TW3Ft/RBHz0eGFUlW9ji6Ou9S9pDgjdWO/5qEbsHxJRlTwD2VvctFP7dURqC7H6VAOAKNNy1qG0zl/+CQftldIa8u8/BEsati3MC2IuqdYQqMQEQF1PHJtQUHw/o76J2jES60wsPFk2m+0kphlsnONQYeNdb+UogGMV60exNwje3qh5vdgtJ8uNOjSzM/Uw840QS7T+ooBXzwdhUUZjsva/9HO8ZMQE7QO6j2LFKS4PZdSE+GFD988avg4Gl9v3WZxaOTRgdM/Oe+CChBrdiHsCxPSehqBxz+DdYvgpy0sYP/ewbGOJdU2P1hNsbXdKruGcL7mek/jn1A4IEC/wB+OnlF9mGuwgAAAABJRU5ErkJggg==">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:http-json:1" retries="10" />
<zeebe:ioMapping>
<zeebe:input source="placeholder" target="objects" />
<zeebe:input source="=contract.id" target="objects.getContract_contractId" />
<zeebe:input source="bearer" target="authentication.type" />
<zeebe:input source="=token" target="authentication.token" />
<zeebe:input source="get" target="method" />
<zeebe:input source="="https://api.spacetraders.io/v2/my/contracts/" + string(objects.getContract_contractId) + """ target="url" />
<zeebe:input source="={ }" target="queryParameters" />
</zeebe:ioMapping>
<zeebe:taskHeaders>
<zeebe:header key="category" value="contracts" />
<zeebe:header key="operation" value="getContract" />
<zeebe:header key="resultExpression" value="={"contract": response.body.data}" />
<zeebe:header key="errorExpression" value="=if matches(error.code, "4\d\d") then { error_code: substring after(extract(error.message,"\"code\":\d{4}")[1], ":"), error_message: substring(extract(error.message, "\"message\":\"(\w|\d|\s|\.|\-)+")[1], 12), error_code_by_name: { "4000":"cooldownConflictError", "4001":"waypointNoAccessError", "4100":"tokenEmptyError", "4101":"tokenMissingSubjectError", "4102":"tokenInvalidSubjectError", "4103":"missingTokenRequestError", "4104":"invalidTokenRequestError", "4105":"invalidTokenSubjectError", "4106":"accountNotExistsError", "4107":"agentNotExistsError", "4108":"accountHasNoAgentError", "4109":"registerAgentExistsError", "4110":"registerAgentSymbolReservedError", "4111":"registerAgentConflictSymbolError", "4200":"navigateInTransitError", "4201":"navigateInvalidDestinationError", "4202":"navigateOutsideSystemError", "4203":"navigateInsufficientFuelError", "4204":"navigateSameDestinationError", "4205":"shipExtractInvalidWaypointError", "4206":"shipExtractPermissionError", "4207":"shipJumpNoSystemError", "4208":"shipJumpSameSystemError", "4210":"shipJumpMissingModuleError", "4211":"shipJumpNoValidWaypointError", "4212":"shipJumpMissingAntimatterError", "4214":"shipInTransitError", "4215":"shipMissingSensorArraysError", "4216":"purchaseShipCreditsError", "4217":"shipCargoExceedsLimitError", "4218":"shipCargoMissingError", "4219":"shipCargoUnitCountError", "4220":"shipSurveyVerificationError", "4221":"shipSurveyExpirationError", "4222":"shipSurveyWaypointTypeError", "4223":"shipSurveyOrbitError", "4224":"shipSurveyExhaustedError", "4225":"shipRefuelDockedError", "4226":"shipRefuelInvalidWaypointError", "4227":"shipMissingMountsError", "4228":"shipCargoFullError", "4229":"shipJumpFromGateToGateError", "4230":"waypointChartedError", "4231":"shipTransferShipNotFound", "4232":"shipTransferAgentConflict", "4233":"shipTransferSameShipConflict", "4234":"shipTransferLocationConflict", "4235":"warpInsideSystemError", "4236":"shipNotInOrbitError", "4237":"shipInvalidRefineryGoodError", "4238":"shipInvalidRefineryTypeError", "4239":"shipMissingRefineryError", "4240":"shipMissingSurveyorError", "4241":"shipMissingWarpDriveError", "4242":"shipMissingMineralProcessorError", "4243":"shipMissingMiningLasersError", "4244":"shipNotDockedError", "4245":"purchaseShipNotPresentError", "4246":"shipMountNoShipyardError", "4247":"shipMissingMountError", "4248":"shipMountInsufficientCreditsError", "4249":"shipMissingPowerError", "4250":"shipMissingSlotsError", "4251":"shipMissingMountsError", "4252":"shipMissingCrewError", "4253":"shipExtractDestabilizedError", "4254":"shipJumpInvalidOriginError", "4255":"shipJumpInvalidWaypointError", "4256":"shipJumpOriginUnderConstructionError", "4257":"shipMissingGasProcessorError", "4258":"shipMissingGasSiphonsError", "4259":"shipSiphonInvalidWaypointError", "4260":"shipSiphonPermissionError", "4261":"waypointNoYieldError", "4262":"shipJumpDestinationUnderConstructionError", "4500":"acceptContractNotAuthorizedError", "4501":"acceptContractConflictError", "4502":"fulfillContractDeliveryError", "4503":"contractDeadlineError", "4504":"contractFulfilledError", "4505":"contractNotAcceptedError", "4506":"contractNotAuthorizedError", "4508":"shipDeliverTermsError", "4509":"shipDeliverFulfilledError", "4510":"shipDeliverInvalidLocationError", "4511":"existingContractError", "4600":"marketTradeInsufficientCreditsError", "4601":"marketTradeNoPurchaseError", "4602":"marketTradeNotSoldError", "4603":"marketNotFoundError", "4604":"marketTradeUnitLimitError", "4700":"waypointNoFactionError", "4800":"constructionMaterialNotRequired", "4801":"constructionMaterialFulfilled", "4802":"shipConstructionInvalidLocationError" }, bpmn_error_code: get or else(get value(error_code_by_name, error_code), error_code), error_data: {error_code: error_code, error_message: error_message, error_name: bpmn_error_code}, bpmnError: bpmnError(bpmn_error_code, error_message, error_data) }.bpmnError else null" />
<zeebe:header key="retryBackoff" value="PT1S" />
</zeebe:taskHeaders>
<zeebe:properties>
<zeebe:property name="custom_error_handling" value="by_error_name" />
</zeebe:properties>
</bpmn:extensionElements>
<bpmn:incoming>Flow_0v14jge</bpmn:incoming>
<bpmn:outgoing>Flow_0hj7dc4</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:textAnnotation id="TextAnnotation_1s4fmey">
<bpmn:text>Required variable: current_ship, contract</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_084mbaj" sourceRef="StartEvent_1" targetRef="TextAnnotation_1s4fmey" />
</bpmn:process>
<bpmn:error id="Error_1tvd5oh" name="shipDeliverFulfilledError" errorCode="shipDeliverFulfilledError" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="space-traders-deliver-contract-goods">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="282" y="160" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="262" y="203" width="77" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_12bg5mf_di" bpmnElement="Gateway_12bg5mf" isMarkerVisible="true">
<dc:Bounds x="545" y="153" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="537" y="116" width="65" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_1oh4kzd_di" bpmnElement="Event_1oh4kzd">
<dc:Bounds x="552" y="332" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="540" y="375" width="60" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0jccbwl_di" bpmnElement="Activity_04aurzq">
<dc:Bounds x="380" y="138" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_1bi9aqb" bpmnElement="Activity_098u3y0">
<dc:Bounds x="680" y="138" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_039o9rs_di" bpmnElement="Event_039o9rs">
<dc:Bounds x="1862" y="160" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1841" y="203" width="79" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1yzbhs3_di" bpmnElement="Gateway_1yzbhs3" isMarkerVisible="true">
<dc:Bounds x="1573" y="153" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1557" y="116" width="82" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0buj847_di" bpmnElement="Event_0buj847">
<dc:Bounds x="1862" y="292" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1840" y="335" width="80" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0baazwz_di" bpmnElement="Activity_0x4r1kj">
<dc:Bounds x="1688" y="138" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_0e9mesr_di" bpmnElement="Gateway_0e9mesr" isMarkerVisible="true">
<dc:Bounds x="1455" y="153" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0a2r3z5_di" bpmnElement="Activity_0lewwy2">
<dc:Bounds x="850" y="138" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_009182e_di" bpmnElement="Activity_009182e" isExpanded="true">
<dc:Bounds x="1010" y="90" width="370" height="170" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0acqlks_di" bpmnElement="Event_0acqlks">
<dc:Bounds x="1050" y="160" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0907mye_di" bpmnElement="Event_0907mye">
<dc:Bounds x="1312" y="160" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_0us6ytp" bpmnElement="Activity_1pq3s6x">
<dc:Bounds x="1160" y="138" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_08g5apu_di" bpmnElement="Flow_08g5apu">
<di:waypoint x="1086" y="178" />
<di:waypoint x="1160" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0r58khn_di" bpmnElement="Flow_0r58khn">
<di:waypoint x="1260" y="178" />
<di:waypoint x="1312" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Event_0sfns2m_di" bpmnElement="Event_11mlvos">
<dc:Bounds x="1362" y="242" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1395" y="283" width="70" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="TextAnnotation_1s4fmey_di" bpmnElement="TextAnnotation_1s4fmey">
<dc:Bounds x="160" y="80" width="158" height="45" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0jkwsfe_di" bpmnElement="Flow_0jkwsfe">
<di:waypoint x="1623" y="178" />
<di:waypoint x="1688" y="178" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1647" y="160" width="19" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1c9inve_di" bpmnElement="Flow_1c9inve">
<di:waypoint x="1788" y="178" />
<di:waypoint x="1862" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0otnh62_di" bpmnElement="Flow_0otnh62">
<di:waypoint x="1598" y="203" />
<di:waypoint x="1598" y="310" />
<di:waypoint x="1862" y="310" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1652" y="293" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_14sorii_di" bpmnElement="Flow_14sorii">
<di:waypoint x="318" y="178" />
<di:waypoint x="380" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1sn75w4_di" bpmnElement="Flow_1sn75w4">
<di:waypoint x="480" y="178" />
<di:waypoint x="545" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1wd0cgz_di" bpmnElement="Flow_1wd0cgz">
<di:waypoint x="595" y="178" />
<di:waypoint x="680" y="178" />
<bpmndi:BPMNLabel>
<dc:Bounds x="630" y="158" width="19" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1tc5yrh_di" bpmnElement="Flow_1tc5yrh">
<di:waypoint x="570" y="203" />
<di:waypoint x="570" y="332" />
<bpmndi:BPMNLabel>
<dc:Bounds x="578" y="265" width="15" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1mh7sk1_di" bpmnElement="Flow_1mh7sk1">
<di:waypoint x="1380" y="178" />
<di:waypoint x="1455" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0v14jge_di" bpmnElement="Flow_0v14jge">
<di:waypoint x="780" y="178" />
<di:waypoint x="850" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0s1e5t2_di" bpmnElement="Flow_0s1e5t2">
<di:waypoint x="1505" y="178" />
<di:waypoint x="1573" y="178" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0xiajvd_di" bpmnElement="Flow_0xiajvd">
<di:waypoint x="1380" y="278" />
<di:waypoint x="1380" y="310" />
<di:waypoint x="1480" y="310" />
<di:waypoint x="1480" y="203" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Association_084mbaj_di" bpmnElement="Association_084mbaj">
<di:waypoint x="290" y="163" />
<di:waypoint x="263" y="125" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0hj7dc4_di" bpmnElement="Flow_0hj7dc4">
<di:waypoint x="950" y="178" />
<di:waypoint x="1010" y="178" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>