@5minds/node-red-contrib-processcube 0.15.0-feature-2d3c96-lz0zm47e → 0.15.0-fix-error-in-process-instance-query-f9f0d2-lz03zzg4
Sign up to get free protection for your applications and to get access to all the features.
- package/Dockerfile +1 -1
- package/docker-compose.yml +0 -12
- package/externaltask-error.html +2 -16
- package/externaltask-error.js +13 -11
- package/externaltask-input.html +2 -19
- package/externaltask-input.js +46 -102
- package/externaltask-output.html +2 -12
- package/externaltask-output.js +3 -3
- package/message-event-trigger.js +10 -6
- package/nodered/node-red-contrib-processcube-flows.json +132 -216
- package/nodered/package.json +0 -1
- package/nodered/settings.js +1 -1
- package/package.json +6 -3
- package/process-start.js +11 -6
- package/processcube-engine-config.js +0 -15
- package/processdefinition-query.js +9 -1
- package/processes/CheckError.bpmn +78 -0
- package/processes/NodeRedExternalTask.bpmn +77 -0
- package/processes/SampleUserTask.bpmn +95 -0
- package/processinstance-query.js +10 -1
- package/signal-event-trigger.js +10 -6
- package/usertask-finished-listener.js +9 -1
- package/usertask-input.js +13 -17
- package/usertask-new-listener.js +9 -1
- package/usertask-output.js +9 -1
- package/examples/External-Task-Sample.json +0 -252
- package/processes/External-Task-Sample.bpmn +0 -94
@@ -1,16 +1,8 @@
|
|
1
1
|
[
|
2
|
-
{
|
3
|
-
"id": "3f916448523ed12b",
|
4
|
-
"type": "tab",
|
5
|
-
"label": "Node-Inspector",
|
6
|
-
"disabled": false,
|
7
|
-
"info": "",
|
8
|
-
"env": []
|
9
|
-
},
|
10
2
|
{
|
11
3
|
"id": "a23d2e782beb66f4",
|
12
4
|
"type": "tab",
|
13
|
-
"label": "
|
5
|
+
"label": "ExternalTasks",
|
14
6
|
"disabled": false,
|
15
7
|
"info": "",
|
16
8
|
"env": []
|
@@ -87,176 +79,24 @@
|
|
87
79
|
"w": 572,
|
88
80
|
"h": 142
|
89
81
|
},
|
90
|
-
{
|
91
|
-
"id": "70d7a70e375b162a",
|
92
|
-
"type": "group",
|
93
|
-
"z": "a23d2e782beb66f4",
|
94
|
-
"style": {
|
95
|
-
"stroke": "#999999",
|
96
|
-
"stroke-opacity": "1",
|
97
|
-
"fill": "none",
|
98
|
-
"fill-opacity": "1",
|
99
|
-
"label": true,
|
100
|
-
"label-position": "nw",
|
101
|
-
"color": "#a4a4a4"
|
102
|
-
},
|
103
|
-
"nodes": [
|
104
|
-
"2991a5e6df2b87d2",
|
105
|
-
"911fde53bcbb7e3f",
|
106
|
-
"d56bb7cd73fd220c",
|
107
|
-
"15a5f64b9e2e05fc"
|
108
|
-
],
|
109
|
-
"x": 34,
|
110
|
-
"y": 79,
|
111
|
-
"w": 512,
|
112
|
-
"h": 142
|
113
|
-
},
|
114
|
-
{
|
115
|
-
"id": "31cb6729aac0ba46",
|
116
|
-
"type": "group",
|
117
|
-
"z": "a23d2e782beb66f4",
|
118
|
-
"style": {
|
119
|
-
"stroke": "#999999",
|
120
|
-
"stroke-opacity": "1",
|
121
|
-
"fill": "none",
|
122
|
-
"fill-opacity": "1",
|
123
|
-
"label": true,
|
124
|
-
"label-position": "nw",
|
125
|
-
"color": "#a4a4a4"
|
126
|
-
},
|
127
|
-
"nodes": [
|
128
|
-
"18e05d562d48f32d",
|
129
|
-
"49aee03a7885fae8",
|
130
|
-
"e4555d9019cd3f47",
|
131
|
-
"bd68c4bdc53b8f80",
|
132
|
-
"fb87f79852b22e4a",
|
133
|
-
"1ba1e62c9935255f",
|
134
|
-
"b49f226ba865e164"
|
135
|
-
],
|
136
|
-
"x": 34,
|
137
|
-
"y": 259,
|
138
|
-
"w": 812,
|
139
|
-
"h": 202
|
140
|
-
},
|
141
|
-
{
|
142
|
-
"id": "dd43902998ad7630",
|
143
|
-
"type": "group",
|
144
|
-
"z": "3f916448523ed12b",
|
145
|
-
"style": {
|
146
|
-
"stroke": "#999999",
|
147
|
-
"stroke-opacity": "1",
|
148
|
-
"fill": "none",
|
149
|
-
"fill-opacity": "1",
|
150
|
-
"label": true,
|
151
|
-
"label-position": "nw",
|
152
|
-
"color": "#a4a4a4"
|
153
|
-
},
|
154
|
-
"nodes": [
|
155
|
-
"3add02d7.7df60e",
|
156
|
-
"8cf9f9cd.1a6a88",
|
157
|
-
"4b2a8ca1.de70e4",
|
158
|
-
"97dbbfedba44a728"
|
159
|
-
],
|
160
|
-
"x": 34,
|
161
|
-
"y": 59,
|
162
|
-
"w": 712,
|
163
|
-
"h": 202
|
164
|
-
},
|
165
82
|
{
|
166
83
|
"id": "42e6796dddd9d4db",
|
167
84
|
"type": "processcube-engine-config",
|
168
85
|
"url": "http://engine:8000"
|
169
86
|
},
|
170
|
-
{
|
171
|
-
"id": "3add02d7.7df60e",
|
172
|
-
"type": "node-inspector",
|
173
|
-
"z": "3f916448523ed12b",
|
174
|
-
"g": "dd43902998ad7630",
|
175
|
-
"inputField": "payload",
|
176
|
-
"host": "0.0.0.0",
|
177
|
-
"portNumber": 9229,
|
178
|
-
"autoStart": false,
|
179
|
-
"name": "",
|
180
|
-
"x": 400,
|
181
|
-
"y": 160,
|
182
|
-
"wires": []
|
183
|
-
},
|
184
|
-
{
|
185
|
-
"id": "8cf9f9cd.1a6a88",
|
186
|
-
"type": "inject",
|
187
|
-
"z": "3f916448523ed12b",
|
188
|
-
"g": "dd43902998ad7630",
|
189
|
-
"name": "",
|
190
|
-
"props": [
|
191
|
-
{
|
192
|
-
"p": "payload"
|
193
|
-
}
|
194
|
-
],
|
195
|
-
"repeat": "",
|
196
|
-
"crontab": "",
|
197
|
-
"once": false,
|
198
|
-
"onceDelay": 0.1,
|
199
|
-
"topic": "",
|
200
|
-
"payload": "open_inspector",
|
201
|
-
"payloadType": "str",
|
202
|
-
"x": 160,
|
203
|
-
"y": 160,
|
204
|
-
"wires": [
|
205
|
-
[
|
206
|
-
"3add02d7.7df60e"
|
207
|
-
]
|
208
|
-
]
|
209
|
-
},
|
210
|
-
{
|
211
|
-
"id": "4b2a8ca1.de70e4",
|
212
|
-
"type": "inject",
|
213
|
-
"z": "3f916448523ed12b",
|
214
|
-
"g": "dd43902998ad7630",
|
215
|
-
"name": "",
|
216
|
-
"props": [
|
217
|
-
{
|
218
|
-
"p": "payload"
|
219
|
-
}
|
220
|
-
],
|
221
|
-
"repeat": "",
|
222
|
-
"crontab": "",
|
223
|
-
"once": false,
|
224
|
-
"onceDelay": 0.1,
|
225
|
-
"topic": "",
|
226
|
-
"payload": "close_inspector",
|
227
|
-
"payloadType": "str",
|
228
|
-
"x": 160,
|
229
|
-
"y": 220,
|
230
|
-
"wires": [
|
231
|
-
[
|
232
|
-
"3add02d7.7df60e"
|
233
|
-
]
|
234
|
-
]
|
235
|
-
},
|
236
|
-
{
|
237
|
-
"id": "97dbbfedba44a728",
|
238
|
-
"type": "comment",
|
239
|
-
"z": "3f916448523ed12b",
|
240
|
-
"g": "dd43902998ad7630",
|
241
|
-
"name": "Start Node-Inspector on Port 9229 - be sure, that you expose the port from the docker-container",
|
242
|
-
"info": "",
|
243
|
-
"x": 390,
|
244
|
-
"y": 100,
|
245
|
-
"wires": []
|
246
|
-
},
|
247
87
|
{
|
248
88
|
"id": "2991a5e6df2b87d2",
|
249
89
|
"type": "externaltask-input",
|
250
90
|
"z": "a23d2e782beb66f4",
|
251
|
-
"g": "70d7a70e375b162a",
|
252
91
|
"name": "Test",
|
253
92
|
"engine": "42e6796dddd9d4db",
|
254
93
|
"topic": "Test",
|
255
|
-
"x":
|
256
|
-
"y":
|
94
|
+
"x": 90,
|
95
|
+
"y": 400,
|
257
96
|
"wires": [
|
258
97
|
[
|
259
|
-
"d56bb7cd73fd220c"
|
98
|
+
"d56bb7cd73fd220c",
|
99
|
+
"75c7bb5cc34e354a"
|
260
100
|
]
|
261
101
|
]
|
262
102
|
},
|
@@ -264,17 +104,15 @@
|
|
264
104
|
"id": "911fde53bcbb7e3f",
|
265
105
|
"type": "externaltask-output",
|
266
106
|
"z": "a23d2e782beb66f4",
|
267
|
-
"g": "70d7a70e375b162a",
|
268
107
|
"name": "Test Ende",
|
269
|
-
"x":
|
270
|
-
"y":
|
108
|
+
"x": 500,
|
109
|
+
"y": 400,
|
271
110
|
"wires": []
|
272
111
|
},
|
273
112
|
{
|
274
113
|
"id": "d56bb7cd73fd220c",
|
275
114
|
"type": "delay",
|
276
115
|
"z": "a23d2e782beb66f4",
|
277
|
-
"g": "70d7a70e375b162a",
|
278
116
|
"name": "",
|
279
117
|
"pauseType": "delay",
|
280
118
|
"timeout": "1",
|
@@ -289,23 +127,56 @@
|
|
289
127
|
"allowrate": false,
|
290
128
|
"outputs": 1,
|
291
129
|
"x": 280,
|
292
|
-
"y":
|
130
|
+
"y": 400,
|
293
131
|
"wires": [
|
294
132
|
[
|
295
|
-
"911fde53bcbb7e3f"
|
133
|
+
"911fde53bcbb7e3f",
|
134
|
+
"69aec57d8bb00292"
|
296
135
|
]
|
297
136
|
]
|
298
137
|
},
|
138
|
+
{
|
139
|
+
"id": "75c7bb5cc34e354a",
|
140
|
+
"type": "debug",
|
141
|
+
"z": "a23d2e782beb66f4",
|
142
|
+
"name": "debug 1",
|
143
|
+
"active": true,
|
144
|
+
"tosidebar": true,
|
145
|
+
"console": false,
|
146
|
+
"tostatus": false,
|
147
|
+
"complete": "false",
|
148
|
+
"statusVal": "",
|
149
|
+
"statusType": "auto",
|
150
|
+
"x": 260,
|
151
|
+
"y": 480,
|
152
|
+
"wires": []
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"id": "69aec57d8bb00292",
|
156
|
+
"type": "debug",
|
157
|
+
"z": "a23d2e782beb66f4",
|
158
|
+
"name": "debug 6",
|
159
|
+
"active": true,
|
160
|
+
"tosidebar": true,
|
161
|
+
"console": false,
|
162
|
+
"tostatus": false,
|
163
|
+
"complete": "externalTaskId",
|
164
|
+
"targetType": "msg",
|
165
|
+
"statusVal": "",
|
166
|
+
"statusType": "auto",
|
167
|
+
"x": 480,
|
168
|
+
"y": 480,
|
169
|
+
"wires": []
|
170
|
+
},
|
299
171
|
{
|
300
172
|
"id": "18e05d562d48f32d",
|
301
173
|
"type": "externaltask-input",
|
302
174
|
"z": "a23d2e782beb66f4",
|
303
|
-
"g": "31cb6729aac0ba46",
|
304
175
|
"name": "SampleError",
|
305
176
|
"engine": "42e6796dddd9d4db",
|
306
177
|
"topic": "SampleError",
|
307
|
-
"x":
|
308
|
-
"y":
|
178
|
+
"x": 110,
|
179
|
+
"y": 640,
|
309
180
|
"wires": [
|
310
181
|
[
|
311
182
|
"49aee03a7885fae8"
|
@@ -316,7 +187,6 @@
|
|
316
187
|
"id": "49aee03a7885fae8",
|
317
188
|
"type": "delay",
|
318
189
|
"z": "a23d2e782beb66f4",
|
319
|
-
"g": "31cb6729aac0ba46",
|
320
190
|
"name": "",
|
321
191
|
"pauseType": "delay",
|
322
192
|
"timeout": "5",
|
@@ -330,8 +200,8 @@
|
|
330
200
|
"drop": false,
|
331
201
|
"allowrate": false,
|
332
202
|
"outputs": 1,
|
333
|
-
"x":
|
334
|
-
"y":
|
203
|
+
"x": 350,
|
204
|
+
"y": 640,
|
335
205
|
"wires": [
|
336
206
|
[
|
337
207
|
"bd68c4bdc53b8f80"
|
@@ -342,14 +212,15 @@
|
|
342
212
|
"id": "e4555d9019cd3f47",
|
343
213
|
"type": "catch",
|
344
214
|
"z": "a23d2e782beb66f4",
|
345
|
-
"g": "31cb6729aac0ba46",
|
346
215
|
"name": "",
|
347
|
-
"scope":
|
216
|
+
"scope": null,
|
348
217
|
"uncaught": false,
|
349
|
-
"x":
|
350
|
-
"y":
|
218
|
+
"x": 360,
|
219
|
+
"y": 760,
|
351
220
|
"wires": [
|
352
221
|
[
|
222
|
+
"fa1c26d470c38efd",
|
223
|
+
"019797b5a0882e7b",
|
353
224
|
"fb87f79852b22e4a"
|
354
225
|
]
|
355
226
|
]
|
@@ -358,8 +229,7 @@
|
|
358
229
|
"id": "bd68c4bdc53b8f80",
|
359
230
|
"type": "function",
|
360
231
|
"z": "a23d2e782beb66f4",
|
361
|
-
"
|
362
|
-
"name": "raise Error",
|
232
|
+
"name": "function 1",
|
363
233
|
"func": "throw Error(\"hello error\");\n\nreturn msg;",
|
364
234
|
"outputs": 1,
|
365
235
|
"timeout": 0,
|
@@ -367,23 +237,55 @@
|
|
367
237
|
"initialize": "",
|
368
238
|
"finalize": "",
|
369
239
|
"libs": [],
|
370
|
-
"x":
|
371
|
-
"y":
|
240
|
+
"x": 560,
|
241
|
+
"y": 640,
|
372
242
|
"wires": [
|
373
243
|
[
|
374
244
|
"1ba1e62c9935255f"
|
375
245
|
]
|
376
246
|
]
|
377
247
|
},
|
248
|
+
{
|
249
|
+
"id": "fa1c26d470c38efd",
|
250
|
+
"type": "debug",
|
251
|
+
"z": "a23d2e782beb66f4",
|
252
|
+
"name": "debug 8",
|
253
|
+
"active": true,
|
254
|
+
"tosidebar": true,
|
255
|
+
"console": false,
|
256
|
+
"tostatus": false,
|
257
|
+
"complete": "false",
|
258
|
+
"statusVal": "",
|
259
|
+
"statusType": "auto",
|
260
|
+
"x": 620,
|
261
|
+
"y": 760,
|
262
|
+
"wires": []
|
263
|
+
},
|
264
|
+
{
|
265
|
+
"id": "019797b5a0882e7b",
|
266
|
+
"type": "debug",
|
267
|
+
"z": "a23d2e782beb66f4",
|
268
|
+
"name": "debug 9",
|
269
|
+
"active": true,
|
270
|
+
"tosidebar": true,
|
271
|
+
"console": false,
|
272
|
+
"tostatus": false,
|
273
|
+
"complete": "externalTaskId",
|
274
|
+
"targetType": "msg",
|
275
|
+
"statusVal": "",
|
276
|
+
"statusType": "auto",
|
277
|
+
"x": 620,
|
278
|
+
"y": 820,
|
279
|
+
"wires": []
|
280
|
+
},
|
378
281
|
{
|
379
282
|
"id": "fb87f79852b22e4a",
|
380
283
|
"type": "externaltask-error",
|
381
284
|
"z": "a23d2e782beb66f4",
|
382
|
-
"
|
383
|
-
"name": "Send Error to Engine",
|
285
|
+
"name": "Fehler",
|
384
286
|
"error": "MyErrorCode",
|
385
|
-
"x":
|
386
|
-
"y":
|
287
|
+
"x": 570,
|
288
|
+
"y": 900,
|
387
289
|
"wires": [
|
388
290
|
[]
|
389
291
|
]
|
@@ -392,42 +294,56 @@
|
|
392
294
|
"id": "1ba1e62c9935255f",
|
393
295
|
"type": "externaltask-output",
|
394
296
|
"z": "a23d2e782beb66f4",
|
395
|
-
"g": "31cb6729aac0ba46",
|
396
297
|
"name": "",
|
397
|
-
"x":
|
398
|
-
"y":
|
399
|
-
"wires": []
|
400
|
-
},
|
401
|
-
{
|
402
|
-
"id": "15a5f64b9e2e05fc",
|
403
|
-
"type": "comment",
|
404
|
-
"z": "a23d2e782beb66f4",
|
405
|
-
"g": "70d7a70e375b162a",
|
406
|
-
"name": "Simple External Task handling",
|
407
|
-
"info": "",
|
408
|
-
"x": 180,
|
409
|
-
"y": 120,
|
298
|
+
"x": 770,
|
299
|
+
"y": 640,
|
410
300
|
"wires": []
|
411
301
|
},
|
412
302
|
{
|
413
|
-
"id": "
|
414
|
-
"type": "
|
303
|
+
"id": "c18723294975e975",
|
304
|
+
"type": "inject",
|
415
305
|
"z": "a23d2e782beb66f4",
|
416
|
-
"
|
417
|
-
"
|
418
|
-
|
306
|
+
"name": "",
|
307
|
+
"props": [
|
308
|
+
{
|
309
|
+
"p": "payload"
|
310
|
+
},
|
311
|
+
{
|
312
|
+
"p": "eventName",
|
313
|
+
"v": "sampleEvent",
|
314
|
+
"vt": "str"
|
315
|
+
}
|
316
|
+
],
|
317
|
+
"repeat": "",
|
318
|
+
"crontab": "",
|
319
|
+
"once": false,
|
320
|
+
"onceDelay": 0.1,
|
321
|
+
"topic": "",
|
322
|
+
"payload": "{\t \t}",
|
323
|
+
"payloadType": "jsonata",
|
419
324
|
"x": 190,
|
420
|
-
"y":
|
421
|
-
"wires": [
|
325
|
+
"y": 1200,
|
326
|
+
"wires": [
|
327
|
+
[
|
328
|
+
"ddcde0ab7abfb8af"
|
329
|
+
]
|
330
|
+
]
|
422
331
|
},
|
423
332
|
{
|
424
|
-
"id": "
|
425
|
-
"type": "
|
333
|
+
"id": "ddcde0ab7abfb8af",
|
334
|
+
"type": "debug",
|
426
335
|
"z": "a23d2e782beb66f4",
|
427
|
-
"name": "
|
428
|
-
"
|
429
|
-
"
|
430
|
-
"
|
336
|
+
"name": "debug 18",
|
337
|
+
"active": true,
|
338
|
+
"tosidebar": true,
|
339
|
+
"console": false,
|
340
|
+
"tostatus": false,
|
341
|
+
"complete": "true",
|
342
|
+
"targetType": "full",
|
343
|
+
"statusVal": "",
|
344
|
+
"statusType": "auto",
|
345
|
+
"x": 480,
|
346
|
+
"y": 1200,
|
431
347
|
"wires": []
|
432
348
|
},
|
433
349
|
{
|
package/nodered/package.json
CHANGED
package/nodered/settings.js
CHANGED
@@ -382,7 +382,7 @@ module.exports = {
|
|
382
382
|
//tours: false,
|
383
383
|
|
384
384
|
header: {
|
385
|
-
title: 'Node-RED powered by ProcessCube©',
|
385
|
+
title: 'Node-RED powered by ProcessCube ©',
|
386
386
|
url: 'https://processcube.io', // optional url to make the header text/image a link to this url
|
387
387
|
},
|
388
388
|
palette: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@5minds/node-red-contrib-processcube",
|
3
|
-
"version": "0.15.0-
|
3
|
+
"version": "0.15.0-fix-error-in-process-instance-query-f9f0d2-lz03zzg4",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Node-RED nodes for ProcessCube",
|
6
6
|
"scripts": {
|
@@ -51,7 +51,7 @@
|
|
51
51
|
}
|
52
52
|
},
|
53
53
|
"dependencies": {
|
54
|
-
"@5minds/processcube_engine_client": "^5.0.
|
54
|
+
"@5minds/processcube_engine_client": "^5.0.0",
|
55
55
|
"jwt-decode": "^4.0.0",
|
56
56
|
"openid-client": "^5.5.0"
|
57
57
|
},
|
@@ -61,5 +61,8 @@
|
|
61
61
|
"workflow",
|
62
62
|
"bpmn",
|
63
63
|
"low-code"
|
64
|
-
]
|
64
|
+
],
|
65
|
+
"devDependencies": {
|
66
|
+
"prettier": "^3.3.3"
|
67
|
+
}
|
65
68
|
}
|
package/process-start.js
CHANGED
@@ -5,10 +5,19 @@ module.exports = function (RED) {
|
|
5
5
|
function ProcessStart(config) {
|
6
6
|
RED.nodes.createNode(this, config);
|
7
7
|
var node = this;
|
8
|
+
var flowContext = node.context().flow;
|
9
|
+
var nodeContext = node.context();
|
8
10
|
|
9
11
|
this.engine = this.server = RED.nodes.getNode(config.engine);
|
10
12
|
|
11
|
-
const
|
13
|
+
const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
|
14
|
+
|
15
|
+
var client = nodeContext.get('client');
|
16
|
+
|
17
|
+
if (!client) {
|
18
|
+
nodeContext.set('client', new engine_client.EngineClient(engineUrl));
|
19
|
+
client = nodeContext.get('client');
|
20
|
+
}
|
12
21
|
|
13
22
|
node.on('input', function (msg) {
|
14
23
|
const startParameters = {
|
@@ -23,11 +32,7 @@ module.exports = function (RED) {
|
|
23
32
|
msg.payload = result;
|
24
33
|
|
25
34
|
node.send(msg);
|
26
|
-
node.status({
|
27
|
-
fill: 'blue',
|
28
|
-
shape: 'dot',
|
29
|
-
text: `started ${result.processInstanceId}`,
|
30
|
-
});
|
35
|
+
node.status({ fill: 'blue', shape: 'dot', text: `started ${result.processInstanceId}` });
|
31
36
|
})
|
32
37
|
.catch((error) => {
|
33
38
|
node.error(error);
|
@@ -14,7 +14,6 @@ module.exports = function (RED) {
|
|
14
14
|
this.registerOnIdentityChanged = function (callback) {
|
15
15
|
identityChangedCallbacks.push(callback);
|
16
16
|
};
|
17
|
-
|
18
17
|
this.setIdentity = (identity) => {
|
19
18
|
this.identity = identity;
|
20
19
|
|
@@ -23,20 +22,6 @@ module.exports = function (RED) {
|
|
23
22
|
}
|
24
23
|
};
|
25
24
|
|
26
|
-
var nodeContext = node.context();
|
27
|
-
|
28
|
-
this.getEngineClient = () => {
|
29
|
-
const engineUrl = this.url || process.env.ENGINE_URL || 'http://engine:8000';
|
30
|
-
let client = nodeContext.get('client');
|
31
|
-
|
32
|
-
if (!client) {
|
33
|
-
nodeContext.set('client', new engine_client.EngineClient(engineUrl));
|
34
|
-
client = nodeContext.get('client');
|
35
|
-
}
|
36
|
-
|
37
|
-
return client;
|
38
|
-
};
|
39
|
-
|
40
25
|
if (this.credentials.clientId && this.credentials.clientSecret) {
|
41
26
|
const engineClient = new engine_client.EngineClient(this.url);
|
42
27
|
|
@@ -8,10 +8,18 @@ module.exports = function (RED) {
|
|
8
8
|
RED.nodes.createNode(this, config);
|
9
9
|
var node = this;
|
10
10
|
var flowContext = node.context().flow;
|
11
|
+
var nodeContext = node.context();
|
11
12
|
|
12
13
|
this.engine = this.server = RED.nodes.getNode(config.engine);
|
13
14
|
|
14
|
-
const
|
15
|
+
const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
|
16
|
+
|
17
|
+
var client = nodeContext.get('client');
|
18
|
+
|
19
|
+
if (!client) {
|
20
|
+
nodeContext.set('client', new engine_client.EngineClient(engineUrl));
|
21
|
+
client = nodeContext.get('client');
|
22
|
+
}
|
15
23
|
|
16
24
|
var eventEmitter = flowContext.get('emitter');
|
17
25
|
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="CheckError_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
|
3
|
+
<bpmn:collaboration id="Collaboration_1cidyxu" name="">
|
4
|
+
<bpmn:participant id="Participant_0px403d" name="CheckError" processRef="CheckError_Process" />
|
5
|
+
</bpmn:collaboration>
|
6
|
+
<bpmn:process id="CheckError_Process" name="CheckError" isExecutable="true">
|
7
|
+
<bpmn:laneSet>
|
8
|
+
<bpmn:lane id="Lane_1xzf0d3" name="Lane">
|
9
|
+
<bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
|
10
|
+
<bpmn:flowNodeRef>Event_0kmuys0</bpmn:flowNodeRef>
|
11
|
+
<bpmn:flowNodeRef>Activity_09zn4t5</bpmn:flowNodeRef>
|
12
|
+
<bpmn:flowNodeRef>Event_1gy657v</bpmn:flowNodeRef>
|
13
|
+
<bpmn:flowNodeRef>Event_1w4tivm</bpmn:flowNodeRef>
|
14
|
+
</bpmn:lane>
|
15
|
+
</bpmn:laneSet>
|
16
|
+
<bpmn:startEvent id="StartEvent_1" name="Start">
|
17
|
+
<bpmn:outgoing>Flow_14izvt0</bpmn:outgoing>
|
18
|
+
</bpmn:startEvent>
|
19
|
+
<bpmn:sequenceFlow id="Flow_14izvt0" sourceRef="StartEvent_1" targetRef="Activity_09zn4t5" />
|
20
|
+
<bpmn:endEvent id="Event_0kmuys0">
|
21
|
+
<bpmn:incoming>Flow_1ukmuxb</bpmn:incoming>
|
22
|
+
</bpmn:endEvent>
|
23
|
+
<bpmn:sequenceFlow id="Flow_1ukmuxb" sourceRef="Activity_09zn4t5" targetRef="Event_0kmuys0" />
|
24
|
+
<bpmn:serviceTask id="Activity_09zn4t5" name="ETW with error" camunda:type="external" camunda:topic="SampleError">
|
25
|
+
<bpmn:incoming>Flow_14izvt0</bpmn:incoming>
|
26
|
+
<bpmn:outgoing>Flow_1ukmuxb</bpmn:outgoing>
|
27
|
+
</bpmn:serviceTask>
|
28
|
+
<bpmn:sequenceFlow id="Flow_0tgf785" sourceRef="Event_1w4tivm" targetRef="Event_1gy657v" />
|
29
|
+
<bpmn:endEvent id="Event_1gy657v">
|
30
|
+
<bpmn:incoming>Flow_0tgf785</bpmn:incoming>
|
31
|
+
</bpmn:endEvent>
|
32
|
+
<bpmn:boundaryEvent id="Event_1w4tivm" attachedToRef="Activity_09zn4t5">
|
33
|
+
<bpmn:outgoing>Flow_0tgf785</bpmn:outgoing>
|
34
|
+
<bpmn:errorEventDefinition id="ErrorEventDefinition_0nesf0j" />
|
35
|
+
</bpmn:boundaryEvent>
|
36
|
+
</bpmn:process>
|
37
|
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
38
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
|
39
|
+
<bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
|
40
|
+
<dc:Bounds x="5" y="4" width="525" height="346" />
|
41
|
+
</bpmndi:BPMNShape>
|
42
|
+
<bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
|
43
|
+
<dc:Bounds x="35" y="4" width="495" height="346" />
|
44
|
+
</bpmndi:BPMNShape>
|
45
|
+
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
|
46
|
+
<dc:Bounds x="92" y="152" width="36" height="36" />
|
47
|
+
<bpmndi:BPMNLabel>
|
48
|
+
<dc:Bounds x="98" y="195" width="24" height="14" />
|
49
|
+
</bpmndi:BPMNLabel>
|
50
|
+
</bpmndi:BPMNShape>
|
51
|
+
<bpmndi:BPMNShape id="Event_0kmuys0_di" bpmnElement="Event_0kmuys0">
|
52
|
+
<dc:Bounds x="332" y="152" width="36" height="36" />
|
53
|
+
</bpmndi:BPMNShape>
|
54
|
+
<bpmndi:BPMNShape id="Activity_04h2kr7_di" bpmnElement="Activity_09zn4t5">
|
55
|
+
<dc:Bounds x="180" y="130" width="100" height="80" />
|
56
|
+
</bpmndi:BPMNShape>
|
57
|
+
<bpmndi:BPMNShape id="Event_1gy657v_di" bpmnElement="Event_1gy657v">
|
58
|
+
<dc:Bounds x="362" y="272" width="36" height="36" />
|
59
|
+
</bpmndi:BPMNShape>
|
60
|
+
<bpmndi:BPMNShape id="Event_0s7ur9g_di" bpmnElement="Event_1w4tivm">
|
61
|
+
<dc:Bounds x="222" y="192" width="36" height="36" />
|
62
|
+
</bpmndi:BPMNShape>
|
63
|
+
<bpmndi:BPMNEdge id="Flow_14izvt0_di" bpmnElement="Flow_14izvt0">
|
64
|
+
<di:waypoint x="128" y="170" />
|
65
|
+
<di:waypoint x="180" y="170" />
|
66
|
+
</bpmndi:BPMNEdge>
|
67
|
+
<bpmndi:BPMNEdge id="Flow_1ukmuxb_di" bpmnElement="Flow_1ukmuxb">
|
68
|
+
<di:waypoint x="280" y="170" />
|
69
|
+
<di:waypoint x="332" y="170" />
|
70
|
+
</bpmndi:BPMNEdge>
|
71
|
+
<bpmndi:BPMNEdge id="Flow_0tgf785_di" bpmnElement="Flow_0tgf785">
|
72
|
+
<di:waypoint x="240" y="228" />
|
73
|
+
<di:waypoint x="240" y="290" />
|
74
|
+
<di:waypoint x="362" y="290" />
|
75
|
+
</bpmndi:BPMNEdge>
|
76
|
+
</bpmndi:BPMNPlane>
|
77
|
+
</bpmndi:BPMNDiagram>
|
78
|
+
</bpmn:definitions>
|