@5minds/node-red-contrib-processcube 1.6.5-develop-054f70-m5yacm5t → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +1 -1
- package/endevent-finished-listener.js +3 -3
- package/externaltask-event-listener.js +2 -2
- package/externaltask-input.js +9 -9
- package/message-event-trigger.js +2 -2
- package/nodered/flows.json +491 -3
- package/package.json +1 -1
- package/process-event-listener.js +10 -10
- package/process-start.js +14 -8
- package/process-terminate.js +2 -2
- package/processcube-engine-config.js +1 -1
- package/processdefinition-query.js +2 -2
- package/processes/StartProcessSample.bpmn +54 -0
- package/processes/TriggerMessageEvent.bpmn +79 -0
- package/processinstance-delete.js +7 -7
- package/processinstance-query.js +2 -2
- package/signal-event-trigger.js +2 -2
- package/usertask-event-listener.js +4 -4
- package/usertask-input.js +2 -2
- package/usertask-output.js +3 -3
- package/wait-for-usertask.js +3 -3
package/Dockerfile
CHANGED
@@ -10,7 +10,7 @@ module.exports = function (RED) {
|
|
10
10
|
const client = node.engine.engineClient;
|
11
11
|
|
12
12
|
if (!client) {
|
13
|
-
node.error('No engine configured.');
|
13
|
+
node.error('No engine configured.', {});
|
14
14
|
return;
|
15
15
|
}
|
16
16
|
|
@@ -21,7 +21,7 @@ module.exports = function (RED) {
|
|
21
21
|
});
|
22
22
|
});
|
23
23
|
} catch (error) {
|
24
|
-
node.error(error);
|
24
|
+
node.error(error, {});
|
25
25
|
}
|
26
26
|
|
27
27
|
node.on('close', async () => {
|
@@ -33,7 +33,7 @@ module.exports = function (RED) {
|
|
33
33
|
|
34
34
|
if (node.engine) {
|
35
35
|
register().catch((error) => {
|
36
|
-
node.error(error);
|
36
|
+
node.error(error, {});
|
37
37
|
});
|
38
38
|
}
|
39
39
|
}
|
@@ -10,7 +10,7 @@ module.exports = function (RED) {
|
|
10
10
|
const client = node.engine.engineClient;
|
11
11
|
|
12
12
|
if (!client) {
|
13
|
-
node.error('No engine configured.');
|
13
|
+
node.error('No engine configured.', {});
|
14
14
|
return;
|
15
15
|
}
|
16
16
|
|
@@ -52,7 +52,7 @@ module.exports = function (RED) {
|
|
52
52
|
|
53
53
|
if (node.engine) {
|
54
54
|
register().catch((error) => {
|
55
|
-
node.error(error);
|
55
|
+
node.error(error, {});
|
56
56
|
});
|
57
57
|
}
|
58
58
|
}
|
package/externaltask-input.js
CHANGED
@@ -37,7 +37,7 @@ module.exports = function (RED) {
|
|
37
37
|
const client = node.engine.engineClient;
|
38
38
|
|
39
39
|
if (!client) {
|
40
|
-
node.error('No engine configured.');
|
40
|
+
node.error('No engine configured.', {});
|
41
41
|
return;
|
42
42
|
}
|
43
43
|
const etwCallback = async (payload, externalTask) => {
|
@@ -45,7 +45,7 @@ module.exports = function (RED) {
|
|
45
45
|
try {
|
46
46
|
callback(data);
|
47
47
|
} catch (error) {
|
48
|
-
node.error(`Error in callback 'saveHandleCallback': ${error.message}
|
48
|
+
node.error(`Error in callback 'saveHandleCallback': ${error.message}`, {});
|
49
49
|
}
|
50
50
|
};
|
51
51
|
|
@@ -138,7 +138,8 @@ module.exports = function (RED) {
|
|
138
138
|
case 'finishExternalTask':
|
139
139
|
case 'processExternalTask':
|
140
140
|
node.error(
|
141
|
-
`Worker error ${errorType} for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}': ${error.message}
|
141
|
+
`Worker error ${errorType} for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}': ${error.message}`,
|
142
|
+
{}
|
142
143
|
);
|
143
144
|
|
144
145
|
if (externalTask) {
|
@@ -149,11 +150,10 @@ module.exports = function (RED) {
|
|
149
150
|
break;
|
150
151
|
case 'fetchAndLock':
|
151
152
|
node.status({});
|
152
|
-
node.error(`Worker error ${errorType}: ${error.message}
|
153
|
+
node.error(`Worker error ${errorType}: ${error.message}`, {});
|
153
154
|
break;
|
154
155
|
default:
|
155
156
|
// reduce noise error logs
|
156
|
-
// node.error(`Worker error ${errorType}: ${error.message}`);
|
157
157
|
break;
|
158
158
|
}
|
159
159
|
});
|
@@ -162,25 +162,25 @@ module.exports = function (RED) {
|
|
162
162
|
externalTaskWorker.start();
|
163
163
|
showStatus(node, Object.keys(started_external_tasks).length);
|
164
164
|
} catch (error) {
|
165
|
-
node.error(`Worker start 'externalTaskWorker.start' failed: ${error.message}
|
165
|
+
node.error(`Worker start 'externalTaskWorker.start' failed: ${error.message}`, {});
|
166
166
|
}
|
167
167
|
|
168
168
|
node.on('close', () => {
|
169
169
|
try {
|
170
170
|
externalTaskWorker.stop();
|
171
171
|
} catch {
|
172
|
-
node.error('Client close failed');
|
172
|
+
node.error('Client close failed', {});
|
173
173
|
}
|
174
174
|
});
|
175
175
|
})
|
176
176
|
.catch((error) => {
|
177
|
-
node.error(`Error in subscribeToExternalTaskTopic: ${error.message}
|
177
|
+
node.error(`Error in subscribeToExternalTaskTopic: ${error.message}`, {});
|
178
178
|
});
|
179
179
|
};
|
180
180
|
|
181
181
|
if (node.engine) {
|
182
182
|
register().catch((error) => {
|
183
|
-
node.error(error);
|
183
|
+
node.error(error, {});
|
184
184
|
});
|
185
185
|
}
|
186
186
|
}
|
package/message-event-trigger.js
CHANGED
@@ -8,7 +8,7 @@ module.exports = function (RED) {
|
|
8
8
|
const client = node.engine.engineClient;
|
9
9
|
|
10
10
|
if (!client) {
|
11
|
-
node.error('No engine configured.');
|
11
|
+
node.error('No engine configured.', msg);
|
12
12
|
return;
|
13
13
|
}
|
14
14
|
|
@@ -28,7 +28,7 @@ module.exports = function (RED) {
|
|
28
28
|
});
|
29
29
|
})
|
30
30
|
.catch((error) => {
|
31
|
-
node.error(error);
|
31
|
+
node.error(error, msg);
|
32
32
|
});
|
33
33
|
});
|
34
34
|
}
|
package/nodered/flows.json
CHANGED
@@ -87,6 +87,22 @@
|
|
87
87
|
"info": "",
|
88
88
|
"env": []
|
89
89
|
},
|
90
|
+
{
|
91
|
+
"id": "2d4f4d815c889920",
|
92
|
+
"type": "tab",
|
93
|
+
"label": "Test Trigger-Event",
|
94
|
+
"disabled": false,
|
95
|
+
"info": "",
|
96
|
+
"env": []
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"id": "b5a25174d4dff5e2",
|
100
|
+
"type": "tab",
|
101
|
+
"label": "Start process",
|
102
|
+
"disabled": false,
|
103
|
+
"info": "",
|
104
|
+
"env": []
|
105
|
+
},
|
90
106
|
{
|
91
107
|
"id": "4c59118134081e05",
|
92
108
|
"type": "group",
|
@@ -533,6 +549,84 @@
|
|
533
549
|
"w": 682,
|
534
550
|
"h": 202
|
535
551
|
},
|
552
|
+
{
|
553
|
+
"id": "48f72a8b2cb5ead9",
|
554
|
+
"type": "group",
|
555
|
+
"z": "2d4f4d815c889920",
|
556
|
+
"style": {
|
557
|
+
"stroke": "#5d5d5d",
|
558
|
+
"stroke-opacity": "1",
|
559
|
+
"fill": "#27272a",
|
560
|
+
"fill-opacity": "0.5",
|
561
|
+
"label": true,
|
562
|
+
"label-position": "nw",
|
563
|
+
"color": "#e2e8f0"
|
564
|
+
},
|
565
|
+
"nodes": [
|
566
|
+
"9aaa1850f6cf0c5b",
|
567
|
+
"b92f9b7c8839bd52",
|
568
|
+
"e7c528682ace1eee",
|
569
|
+
"1795b84421188c56",
|
570
|
+
"0217c4f569ceb289"
|
571
|
+
],
|
572
|
+
"x": 54,
|
573
|
+
"y": 39,
|
574
|
+
"w": 752,
|
575
|
+
"h": 142
|
576
|
+
},
|
577
|
+
{
|
578
|
+
"id": "4736a27919052199",
|
579
|
+
"type": "group",
|
580
|
+
"z": "2d4f4d815c889920",
|
581
|
+
"style": {
|
582
|
+
"stroke": "#5d5d5d",
|
583
|
+
"stroke-opacity": "1",
|
584
|
+
"fill": "#27272a",
|
585
|
+
"fill-opacity": "0.5",
|
586
|
+
"label": true,
|
587
|
+
"label-position": "nw",
|
588
|
+
"color": "#e2e8f0"
|
589
|
+
},
|
590
|
+
"nodes": [
|
591
|
+
"d0d55ea4c120f824",
|
592
|
+
"9fa5516904f5ddc9",
|
593
|
+
"25c81fa425019087",
|
594
|
+
"4ff784bd746f357a",
|
595
|
+
"1605dca966cb1ca3",
|
596
|
+
"15c494ef7b808eee",
|
597
|
+
"e62b0d58687ce755",
|
598
|
+
"700a1f33a7472ace"
|
599
|
+
],
|
600
|
+
"x": 54,
|
601
|
+
"y": 199,
|
602
|
+
"w": 792,
|
603
|
+
"h": 262
|
604
|
+
},
|
605
|
+
{
|
606
|
+
"id": "8532caa2120a8ff3",
|
607
|
+
"type": "group",
|
608
|
+
"z": "2d4f4d815c889920",
|
609
|
+
"style": {
|
610
|
+
"stroke": "#5d5d5d",
|
611
|
+
"stroke-opacity": "1",
|
612
|
+
"fill": "#27272a",
|
613
|
+
"fill-opacity": "0.5",
|
614
|
+
"label": true,
|
615
|
+
"label-position": "nw",
|
616
|
+
"color": "#e2e8f0"
|
617
|
+
},
|
618
|
+
"nodes": [
|
619
|
+
"3da3f0919d261dbb",
|
620
|
+
"499158b3e609a621",
|
621
|
+
"b463ae80bf2b5886",
|
622
|
+
"1db58abf4179cb33",
|
623
|
+
"01610786730a8edb"
|
624
|
+
],
|
625
|
+
"x": 54,
|
626
|
+
"y": 479,
|
627
|
+
"w": 792,
|
628
|
+
"h": 142
|
629
|
+
},
|
536
630
|
{
|
537
631
|
"id": "42e6796dddd9d4db",
|
538
632
|
"type": "processcube-engine-config",
|
@@ -2152,12 +2246,14 @@
|
|
2152
2246
|
"z": "d6c450fe98faa45f",
|
2153
2247
|
"name": "",
|
2154
2248
|
"engine": "42e6796dddd9d4db",
|
2155
|
-
"result": "payload",
|
2249
|
+
"result": "payload.formResult",
|
2156
2250
|
"result_type": "msg",
|
2157
2251
|
"x": 880,
|
2158
2252
|
"y": 200,
|
2159
2253
|
"wires": [
|
2160
|
-
[
|
2254
|
+
[
|
2255
|
+
"82e58f4fb135162c"
|
2256
|
+
]
|
2161
2257
|
]
|
2162
2258
|
},
|
2163
2259
|
{
|
@@ -2165,7 +2261,7 @@
|
|
2165
2261
|
"type": "function",
|
2166
2262
|
"z": "d6c450fe98faa45f",
|
2167
2263
|
"name": "pre",
|
2168
|
-
"func": "msg.payload = {};\nreturn msg;",
|
2264
|
+
"func": "msg.payload.formResult = {\n \"resultFrom\": \"userTask\"\n};\nreturn msg;",
|
2169
2265
|
"outputs": 1,
|
2170
2266
|
"timeout": 0,
|
2171
2267
|
"noerr": 0,
|
@@ -2232,6 +2328,22 @@
|
|
2232
2328
|
"y": 60,
|
2233
2329
|
"wires": []
|
2234
2330
|
},
|
2331
|
+
{
|
2332
|
+
"id": "82e58f4fb135162c",
|
2333
|
+
"type": "debug",
|
2334
|
+
"z": "d6c450fe98faa45f",
|
2335
|
+
"name": "debug 1",
|
2336
|
+
"active": true,
|
2337
|
+
"tosidebar": true,
|
2338
|
+
"console": false,
|
2339
|
+
"tostatus": false,
|
2340
|
+
"complete": "false",
|
2341
|
+
"statusVal": "",
|
2342
|
+
"statusType": "auto",
|
2343
|
+
"x": 990,
|
2344
|
+
"y": 240,
|
2345
|
+
"wires": []
|
2346
|
+
},
|
2235
2347
|
{
|
2236
2348
|
"id": "930624edc6169c55",
|
2237
2349
|
"type": "process-event-listener",
|
@@ -2417,5 +2529,381 @@
|
|
2417
2529
|
"x": 210,
|
2418
2530
|
"y": 80,
|
2419
2531
|
"wires": []
|
2532
|
+
},
|
2533
|
+
{
|
2534
|
+
"id": "9aaa1850f6cf0c5b",
|
2535
|
+
"type": "message-event-trigger",
|
2536
|
+
"z": "2d4f4d815c889920",
|
2537
|
+
"g": "48f72a8b2cb5ead9",
|
2538
|
+
"name": "send message (json)",
|
2539
|
+
"engine": "42e6796dddd9d4db",
|
2540
|
+
"messagename": "TheMessage",
|
2541
|
+
"x": 500,
|
2542
|
+
"y": 140,
|
2543
|
+
"wires": [
|
2544
|
+
[
|
2545
|
+
"e7c528682ace1eee"
|
2546
|
+
]
|
2547
|
+
]
|
2548
|
+
},
|
2549
|
+
{
|
2550
|
+
"id": "b92f9b7c8839bd52",
|
2551
|
+
"type": "inject",
|
2552
|
+
"z": "2d4f4d815c889920",
|
2553
|
+
"g": "48f72a8b2cb5ead9",
|
2554
|
+
"name": "",
|
2555
|
+
"props": [],
|
2556
|
+
"repeat": "",
|
2557
|
+
"crontab": "",
|
2558
|
+
"once": false,
|
2559
|
+
"onceDelay": 0.1,
|
2560
|
+
"topic": "",
|
2561
|
+
"x": 150,
|
2562
|
+
"y": 140,
|
2563
|
+
"wires": [
|
2564
|
+
[
|
2565
|
+
"1795b84421188c56"
|
2566
|
+
]
|
2567
|
+
]
|
2568
|
+
},
|
2569
|
+
{
|
2570
|
+
"id": "e7c528682ace1eee",
|
2571
|
+
"type": "debug",
|
2572
|
+
"z": "2d4f4d815c889920",
|
2573
|
+
"g": "48f72a8b2cb5ead9",
|
2574
|
+
"name": "debug 9",
|
2575
|
+
"active": true,
|
2576
|
+
"tosidebar": true,
|
2577
|
+
"console": false,
|
2578
|
+
"tostatus": false,
|
2579
|
+
"complete": "false",
|
2580
|
+
"statusVal": "",
|
2581
|
+
"statusType": "auto",
|
2582
|
+
"x": 700,
|
2583
|
+
"y": 140,
|
2584
|
+
"wires": []
|
2585
|
+
},
|
2586
|
+
{
|
2587
|
+
"id": "d0d55ea4c120f824",
|
2588
|
+
"type": "inject",
|
2589
|
+
"z": "2d4f4d815c889920",
|
2590
|
+
"g": "4736a27919052199",
|
2591
|
+
"name": "",
|
2592
|
+
"props": [],
|
2593
|
+
"repeat": "",
|
2594
|
+
"crontab": "",
|
2595
|
+
"once": false,
|
2596
|
+
"onceDelay": 0.1,
|
2597
|
+
"topic": "",
|
2598
|
+
"x": 150,
|
2599
|
+
"y": 300,
|
2600
|
+
"wires": [
|
2601
|
+
[
|
2602
|
+
"4ff784bd746f357a"
|
2603
|
+
]
|
2604
|
+
]
|
2605
|
+
},
|
2606
|
+
{
|
2607
|
+
"id": "9fa5516904f5ddc9",
|
2608
|
+
"type": "message-event-trigger",
|
2609
|
+
"z": "2d4f4d815c889920",
|
2610
|
+
"g": "4736a27919052199",
|
2611
|
+
"name": "send message (xml)",
|
2612
|
+
"engine": "42e6796dddd9d4db",
|
2613
|
+
"messagename": "TheMessage",
|
2614
|
+
"x": 500,
|
2615
|
+
"y": 300,
|
2616
|
+
"wires": [
|
2617
|
+
[
|
2618
|
+
"25c81fa425019087"
|
2619
|
+
]
|
2620
|
+
]
|
2621
|
+
},
|
2622
|
+
{
|
2623
|
+
"id": "25c81fa425019087",
|
2624
|
+
"type": "debug",
|
2625
|
+
"z": "2d4f4d815c889920",
|
2626
|
+
"g": "4736a27919052199",
|
2627
|
+
"name": "debug 10",
|
2628
|
+
"active": true,
|
2629
|
+
"tosidebar": true,
|
2630
|
+
"console": false,
|
2631
|
+
"tostatus": false,
|
2632
|
+
"complete": "false",
|
2633
|
+
"statusVal": "",
|
2634
|
+
"statusType": "auto",
|
2635
|
+
"x": 700,
|
2636
|
+
"y": 300,
|
2637
|
+
"wires": []
|
2638
|
+
},
|
2639
|
+
{
|
2640
|
+
"id": "1795b84421188c56",
|
2641
|
+
"type": "function",
|
2642
|
+
"z": "2d4f4d815c889920",
|
2643
|
+
"g": "48f72a8b2cb5ead9",
|
2644
|
+
"name": "build json",
|
2645
|
+
"func": "msg.payload = {\n \"hello\": \"world\"\n};\n\n\nreturn msg;",
|
2646
|
+
"outputs": 1,
|
2647
|
+
"timeout": 0,
|
2648
|
+
"noerr": 0,
|
2649
|
+
"initialize": "",
|
2650
|
+
"finalize": "",
|
2651
|
+
"libs": [],
|
2652
|
+
"x": 300,
|
2653
|
+
"y": 140,
|
2654
|
+
"wires": [
|
2655
|
+
[
|
2656
|
+
"9aaa1850f6cf0c5b"
|
2657
|
+
]
|
2658
|
+
]
|
2659
|
+
},
|
2660
|
+
{
|
2661
|
+
"id": "4ff784bd746f357a",
|
2662
|
+
"type": "function",
|
2663
|
+
"z": "2d4f4d815c889920",
|
2664
|
+
"g": "4736a27919052199",
|
2665
|
+
"name": "build xml",
|
2666
|
+
"func": "msg.payload = `\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n <hello>world</hello>\n</root>\n`;\n\nreturn msg;",
|
2667
|
+
"outputs": 1,
|
2668
|
+
"timeout": 0,
|
2669
|
+
"noerr": 0,
|
2670
|
+
"initialize": "",
|
2671
|
+
"finalize": "",
|
2672
|
+
"libs": [],
|
2673
|
+
"x": 300,
|
2674
|
+
"y": 300,
|
2675
|
+
"wires": [
|
2676
|
+
[
|
2677
|
+
"9fa5516904f5ddc9"
|
2678
|
+
]
|
2679
|
+
]
|
2680
|
+
},
|
2681
|
+
{
|
2682
|
+
"id": "0217c4f569ceb289",
|
2683
|
+
"type": "comment",
|
2684
|
+
"z": "2d4f4d815c889920",
|
2685
|
+
"g": "48f72a8b2cb5ead9",
|
2686
|
+
"name": "Daten im Payload als JSON an TheMessage versenden",
|
2687
|
+
"info": "",
|
2688
|
+
"x": 280,
|
2689
|
+
"y": 80,
|
2690
|
+
"wires": []
|
2691
|
+
},
|
2692
|
+
{
|
2693
|
+
"id": "1605dca966cb1ca3",
|
2694
|
+
"type": "comment",
|
2695
|
+
"z": "2d4f4d815c889920",
|
2696
|
+
"g": "4736a27919052199",
|
2697
|
+
"name": "Daten im Payload als XML an TheMessage versenden",
|
2698
|
+
"info": "",
|
2699
|
+
"x": 280,
|
2700
|
+
"y": 240,
|
2701
|
+
"wires": []
|
2702
|
+
},
|
2703
|
+
{
|
2704
|
+
"id": "15c494ef7b808eee",
|
2705
|
+
"type": "comment",
|
2706
|
+
"z": "2d4f4d815c889920",
|
2707
|
+
"g": "4736a27919052199",
|
2708
|
+
"name": "Fehler: da Payload kein JSON ist, darf aber nicht zu 'Internal-Server' führen",
|
2709
|
+
"info": "",
|
2710
|
+
"x": 340,
|
2711
|
+
"y": 420,
|
2712
|
+
"wires": []
|
2713
|
+
},
|
2714
|
+
{
|
2715
|
+
"id": "3da3f0919d261dbb",
|
2716
|
+
"type": "inject",
|
2717
|
+
"z": "2d4f4d815c889920",
|
2718
|
+
"g": "8532caa2120a8ff3",
|
2719
|
+
"name": "",
|
2720
|
+
"props": [],
|
2721
|
+
"repeat": "",
|
2722
|
+
"crontab": "",
|
2723
|
+
"once": false,
|
2724
|
+
"onceDelay": 0.1,
|
2725
|
+
"topic": "",
|
2726
|
+
"x": 150,
|
2727
|
+
"y": 580,
|
2728
|
+
"wires": [
|
2729
|
+
[
|
2730
|
+
"1db58abf4179cb33"
|
2731
|
+
]
|
2732
|
+
]
|
2733
|
+
},
|
2734
|
+
{
|
2735
|
+
"id": "499158b3e609a621",
|
2736
|
+
"type": "message-event-trigger",
|
2737
|
+
"z": "2d4f4d815c889920",
|
2738
|
+
"g": "8532caa2120a8ff3",
|
2739
|
+
"name": "send message (xml)",
|
2740
|
+
"engine": "42e6796dddd9d4db",
|
2741
|
+
"messagename": "TheMessage",
|
2742
|
+
"x": 540,
|
2743
|
+
"y": 580,
|
2744
|
+
"wires": [
|
2745
|
+
[
|
2746
|
+
"b463ae80bf2b5886"
|
2747
|
+
]
|
2748
|
+
]
|
2749
|
+
},
|
2750
|
+
{
|
2751
|
+
"id": "b463ae80bf2b5886",
|
2752
|
+
"type": "debug",
|
2753
|
+
"z": "2d4f4d815c889920",
|
2754
|
+
"g": "8532caa2120a8ff3",
|
2755
|
+
"name": "debug 11",
|
2756
|
+
"active": true,
|
2757
|
+
"tosidebar": true,
|
2758
|
+
"console": false,
|
2759
|
+
"tostatus": false,
|
2760
|
+
"complete": "false",
|
2761
|
+
"statusVal": "",
|
2762
|
+
"statusType": "auto",
|
2763
|
+
"x": 740,
|
2764
|
+
"y": 580,
|
2765
|
+
"wires": []
|
2766
|
+
},
|
2767
|
+
{
|
2768
|
+
"id": "1db58abf4179cb33",
|
2769
|
+
"type": "function",
|
2770
|
+
"z": "2d4f4d815c889920",
|
2771
|
+
"g": "8532caa2120a8ff3",
|
2772
|
+
"name": "pack xml in json",
|
2773
|
+
"func": "const sampleXML = `\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n <hello>world</hello>\n</root>\n`;\n\nmsg.payload = {\n \"xmlData\": sampleXML\n};\n\nreturn msg;",
|
2774
|
+
"outputs": 1,
|
2775
|
+
"timeout": 0,
|
2776
|
+
"noerr": 0,
|
2777
|
+
"initialize": "",
|
2778
|
+
"finalize": "",
|
2779
|
+
"libs": [],
|
2780
|
+
"x": 320,
|
2781
|
+
"y": 580,
|
2782
|
+
"wires": [
|
2783
|
+
[
|
2784
|
+
"499158b3e609a621"
|
2785
|
+
]
|
2786
|
+
]
|
2787
|
+
},
|
2788
|
+
{
|
2789
|
+
"id": "01610786730a8edb",
|
2790
|
+
"type": "comment",
|
2791
|
+
"z": "2d4f4d815c889920",
|
2792
|
+
"g": "8532caa2120a8ff3",
|
2793
|
+
"name": "Daten im Payload als XML in JSON verpackt an TheMessage versenden",
|
2794
|
+
"info": "",
|
2795
|
+
"x": 330,
|
2796
|
+
"y": 520,
|
2797
|
+
"wires": []
|
2798
|
+
},
|
2799
|
+
{
|
2800
|
+
"id": "e62b0d58687ce755",
|
2801
|
+
"type": "catch",
|
2802
|
+
"z": "2d4f4d815c889920",
|
2803
|
+
"g": "4736a27919052199",
|
2804
|
+
"name": "",
|
2805
|
+
"scope": "group",
|
2806
|
+
"uncaught": false,
|
2807
|
+
"x": 550,
|
2808
|
+
"y": 360,
|
2809
|
+
"wires": [
|
2810
|
+
[
|
2811
|
+
"700a1f33a7472ace"
|
2812
|
+
]
|
2813
|
+
]
|
2814
|
+
},
|
2815
|
+
{
|
2816
|
+
"id": "700a1f33a7472ace",
|
2817
|
+
"type": "debug",
|
2818
|
+
"z": "2d4f4d815c889920",
|
2819
|
+
"g": "4736a27919052199",
|
2820
|
+
"name": "Send XML error",
|
2821
|
+
"active": true,
|
2822
|
+
"tosidebar": true,
|
2823
|
+
"console": false,
|
2824
|
+
"tostatus": false,
|
2825
|
+
"complete": "true",
|
2826
|
+
"targetType": "full",
|
2827
|
+
"statusVal": "",
|
2828
|
+
"statusType": "auto",
|
2829
|
+
"x": 720,
|
2830
|
+
"y": 360,
|
2831
|
+
"wires": []
|
2832
|
+
},
|
2833
|
+
{
|
2834
|
+
"id": "8c8d9afd13c5c796",
|
2835
|
+
"type": "process-start",
|
2836
|
+
"z": "b5a25174d4dff5e2",
|
2837
|
+
"name": "",
|
2838
|
+
"engine": "42e6796dddd9d4db",
|
2839
|
+
"processmodel": "StartProcessSample_Process",
|
2840
|
+
"startevent": "StartEvent_1",
|
2841
|
+
"x": 370,
|
2842
|
+
"y": 100,
|
2843
|
+
"wires": [
|
2844
|
+
[
|
2845
|
+
"086b45f917f5297a"
|
2846
|
+
]
|
2847
|
+
]
|
2848
|
+
},
|
2849
|
+
{
|
2850
|
+
"id": "086b45f917f5297a",
|
2851
|
+
"type": "debug",
|
2852
|
+
"z": "b5a25174d4dff5e2",
|
2853
|
+
"name": "debug 39",
|
2854
|
+
"active": true,
|
2855
|
+
"tosidebar": true,
|
2856
|
+
"console": false,
|
2857
|
+
"tostatus": false,
|
2858
|
+
"complete": "false",
|
2859
|
+
"statusVal": "",
|
2860
|
+
"statusType": "auto",
|
2861
|
+
"x": 540,
|
2862
|
+
"y": 100,
|
2863
|
+
"wires": []
|
2864
|
+
},
|
2865
|
+
{
|
2866
|
+
"id": "c944ebbfc5a55f46",
|
2867
|
+
"type": "inject",
|
2868
|
+
"z": "b5a25174d4dff5e2",
|
2869
|
+
"name": "",
|
2870
|
+
"props": [
|
2871
|
+
{
|
2872
|
+
"p": "payload"
|
2873
|
+
}
|
2874
|
+
],
|
2875
|
+
"repeat": "",
|
2876
|
+
"crontab": "",
|
2877
|
+
"once": false,
|
2878
|
+
"onceDelay": 0.1,
|
2879
|
+
"topic": "",
|
2880
|
+
"payload": "{\"hello\":\"world\"}",
|
2881
|
+
"payloadType": "json",
|
2882
|
+
"x": 140,
|
2883
|
+
"y": 100,
|
2884
|
+
"wires": [
|
2885
|
+
[
|
2886
|
+
"8c8d9afd13c5c796"
|
2887
|
+
]
|
2888
|
+
]
|
2889
|
+
},
|
2890
|
+
{
|
2891
|
+
"id": "b74eab538ce0ddbe",
|
2892
|
+
"type": "inject",
|
2893
|
+
"z": "b5a25174d4dff5e2",
|
2894
|
+
"name": "mit undefined payload",
|
2895
|
+
"props": [],
|
2896
|
+
"repeat": "",
|
2897
|
+
"crontab": "",
|
2898
|
+
"once": false,
|
2899
|
+
"onceDelay": 0.1,
|
2900
|
+
"topic": "",
|
2901
|
+
"x": 160,
|
2902
|
+
"y": 160,
|
2903
|
+
"wires": [
|
2904
|
+
[
|
2905
|
+
"8c8d9afd13c5c796"
|
2906
|
+
]
|
2907
|
+
]
|
2420
2908
|
}
|
2421
2909
|
]
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@ module.exports = function (RED) {
|
|
10
10
|
const client = node.engine.engineClient;
|
11
11
|
|
12
12
|
if (!client) {
|
13
|
-
node.error('No engine configured.');
|
13
|
+
node.error('No engine configured.', {});
|
14
14
|
return;
|
15
15
|
}
|
16
16
|
|
@@ -51,7 +51,7 @@ module.exports = function (RED) {
|
|
51
51
|
});
|
52
52
|
}
|
53
53
|
} catch (error) {
|
54
|
-
node.error(error);
|
54
|
+
node.error(error, {});
|
55
55
|
}
|
56
56
|
|
57
57
|
});
|
@@ -90,7 +90,7 @@ module.exports = function (RED) {
|
|
90
90
|
});
|
91
91
|
}
|
92
92
|
} catch (error) {
|
93
|
-
node.error(error);
|
93
|
+
node.error(error, {});
|
94
94
|
}
|
95
95
|
});
|
96
96
|
case 'resumed':
|
@@ -123,7 +123,7 @@ module.exports = function (RED) {
|
|
123
123
|
});
|
124
124
|
}
|
125
125
|
} catch (error) {
|
126
|
-
node.error(error);
|
126
|
+
node.error(error, {});
|
127
127
|
}
|
128
128
|
});
|
129
129
|
case 'finished':
|
@@ -157,7 +157,7 @@ module.exports = function (RED) {
|
|
157
157
|
});
|
158
158
|
}
|
159
159
|
} catch (error) {
|
160
|
-
node.error(error);
|
160
|
+
node.error(error, {});
|
161
161
|
}
|
162
162
|
});
|
163
163
|
case 'terminated':
|
@@ -189,7 +189,7 @@ module.exports = function (RED) {
|
|
189
189
|
});
|
190
190
|
}
|
191
191
|
} catch (error) {
|
192
|
-
node.error(error);
|
192
|
+
node.error(error, {});
|
193
193
|
}
|
194
194
|
});
|
195
195
|
case 'error':
|
@@ -222,7 +222,7 @@ module.exports = function (RED) {
|
|
222
222
|
});
|
223
223
|
}
|
224
224
|
} catch (error) {
|
225
|
-
node.error(error);
|
225
|
+
node.error(error, {});
|
226
226
|
}
|
227
227
|
});
|
228
228
|
case 'owner-changed':
|
@@ -254,7 +254,7 @@ module.exports = function (RED) {
|
|
254
254
|
});
|
255
255
|
}
|
256
256
|
} catch (error) {
|
257
|
-
node.error(error);
|
257
|
+
node.error(error, {});
|
258
258
|
}
|
259
259
|
});
|
260
260
|
case 'instances-deleted':
|
@@ -286,7 +286,7 @@ module.exports = function (RED) {
|
|
286
286
|
});
|
287
287
|
}
|
288
288
|
} catch (error) {
|
289
|
-
node.error(error);
|
289
|
+
node.error(error, {});
|
290
290
|
}
|
291
291
|
});
|
292
292
|
case 'is-executable-changed':
|
@@ -350,7 +350,7 @@ module.exports = function (RED) {
|
|
350
350
|
|
351
351
|
if (node.engine) {
|
352
352
|
register().catch((error) => {
|
353
|
-
node.error(error);
|
353
|
+
node.error(error, {});
|
354
354
|
});
|
355
355
|
}
|
356
356
|
}
|
package/process-start.js
CHANGED
@@ -4,11 +4,17 @@ module.exports = function (RED) {
|
|
4
4
|
var node = this;
|
5
5
|
|
6
6
|
node.on('input', function (msg) {
|
7
|
-
let initialToken =
|
7
|
+
let initialToken = {};
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
if (msg.payload) {
|
10
|
+
initialToken = RED.util.encodeObject(msg.payload);
|
11
|
+
|
12
|
+
// remote msg and format from result
|
13
|
+
if (initialToken) {
|
14
|
+
delete initialToken.msg;
|
15
|
+
delete initialToken.format;
|
16
|
+
}
|
17
|
+
}
|
12
18
|
|
13
19
|
const startParameters = {
|
14
20
|
processModelId: msg.processModelId || config.processmodel,
|
@@ -17,12 +23,12 @@ module.exports = function (RED) {
|
|
17
23
|
};
|
18
24
|
|
19
25
|
if (!startParameters.processModelId) {
|
20
|
-
node.error('No processModelId configured.');
|
26
|
+
node.error('No processModelId configured.', msg);
|
21
27
|
return;
|
22
28
|
}
|
23
29
|
|
24
30
|
if (!startParameters.startEventId) {
|
25
|
-
node.error('No startEventId configured.');
|
31
|
+
node.error('No startEventId configured.', msg);
|
26
32
|
return;
|
27
33
|
}
|
28
34
|
|
@@ -30,7 +36,7 @@ module.exports = function (RED) {
|
|
30
36
|
const client = node.engine.engineClient;
|
31
37
|
|
32
38
|
if (!client) {
|
33
|
-
node.error('No engine configured.');
|
39
|
+
node.error('No engine configured.', msg);
|
34
40
|
return;
|
35
41
|
}
|
36
42
|
|
@@ -47,7 +53,7 @@ module.exports = function (RED) {
|
|
47
53
|
});
|
48
54
|
})
|
49
55
|
.catch((error) => {
|
50
|
-
node.error(error);
|
56
|
+
node.error(error, msg);
|
51
57
|
});
|
52
58
|
});
|
53
59
|
}
|
package/process-terminate.js
CHANGED
@@ -8,7 +8,7 @@ module.exports = function (RED) {
|
|
8
8
|
const client = node.engine.engineClient;
|
9
9
|
|
10
10
|
if (!client) {
|
11
|
-
node.error('No engine configured.');
|
11
|
+
node.error('No engine configured.', msg);
|
12
12
|
return;
|
13
13
|
}
|
14
14
|
|
@@ -18,7 +18,7 @@ module.exports = function (RED) {
|
|
18
18
|
node.send(msg);
|
19
19
|
})
|
20
20
|
.catch((error) => {
|
21
|
-
node.error(error);
|
21
|
+
node.error(error, msg);
|
22
22
|
});
|
23
23
|
});
|
24
24
|
}
|
@@ -8,7 +8,7 @@ module.exports = function (RED) {
|
|
8
8
|
const client = node.engine.engineClient;
|
9
9
|
|
10
10
|
if (!client) {
|
11
|
-
node.error('No engine configured.');
|
11
|
+
node.error('No engine configured.', msg);
|
12
12
|
return;
|
13
13
|
}
|
14
14
|
|
@@ -39,7 +39,7 @@ module.exports = function (RED) {
|
|
39
39
|
node.send(msg);
|
40
40
|
})
|
41
41
|
.catch((error) => {
|
42
|
-
node.error(error);
|
42
|
+
node.error(error, msg);
|
43
43
|
});
|
44
44
|
});
|
45
45
|
}
|
@@ -0,0 +1,54 @@
|
|
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:di="http://www.omg.org/spec/DD/20100524/DI" id="StartProcessSample_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="StartProcessSample" processRef="StartProcessSample_Process" />
|
5
|
+
</bpmn:collaboration>
|
6
|
+
<bpmn:process id="StartProcessSample_Process" name="StartProcessSample" isExecutable="true">
|
7
|
+
<bpmn:laneSet />
|
8
|
+
<bpmn:startEvent id="StartEvent_1" name="Start">
|
9
|
+
<bpmn:outgoing>Flow_1ua39s2</bpmn:outgoing>
|
10
|
+
</bpmn:startEvent>
|
11
|
+
<bpmn:sequenceFlow id="Flow_1ua39s2" sourceRef="StartEvent_1" targetRef="Event_04dvsgl" />
|
12
|
+
<bpmn:endEvent id="Event_0g0lwi9">
|
13
|
+
<bpmn:incoming>Flow_0v8gt9s</bpmn:incoming>
|
14
|
+
</bpmn:endEvent>
|
15
|
+
<bpmn:sequenceFlow id="Flow_0v8gt9s" sourceRef="Event_04dvsgl" targetRef="Event_0g0lwi9" />
|
16
|
+
<bpmn:intermediateCatchEvent id="Event_04dvsgl" name="wait 5 sek">
|
17
|
+
<bpmn:incoming>Flow_1ua39s2</bpmn:incoming>
|
18
|
+
<bpmn:outgoing>Flow_0v8gt9s</bpmn:outgoing>
|
19
|
+
<bpmn:timerEventDefinition id="TimerEventDefinition_0agbnkf">
|
20
|
+
<bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT5S</bpmn:timeDuration>
|
21
|
+
</bpmn:timerEventDefinition>
|
22
|
+
</bpmn:intermediateCatchEvent>
|
23
|
+
</bpmn:process>
|
24
|
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
25
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
|
26
|
+
<bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
|
27
|
+
<dc:Bounds x="5" y="4" width="355" height="346" />
|
28
|
+
</bpmndi:BPMNShape>
|
29
|
+
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
|
30
|
+
<dc:Bounds x="92" y="152" width="36" height="36" />
|
31
|
+
<bpmndi:BPMNLabel>
|
32
|
+
<dc:Bounds x="98" y="195" width="24" height="14" />
|
33
|
+
</bpmndi:BPMNLabel>
|
34
|
+
</bpmndi:BPMNShape>
|
35
|
+
<bpmndi:BPMNShape id="Event_0g0lwi9_di" bpmnElement="Event_0g0lwi9">
|
36
|
+
<dc:Bounds x="272" y="152" width="36" height="36" />
|
37
|
+
</bpmndi:BPMNShape>
|
38
|
+
<bpmndi:BPMNShape id="Event_0cjii9b_di" bpmnElement="Event_04dvsgl">
|
39
|
+
<dc:Bounds x="182" y="152" width="36" height="36" />
|
40
|
+
<bpmndi:BPMNLabel>
|
41
|
+
<dc:Bounds x="176" y="195" width="49" height="14" />
|
42
|
+
</bpmndi:BPMNLabel>
|
43
|
+
</bpmndi:BPMNShape>
|
44
|
+
<bpmndi:BPMNEdge id="Flow_1ua39s2_di" bpmnElement="Flow_1ua39s2">
|
45
|
+
<di:waypoint x="128" y="170" />
|
46
|
+
<di:waypoint x="182" y="170" />
|
47
|
+
</bpmndi:BPMNEdge>
|
48
|
+
<bpmndi:BPMNEdge id="Flow_0v8gt9s_di" bpmnElement="Flow_0v8gt9s">
|
49
|
+
<di:waypoint x="218" y="170" />
|
50
|
+
<di:waypoint x="272" y="170" />
|
51
|
+
</bpmndi:BPMNEdge>
|
52
|
+
</bpmndi:BPMNPlane>
|
53
|
+
</bpmndi:BPMNDiagram>
|
54
|
+
</bpmn:definitions>
|
@@ -0,0 +1,79 @@
|
|
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:di="http://www.omg.org/spec/DD/20100524/DI" id="TriggerMessageEvent_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="TriggerMessageEvent" processRef="TriggerMessageEvent_Process" />
|
5
|
+
</bpmn:collaboration>
|
6
|
+
<bpmn:process id="TriggerMessageEvent_Process" name="TriggerMessageEvent" isExecutable="true">
|
7
|
+
<bpmn:laneSet />
|
8
|
+
<bpmn:startEvent id="StartEvent_1" name="Start">
|
9
|
+
<bpmn:outgoing>Flow_0dgpahw</bpmn:outgoing>
|
10
|
+
</bpmn:startEvent>
|
11
|
+
<bpmn:task id="Activity_03mxrbl" name="Wait">
|
12
|
+
<bpmn:incoming>Flow_0dgpahw</bpmn:incoming>
|
13
|
+
<bpmn:outgoing>Flow_0mcemvh</bpmn:outgoing>
|
14
|
+
</bpmn:task>
|
15
|
+
<bpmn:sequenceFlow id="Flow_0dgpahw" sourceRef="StartEvent_1" targetRef="Activity_03mxrbl" />
|
16
|
+
<bpmn:sequenceFlow id="Flow_0mcemvh" sourceRef="Activity_03mxrbl" targetRef="Event_00ols0v" />
|
17
|
+
<bpmn:task id="Activity_18rj3h6" name="Wait again">
|
18
|
+
<bpmn:incoming>Flow_0rf5sui</bpmn:incoming>
|
19
|
+
<bpmn:outgoing>Flow_0ea110k</bpmn:outgoing>
|
20
|
+
</bpmn:task>
|
21
|
+
<bpmn:sequenceFlow id="Flow_0rf5sui" sourceRef="Event_00ols0v" targetRef="Activity_18rj3h6" />
|
22
|
+
<bpmn:endEvent id="Event_0u3xur4" name="Ende">
|
23
|
+
<bpmn:incoming>Flow_0ea110k</bpmn:incoming>
|
24
|
+
</bpmn:endEvent>
|
25
|
+
<bpmn:sequenceFlow id="Flow_0ea110k" sourceRef="Activity_18rj3h6" targetRef="Event_0u3xur4" />
|
26
|
+
<bpmn:intermediateCatchEvent id="Event_00ols0v">
|
27
|
+
<bpmn:incoming>Flow_0mcemvh</bpmn:incoming>
|
28
|
+
<bpmn:outgoing>Flow_0rf5sui</bpmn:outgoing>
|
29
|
+
<bpmn:messageEventDefinition id="MessageEventDefinition_1rx6xgv" messageRef="Message_QzApPgWg" />
|
30
|
+
</bpmn:intermediateCatchEvent>
|
31
|
+
</bpmn:process>
|
32
|
+
<bpmn:message id="Message_QzApPgWg" name="TheMessage" />
|
33
|
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
34
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
|
35
|
+
<bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
|
36
|
+
<dc:Bounds x="5" y="4" width="885" height="346" />
|
37
|
+
</bpmndi:BPMNShape>
|
38
|
+
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
|
39
|
+
<dc:Bounds x="82" y="152" width="36" height="36" />
|
40
|
+
<bpmndi:BPMNLabel>
|
41
|
+
<dc:Bounds x="88" y="195" width="24" height="14" />
|
42
|
+
</bpmndi:BPMNLabel>
|
43
|
+
</bpmndi:BPMNShape>
|
44
|
+
<bpmndi:BPMNShape id="Activity_03mxrbl_di" bpmnElement="Activity_03mxrbl">
|
45
|
+
<dc:Bounds x="170" y="130" width="100" height="80" />
|
46
|
+
<bpmndi:BPMNLabel />
|
47
|
+
</bpmndi:BPMNShape>
|
48
|
+
<bpmndi:BPMNShape id="Activity_18rj3h6_di" bpmnElement="Activity_18rj3h6">
|
49
|
+
<dc:Bounds x="410" y="130" width="100" height="80" />
|
50
|
+
<bpmndi:BPMNLabel />
|
51
|
+
</bpmndi:BPMNShape>
|
52
|
+
<bpmndi:BPMNShape id="Event_0u3xur4_di" bpmnElement="Event_0u3xur4">
|
53
|
+
<dc:Bounds x="562" y="152" width="36" height="36" />
|
54
|
+
<bpmndi:BPMNLabel>
|
55
|
+
<dc:Bounds x="567" y="195" width="26" height="14" />
|
56
|
+
</bpmndi:BPMNLabel>
|
57
|
+
</bpmndi:BPMNShape>
|
58
|
+
<bpmndi:BPMNShape id="Event_0ez1lnn_di" bpmnElement="Event_00ols0v">
|
59
|
+
<dc:Bounds x="322" y="152" width="36" height="36" />
|
60
|
+
</bpmndi:BPMNShape>
|
61
|
+
<bpmndi:BPMNEdge id="Flow_0dgpahw_di" bpmnElement="Flow_0dgpahw">
|
62
|
+
<di:waypoint x="118" y="170" />
|
63
|
+
<di:waypoint x="170" y="170" />
|
64
|
+
</bpmndi:BPMNEdge>
|
65
|
+
<bpmndi:BPMNEdge id="Flow_0mcemvh_di" bpmnElement="Flow_0mcemvh">
|
66
|
+
<di:waypoint x="270" y="170" />
|
67
|
+
<di:waypoint x="322" y="170" />
|
68
|
+
</bpmndi:BPMNEdge>
|
69
|
+
<bpmndi:BPMNEdge id="Flow_0rf5sui_di" bpmnElement="Flow_0rf5sui">
|
70
|
+
<di:waypoint x="358" y="170" />
|
71
|
+
<di:waypoint x="410" y="170" />
|
72
|
+
</bpmndi:BPMNEdge>
|
73
|
+
<bpmndi:BPMNEdge id="Flow_0ea110k_di" bpmnElement="Flow_0ea110k">
|
74
|
+
<di:waypoint x="510" y="170" />
|
75
|
+
<di:waypoint x="562" y="170" />
|
76
|
+
</bpmndi:BPMNEdge>
|
77
|
+
</bpmndi:BPMNPlane>
|
78
|
+
</bpmndi:BPMNDiagram>
|
79
|
+
</bpmn:definitions>
|
@@ -8,13 +8,13 @@ module.exports = function (RED) {
|
|
8
8
|
const client = node.engine ? node.engine.engineClient : null;
|
9
9
|
|
10
10
|
if (!client || !client.processInstances) {
|
11
|
-
node.error('No engine or processInstances API configured.');
|
11
|
+
node.error('No engine or processInstances API configured.', msg);
|
12
12
|
return;
|
13
13
|
}
|
14
14
|
|
15
15
|
const timeToUse = msg.payload.duration || config.duration;
|
16
16
|
if (!timeToUse || isNaN(timeToUse) || timeToUse <= 0) {
|
17
|
-
node.error('Invalid duration: must be a positive number.');
|
17
|
+
node.error('Invalid duration: must be a positive number.', msg);
|
18
18
|
return;
|
19
19
|
}
|
20
20
|
|
@@ -26,7 +26,7 @@ module.exports = function (RED) {
|
|
26
26
|
|
27
27
|
// time_type validieren
|
28
28
|
if (!timeType || !validTimeTypes.includes(timeType)) {
|
29
|
-
node.error(`Invalid time_type provided: ${timeType}. Allowed values are 'days' or 'hours'
|
29
|
+
node.error(`Invalid time_type provided: ${timeType}. Allowed values are 'days' or 'hours'.`, msg);
|
30
30
|
return;
|
31
31
|
}
|
32
32
|
|
@@ -38,14 +38,14 @@ module.exports = function (RED) {
|
|
38
38
|
|
39
39
|
const modelId = msg.payload.processModelId?.trim() || config.modelid?.trim();
|
40
40
|
if (!modelId) {
|
41
|
-
node.error('processModelId is not defined or empty.');
|
41
|
+
node.error('processModelId is not defined or empty.', msg);
|
42
42
|
return;
|
43
43
|
}
|
44
44
|
|
45
45
|
// Prüfung und Festlegung von batch_size
|
46
46
|
let batchSize = msg.payload.batch_size || config.batch_size || 1000;
|
47
47
|
if (isNaN(batchSize) || batchSize <= 0 || batchSize > 1000) {
|
48
|
-
node.error(`Invalid batch_size: ${batchSize}. Must be a positive number and not exceed 1000
|
48
|
+
node.error(`Invalid batch_size: ${batchSize}. Must be a positive number and not exceed 1000.`, msg);
|
49
49
|
return;
|
50
50
|
}
|
51
51
|
batchSize = Math.min(batchSize, 1000); // Sicherstellen, dass der Wert 1000 nicht überschreitet
|
@@ -69,7 +69,7 @@ module.exports = function (RED) {
|
|
69
69
|
|
70
70
|
const processInstances = result.processInstances || [];
|
71
71
|
if (processInstances.length === 0) {
|
72
|
-
node.log(`No more process instances to delete for Model-ID: ${modelId} with Date: ${deletionDate.toISOString()}
|
72
|
+
node.log(`No more process instances to delete for Model-ID: ${modelId} with Date: ${deletionDate.toISOString()}`, msg);
|
73
73
|
hasMoreResults = false;
|
74
74
|
continue;
|
75
75
|
}
|
@@ -94,7 +94,7 @@ module.exports = function (RED) {
|
|
94
94
|
|
95
95
|
node.send(msg);
|
96
96
|
} catch (queryError) {
|
97
|
-
node.error(`Failed to query process instances for Model-ID: ${modelId}. Error: ${queryError.message}
|
97
|
+
node.error(`Failed to query process instances for Model-ID: ${modelId}. Error: ${queryError.message}`, msg);
|
98
98
|
}
|
99
99
|
});
|
100
100
|
}
|
package/processinstance-query.js
CHANGED
@@ -10,7 +10,7 @@ module.exports = function (RED) {
|
|
10
10
|
const client = node.engine.engineClient;
|
11
11
|
|
12
12
|
if (!client) {
|
13
|
-
node.error('No engine configured.');
|
13
|
+
node.error('No engine configured.', msg);
|
14
14
|
return;
|
15
15
|
}
|
16
16
|
|
@@ -22,7 +22,7 @@ module.exports = function (RED) {
|
|
22
22
|
node.send(msg);
|
23
23
|
})
|
24
24
|
.catch((error) => {
|
25
|
-
node.error(`Processinstancequery failed: ${error.message}
|
25
|
+
node.error(`Processinstancequery failed: ${error.message}`, msg);
|
26
26
|
});
|
27
27
|
});
|
28
28
|
}
|
package/signal-event-trigger.js
CHANGED
@@ -9,7 +9,7 @@ module.exports = function (RED) {
|
|
9
9
|
const client = node.engine.engineClient;
|
10
10
|
|
11
11
|
if (!client) {
|
12
|
-
node.error('No engine configured.');
|
12
|
+
node.error('No engine configured.', msg);
|
13
13
|
return;
|
14
14
|
}
|
15
15
|
|
@@ -29,7 +29,7 @@ module.exports = function (RED) {
|
|
29
29
|
});
|
30
30
|
})
|
31
31
|
.catch((error) => {
|
32
|
-
node.error(error);
|
32
|
+
node.error(error, msg);
|
33
33
|
});
|
34
34
|
});
|
35
35
|
}
|
@@ -10,7 +10,7 @@ module.exports = function (RED) {
|
|
10
10
|
const client = node.engine.engineClient;
|
11
11
|
|
12
12
|
if (!client) {
|
13
|
-
node.error('No engine configured.');
|
13
|
+
node.error('No engine configured.', {});
|
14
14
|
return;
|
15
15
|
}
|
16
16
|
|
@@ -42,7 +42,7 @@ module.exports = function (RED) {
|
|
42
42
|
});
|
43
43
|
}
|
44
44
|
} catch (error) {
|
45
|
-
node.error(error);
|
45
|
+
node.error(error, {});
|
46
46
|
}
|
47
47
|
};
|
48
48
|
}
|
@@ -58,7 +58,7 @@ module.exports = function (RED) {
|
|
58
58
|
case 'reservation-canceled':
|
59
59
|
return await client.userTasks.onUserTaskReservationCanceled(userTaskCallback());
|
60
60
|
default:
|
61
|
-
|
61
|
+
node.error('no such event: ' + config.eventtype, {});
|
62
62
|
}
|
63
63
|
}
|
64
64
|
|
@@ -73,7 +73,7 @@ module.exports = function (RED) {
|
|
73
73
|
|
74
74
|
if (node.engine) {
|
75
75
|
register().catch((error) => {
|
76
|
-
node.error(error);
|
76
|
+
node.error(error, {});
|
77
77
|
});
|
78
78
|
}
|
79
79
|
}
|
package/usertask-input.js
CHANGED
@@ -9,7 +9,7 @@ module.exports = function (RED) {
|
|
9
9
|
const client = node.engine.engineClient;
|
10
10
|
|
11
11
|
if (!client) {
|
12
|
-
node.error('No engine configured.');
|
12
|
+
node.error('No engine configured.', msg);
|
13
13
|
return;
|
14
14
|
}
|
15
15
|
|
@@ -32,7 +32,7 @@ module.exports = function (RED) {
|
|
32
32
|
} else node.log(`No user tasks found for query: ${JSON.stringify(query)}`);
|
33
33
|
})
|
34
34
|
.catch((error) => {
|
35
|
-
node.error(error);
|
35
|
+
node.error(error, msg);
|
36
36
|
});
|
37
37
|
});
|
38
38
|
}
|
package/usertask-output.js
CHANGED
@@ -19,7 +19,7 @@ module.exports = function (RED) {
|
|
19
19
|
const client = node.engine.engineClient;
|
20
20
|
|
21
21
|
if (!client) {
|
22
|
-
node.error('No engine configured.');
|
22
|
+
node.error('No engine configured.', msg);
|
23
23
|
return;
|
24
24
|
}
|
25
25
|
|
@@ -29,10 +29,10 @@ module.exports = function (RED) {
|
|
29
29
|
node.send(msg);
|
30
30
|
})
|
31
31
|
.catch((error) => {
|
32
|
-
node.error(error);
|
32
|
+
node.error(error, msg);
|
33
33
|
});
|
34
34
|
} else {
|
35
|
-
node.error(`No UserTask found in message: ${JSON.stringify(msg.payload)}
|
35
|
+
node.error(`No UserTask found in message: ${JSON.stringify(msg.payload)}`, msg);
|
36
36
|
}
|
37
37
|
});
|
38
38
|
}
|
package/wait-for-usertask.js
CHANGED
@@ -12,7 +12,7 @@ module.exports = function (RED) {
|
|
12
12
|
const client = node.engine.engineClient;
|
13
13
|
subscribe = async () => {
|
14
14
|
if (!client) {
|
15
|
-
node.error('No engine configured.');
|
15
|
+
node.error('No engine configured.', msg);
|
16
16
|
return;
|
17
17
|
}
|
18
18
|
|
@@ -39,7 +39,7 @@ module.exports = function (RED) {
|
|
39
39
|
// nothing todo - wait for next notification
|
40
40
|
}
|
41
41
|
} catch (error) {
|
42
|
-
node.error(error);
|
42
|
+
node.error(error, msg);
|
43
43
|
}
|
44
44
|
});
|
45
45
|
|
@@ -67,7 +67,7 @@ module.exports = function (RED) {
|
|
67
67
|
// let the *currentIdentity* be active
|
68
68
|
}
|
69
69
|
} catch (error) {
|
70
|
-
node.error(error);
|
70
|
+
node.error(error, msg);
|
71
71
|
}
|
72
72
|
}
|
73
73
|
};
|