@5minds/node-red-contrib-processcube 0.15.0-fix-error-in-process-instance-query-f9f0d2-lz03zzg4 → 0.15.0
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 +12 -0
- package/examples/External-Task-Sample.json +252 -0
- package/externaltask-error.html +16 -2
- package/externaltask-error.js +11 -13
- package/externaltask-input.html +19 -2
- package/externaltask-input.js +102 -46
- package/externaltask-output.html +12 -2
- package/externaltask-output.js +3 -3
- package/message-event-trigger.js +6 -10
- package/nodered/node-red-contrib-processcube-flows.json +216 -132
- package/nodered/package.json +1 -0
- package/nodered/settings.js +1 -1
- package/package.json +3 -6
- package/process-start.js +6 -11
- package/processcube-engine-config.js +15 -0
- package/processdefinition-query.js +1 -9
- package/processes/External-Task-Sample.bpmn +94 -0
- package/processinstance-query.js +1 -10
- package/signal-event-trigger.js +6 -10
- package/usertask-finished-listener.js +1 -9
- package/usertask-input.js +17 -13
- package/usertask-new-listener.js +1 -9
- package/usertask-output.js +1 -9
- package/processes/CheckError.bpmn +0 -78
- package/processes/NodeRedExternalTask.bpmn +0 -77
- package/processes/SampleUserTask.bpmn +0 -95
@@ -1,8 +1,16 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"id": "3f916448523ed12b",
|
4
|
+
"type": "tab",
|
5
|
+
"label": "Node-Inspector",
|
6
|
+
"disabled": false,
|
7
|
+
"info": "",
|
8
|
+
"env": []
|
9
|
+
},
|
2
10
|
{
|
3
11
|
"id": "a23d2e782beb66f4",
|
4
12
|
"type": "tab",
|
5
|
-
"label": "
|
13
|
+
"label": "External Task Sample",
|
6
14
|
"disabled": false,
|
7
15
|
"info": "",
|
8
16
|
"env": []
|
@@ -79,24 +87,176 @@
|
|
79
87
|
"w": 572,
|
80
88
|
"h": 142
|
81
89
|
},
|
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
|
+
},
|
82
165
|
{
|
83
166
|
"id": "42e6796dddd9d4db",
|
84
167
|
"type": "processcube-engine-config",
|
85
168
|
"url": "http://engine:8000"
|
86
169
|
},
|
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
|
+
},
|
87
247
|
{
|
88
248
|
"id": "2991a5e6df2b87d2",
|
89
249
|
"type": "externaltask-input",
|
90
250
|
"z": "a23d2e782beb66f4",
|
251
|
+
"g": "70d7a70e375b162a",
|
91
252
|
"name": "Test",
|
92
253
|
"engine": "42e6796dddd9d4db",
|
93
254
|
"topic": "Test",
|
94
|
-
"x":
|
95
|
-
"y":
|
255
|
+
"x": 110,
|
256
|
+
"y": 180,
|
96
257
|
"wires": [
|
97
258
|
[
|
98
|
-
"d56bb7cd73fd220c"
|
99
|
-
"75c7bb5cc34e354a"
|
259
|
+
"d56bb7cd73fd220c"
|
100
260
|
]
|
101
261
|
]
|
102
262
|
},
|
@@ -104,15 +264,17 @@
|
|
104
264
|
"id": "911fde53bcbb7e3f",
|
105
265
|
"type": "externaltask-output",
|
106
266
|
"z": "a23d2e782beb66f4",
|
267
|
+
"g": "70d7a70e375b162a",
|
107
268
|
"name": "Test Ende",
|
108
|
-
"x":
|
109
|
-
"y":
|
269
|
+
"x": 460,
|
270
|
+
"y": 180,
|
110
271
|
"wires": []
|
111
272
|
},
|
112
273
|
{
|
113
274
|
"id": "d56bb7cd73fd220c",
|
114
275
|
"type": "delay",
|
115
276
|
"z": "a23d2e782beb66f4",
|
277
|
+
"g": "70d7a70e375b162a",
|
116
278
|
"name": "",
|
117
279
|
"pauseType": "delay",
|
118
280
|
"timeout": "1",
|
@@ -127,56 +289,23 @@
|
|
127
289
|
"allowrate": false,
|
128
290
|
"outputs": 1,
|
129
291
|
"x": 280,
|
130
|
-
"y":
|
292
|
+
"y": 180,
|
131
293
|
"wires": [
|
132
294
|
[
|
133
|
-
"911fde53bcbb7e3f"
|
134
|
-
"69aec57d8bb00292"
|
295
|
+
"911fde53bcbb7e3f"
|
135
296
|
]
|
136
297
|
]
|
137
298
|
},
|
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
|
-
},
|
171
299
|
{
|
172
300
|
"id": "18e05d562d48f32d",
|
173
301
|
"type": "externaltask-input",
|
174
302
|
"z": "a23d2e782beb66f4",
|
303
|
+
"g": "31cb6729aac0ba46",
|
175
304
|
"name": "SampleError",
|
176
305
|
"engine": "42e6796dddd9d4db",
|
177
306
|
"topic": "SampleError",
|
178
|
-
"x":
|
179
|
-
"y":
|
307
|
+
"x": 130,
|
308
|
+
"y": 360,
|
180
309
|
"wires": [
|
181
310
|
[
|
182
311
|
"49aee03a7885fae8"
|
@@ -187,6 +316,7 @@
|
|
187
316
|
"id": "49aee03a7885fae8",
|
188
317
|
"type": "delay",
|
189
318
|
"z": "a23d2e782beb66f4",
|
319
|
+
"g": "31cb6729aac0ba46",
|
190
320
|
"name": "",
|
191
321
|
"pauseType": "delay",
|
192
322
|
"timeout": "5",
|
@@ -200,8 +330,8 @@
|
|
200
330
|
"drop": false,
|
201
331
|
"allowrate": false,
|
202
332
|
"outputs": 1,
|
203
|
-
"x":
|
204
|
-
"y":
|
333
|
+
"x": 320,
|
334
|
+
"y": 360,
|
205
335
|
"wires": [
|
206
336
|
[
|
207
337
|
"bd68c4bdc53b8f80"
|
@@ -212,15 +342,14 @@
|
|
212
342
|
"id": "e4555d9019cd3f47",
|
213
343
|
"type": "catch",
|
214
344
|
"z": "a23d2e782beb66f4",
|
345
|
+
"g": "31cb6729aac0ba46",
|
215
346
|
"name": "",
|
216
|
-
"scope":
|
347
|
+
"scope": "group",
|
217
348
|
"uncaught": false,
|
218
|
-
"x":
|
219
|
-
"y":
|
349
|
+
"x": 510,
|
350
|
+
"y": 420,
|
220
351
|
"wires": [
|
221
352
|
[
|
222
|
-
"fa1c26d470c38efd",
|
223
|
-
"019797b5a0882e7b",
|
224
353
|
"fb87f79852b22e4a"
|
225
354
|
]
|
226
355
|
]
|
@@ -229,7 +358,8 @@
|
|
229
358
|
"id": "bd68c4bdc53b8f80",
|
230
359
|
"type": "function",
|
231
360
|
"z": "a23d2e782beb66f4",
|
232
|
-
"
|
361
|
+
"g": "31cb6729aac0ba46",
|
362
|
+
"name": "raise Error",
|
233
363
|
"func": "throw Error(\"hello error\");\n\nreturn msg;",
|
234
364
|
"outputs": 1,
|
235
365
|
"timeout": 0,
|
@@ -237,55 +367,23 @@
|
|
237
367
|
"initialize": "",
|
238
368
|
"finalize": "",
|
239
369
|
"libs": [],
|
240
|
-
"x":
|
241
|
-
"y":
|
370
|
+
"x": 510,
|
371
|
+
"y": 360,
|
242
372
|
"wires": [
|
243
373
|
[
|
244
374
|
"1ba1e62c9935255f"
|
245
375
|
]
|
246
376
|
]
|
247
377
|
},
|
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
|
-
},
|
281
378
|
{
|
282
379
|
"id": "fb87f79852b22e4a",
|
283
380
|
"type": "externaltask-error",
|
284
381
|
"z": "a23d2e782beb66f4",
|
285
|
-
"
|
382
|
+
"g": "31cb6729aac0ba46",
|
383
|
+
"name": "Send Error to Engine",
|
286
384
|
"error": "MyErrorCode",
|
287
|
-
"x":
|
288
|
-
"y":
|
385
|
+
"x": 720,
|
386
|
+
"y": 420,
|
289
387
|
"wires": [
|
290
388
|
[]
|
291
389
|
]
|
@@ -294,56 +392,42 @@
|
|
294
392
|
"id": "1ba1e62c9935255f",
|
295
393
|
"type": "externaltask-output",
|
296
394
|
"z": "a23d2e782beb66f4",
|
395
|
+
"g": "31cb6729aac0ba46",
|
297
396
|
"name": "",
|
298
|
-
"x":
|
299
|
-
"y":
|
397
|
+
"x": 710,
|
398
|
+
"y": 360,
|
300
399
|
"wires": []
|
301
400
|
},
|
302
401
|
{
|
303
|
-
"id": "
|
304
|
-
"type": "
|
402
|
+
"id": "15a5f64b9e2e05fc",
|
403
|
+
"type": "comment",
|
305
404
|
"z": "a23d2e782beb66f4",
|
306
|
-
"
|
307
|
-
"
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
"
|
318
|
-
"
|
319
|
-
"
|
320
|
-
"onceDelay": 0.1,
|
321
|
-
"topic": "",
|
322
|
-
"payload": "{\t \t}",
|
323
|
-
"payloadType": "jsonata",
|
405
|
+
"g": "70d7a70e375b162a",
|
406
|
+
"name": "Simple External Task handling",
|
407
|
+
"info": "",
|
408
|
+
"x": 180,
|
409
|
+
"y": 120,
|
410
|
+
"wires": []
|
411
|
+
},
|
412
|
+
{
|
413
|
+
"id": "b49f226ba865e164",
|
414
|
+
"type": "comment",
|
415
|
+
"z": "a23d2e782beb66f4",
|
416
|
+
"g": "31cb6729aac0ba46",
|
417
|
+
"name": "Error handling with external tasks",
|
418
|
+
"info": "",
|
324
419
|
"x": 190,
|
325
|
-
"y":
|
326
|
-
"wires": [
|
327
|
-
[
|
328
|
-
"ddcde0ab7abfb8af"
|
329
|
-
]
|
330
|
-
]
|
420
|
+
"y": 300,
|
421
|
+
"wires": []
|
331
422
|
},
|
332
423
|
{
|
333
|
-
"id": "
|
334
|
-
"type": "
|
424
|
+
"id": "799125e21de02f13",
|
425
|
+
"type": "comment",
|
335
426
|
"z": "a23d2e782beb66f4",
|
336
|
-
"name": "
|
337
|
-
"
|
338
|
-
"
|
339
|
-
"
|
340
|
-
"tostatus": false,
|
341
|
-
"complete": "true",
|
342
|
-
"targetType": "full",
|
343
|
-
"statusVal": "",
|
344
|
-
"statusType": "auto",
|
345
|
-
"x": 480,
|
346
|
-
"y": 1200,
|
427
|
+
"name": "For Testing, deploy \"External-Task-Sample.bpmn\" and start the process.",
|
428
|
+
"info": "",
|
429
|
+
"x": 300,
|
430
|
+
"y": 40,
|
347
431
|
"wires": []
|
348
432
|
},
|
349
433
|
{
|
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",
|
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.1",
|
55
55
|
"jwt-decode": "^4.0.0",
|
56
56
|
"openid-client": "^5.5.0"
|
57
57
|
},
|
@@ -61,8 +61,5 @@
|
|
61
61
|
"workflow",
|
62
62
|
"bpmn",
|
63
63
|
"low-code"
|
64
|
-
]
|
65
|
-
"devDependencies": {
|
66
|
-
"prettier": "^3.3.3"
|
67
|
-
}
|
64
|
+
]
|
68
65
|
}
|
package/process-start.js
CHANGED
@@ -5,19 +5,10 @@ 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();
|
10
8
|
|
11
9
|
this.engine = this.server = RED.nodes.getNode(config.engine);
|
12
10
|
|
13
|
-
const
|
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
|
-
}
|
11
|
+
const client = this.engine.getEngineClient();
|
21
12
|
|
22
13
|
node.on('input', function (msg) {
|
23
14
|
const startParameters = {
|
@@ -32,7 +23,11 @@ module.exports = function (RED) {
|
|
32
23
|
msg.payload = result;
|
33
24
|
|
34
25
|
node.send(msg);
|
35
|
-
node.status({
|
26
|
+
node.status({
|
27
|
+
fill: 'blue',
|
28
|
+
shape: 'dot',
|
29
|
+
text: `started ${result.processInstanceId}`,
|
30
|
+
});
|
36
31
|
})
|
37
32
|
.catch((error) => {
|
38
33
|
node.error(error);
|
@@ -14,6 +14,7 @@ module.exports = function (RED) {
|
|
14
14
|
this.registerOnIdentityChanged = function (callback) {
|
15
15
|
identityChangedCallbacks.push(callback);
|
16
16
|
};
|
17
|
+
|
17
18
|
this.setIdentity = (identity) => {
|
18
19
|
this.identity = identity;
|
19
20
|
|
@@ -22,6 +23,20 @@ module.exports = function (RED) {
|
|
22
23
|
}
|
23
24
|
};
|
24
25
|
|
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
|
+
|
25
40
|
if (this.credentials.clientId && this.credentials.clientSecret) {
|
26
41
|
const engineClient = new engine_client.EngineClient(this.url);
|
27
42
|
|
@@ -8,18 +8,10 @@ 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();
|
12
11
|
|
13
12
|
this.engine = this.server = RED.nodes.getNode(config.engine);
|
14
13
|
|
15
|
-
const
|
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
|
-
}
|
14
|
+
const client = this.engine.getEngineClient();
|
23
15
|
|
24
16
|
var eventEmitter = flowContext.get('emitter');
|
25
17
|
|