@5minds/node-red-contrib-processcube 1.9.1-develop-73f12b-m8el0slf → 1.9.3-develop-c9db83-m8k3pb8w
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/.processcube/engine/config/config.json +17 -0
- package/.processcube/nodered/.config.nodes.json +1 -1
- package/.processcube/nodered/.config.users.json +1 -1
- package/.processcube/nodered/flows.json +136 -89
- package/Dockerfile +3 -0
- package/docker-compose.yml +22 -0
- package/externaltask-input.js +42 -6
- package/package.json +1 -1
- package/postgres/init.sql +13 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"logging": {
|
3
|
+
"outputPath": "logs",
|
4
|
+
"minLogLevel": "info"
|
5
|
+
},
|
6
|
+
"database": {
|
7
|
+
"username": "engine_user",
|
8
|
+
"password": "enigne_password",
|
9
|
+
"database": "engine_db",
|
10
|
+
"host": "postgres",
|
11
|
+
"port": 5432,
|
12
|
+
"dialect": "postgres",
|
13
|
+
"supportBigNumbers": true,
|
14
|
+
"resetPasswordRequestTimeToLive": 12,
|
15
|
+
"logging": false
|
16
|
+
}
|
17
|
+
}
|
@@ -675,17 +675,17 @@
|
|
675
675
|
"911fde53bcbb7e3f",
|
676
676
|
"15a5f64b9e2e05fc",
|
677
677
|
"c937c772bb4b6a9d",
|
678
|
-
"1b54da9f999c39fd",
|
679
|
-
"a54dbeccaa680ea5",
|
680
678
|
"664cb218bba78642",
|
681
679
|
"17c7bb9f5f18dca0",
|
682
|
-
"
|
683
|
-
"
|
684
|
-
"
|
680
|
+
"f503048db777642f",
|
681
|
+
"7b7e536ce13ff02e",
|
682
|
+
"ee77f6e85bd2d76f",
|
683
|
+
"d289b450aca4064e",
|
684
|
+
"9a3c7f3da50bdb42"
|
685
685
|
],
|
686
|
-
"x":
|
686
|
+
"x": 14,
|
687
687
|
"y": 79,
|
688
|
-
"w":
|
688
|
+
"w": 1172,
|
689
689
|
"h": 262
|
690
690
|
},
|
691
691
|
{
|
@@ -721,15 +721,14 @@
|
|
721
721
|
"engine": "42e6796dddd9d4db",
|
722
722
|
"topic": "Test",
|
723
723
|
"topicType": "str",
|
724
|
-
"workerConfig": "{}",
|
724
|
+
"workerConfig": "{\"maxTasks\":1}",
|
725
725
|
"workerConfigType": "json",
|
726
726
|
"x": 110,
|
727
727
|
"y": 180,
|
728
728
|
"wires": [
|
729
729
|
[
|
730
730
|
"c937c772bb4b6a9d",
|
731
|
-
"
|
732
|
-
"1f20e1ea2b52c8d6"
|
731
|
+
"d289b450aca4064e"
|
733
732
|
]
|
734
733
|
]
|
735
734
|
},
|
@@ -739,7 +738,7 @@
|
|
739
738
|
"z": "a23d2e782beb66f4",
|
740
739
|
"g": "70d7a70e375b162a",
|
741
740
|
"name": "Test Ende",
|
742
|
-
"x":
|
741
|
+
"x": 1100,
|
743
742
|
"y": 180,
|
744
743
|
"wires": []
|
745
744
|
},
|
@@ -1171,93 +1170,120 @@
|
|
1171
1170
|
"complete": "false",
|
1172
1171
|
"statusVal": "",
|
1173
1172
|
"statusType": "auto",
|
1174
|
-
"x":
|
1175
|
-
"y":
|
1173
|
+
"x": 280,
|
1174
|
+
"y": 280,
|
1176
1175
|
"wires": []
|
1177
1176
|
},
|
1178
1177
|
{
|
1179
|
-
"id": "
|
1180
|
-
"type": "
|
1178
|
+
"id": "664cb218bba78642",
|
1179
|
+
"type": "catch",
|
1181
1180
|
"z": "a23d2e782beb66f4",
|
1182
1181
|
"g": "70d7a70e375b162a",
|
1183
1182
|
"name": "",
|
1184
|
-
"
|
1185
|
-
"
|
1186
|
-
"
|
1187
|
-
|
1188
|
-
"t": "empty"
|
1189
|
-
},
|
1190
|
-
{
|
1191
|
-
"t": "else"
|
1192
|
-
}
|
1193
|
-
],
|
1194
|
-
"checkall": "true",
|
1195
|
-
"repair": false,
|
1196
|
-
"outputs": 2,
|
1197
|
-
"x": 630,
|
1198
|
-
"y": 180,
|
1183
|
+
"scope": "group",
|
1184
|
+
"uncaught": false,
|
1185
|
+
"x": 850,
|
1186
|
+
"y": 300,
|
1199
1187
|
"wires": [
|
1200
1188
|
[
|
1201
|
-
"
|
1202
|
-
],
|
1203
|
-
[
|
1204
|
-
"a54dbeccaa680ea5"
|
1189
|
+
"17c7bb9f5f18dca0"
|
1205
1190
|
]
|
1206
1191
|
]
|
1207
1192
|
},
|
1208
1193
|
{
|
1209
|
-
"id": "
|
1210
|
-
"type": "
|
1194
|
+
"id": "17c7bb9f5f18dca0",
|
1195
|
+
"type": "subflow:8eb64bb58f95989d",
|
1211
1196
|
"z": "a23d2e782beb66f4",
|
1212
1197
|
"g": "70d7a70e375b162a",
|
1213
|
-
"name": "
|
1214
|
-
"
|
1215
|
-
"
|
1216
|
-
"
|
1217
|
-
|
1218
|
-
|
1219
|
-
"
|
1220
|
-
"
|
1221
|
-
"
|
1222
|
-
"
|
1198
|
+
"name": "",
|
1199
|
+
"x": 1070,
|
1200
|
+
"y": 300,
|
1201
|
+
"wires": []
|
1202
|
+
},
|
1203
|
+
{
|
1204
|
+
"id": "d37ef0e9d22656fa",
|
1205
|
+
"type": "join",
|
1206
|
+
"z": "a23d2e782beb66f4",
|
1207
|
+
"name": "",
|
1208
|
+
"mode": "auto",
|
1209
|
+
"build": "array",
|
1210
|
+
"property": "payload",
|
1211
|
+
"propertyType": "msg",
|
1212
|
+
"key": "payload",
|
1213
|
+
"joiner": "\\n",
|
1214
|
+
"joinerType": "str",
|
1215
|
+
"useparts": false,
|
1216
|
+
"accumulate": false,
|
1217
|
+
"timeout": "",
|
1218
|
+
"count": "2",
|
1219
|
+
"reduceRight": false,
|
1220
|
+
"reduceExp": "",
|
1221
|
+
"reduceInit": "",
|
1222
|
+
"reduceInitType": "",
|
1223
|
+
"reduceFixup": "",
|
1224
|
+
"x": 750,
|
1225
|
+
"y": 180,
|
1223
1226
|
"wires": [
|
1224
|
-
[
|
1227
|
+
[
|
1228
|
+
"9a3c7f3da50bdb42"
|
1229
|
+
]
|
1225
1230
|
]
|
1226
1231
|
},
|
1227
1232
|
{
|
1228
|
-
"id": "
|
1229
|
-
"type": "
|
1233
|
+
"id": "77854a01cb815c27",
|
1234
|
+
"type": "split",
|
1230
1235
|
"z": "a23d2e782beb66f4",
|
1231
|
-
"g": "70d7a70e375b162a",
|
1232
1236
|
"name": "",
|
1233
|
-
"
|
1234
|
-
"
|
1235
|
-
"
|
1236
|
-
"
|
1237
|
+
"splt": "\\n",
|
1238
|
+
"spltType": "str",
|
1239
|
+
"arraySplt": "2",
|
1240
|
+
"arraySpltType": "len",
|
1241
|
+
"stream": false,
|
1242
|
+
"addname": "",
|
1243
|
+
"property": "payload",
|
1244
|
+
"x": 410,
|
1245
|
+
"y": 180,
|
1237
1246
|
"wires": [
|
1238
1247
|
[
|
1239
|
-
"
|
1248
|
+
"7b7e536ce13ff02e",
|
1249
|
+
"ee77f6e85bd2d76f"
|
1240
1250
|
]
|
1241
1251
|
]
|
1242
1252
|
},
|
1243
1253
|
{
|
1244
|
-
"id": "
|
1245
|
-
"type": "
|
1254
|
+
"id": "7b7e536ce13ff02e",
|
1255
|
+
"type": "delay",
|
1246
1256
|
"z": "a23d2e782beb66f4",
|
1247
1257
|
"g": "70d7a70e375b162a",
|
1248
1258
|
"name": "",
|
1249
|
-
"
|
1250
|
-
"
|
1251
|
-
"
|
1259
|
+
"pauseType": "delay",
|
1260
|
+
"timeout": "2",
|
1261
|
+
"timeoutUnits": "seconds",
|
1262
|
+
"rate": "1",
|
1263
|
+
"nbRateUnits": "1",
|
1264
|
+
"rateUnits": "second",
|
1265
|
+
"randomFirst": "1",
|
1266
|
+
"randomLast": "5",
|
1267
|
+
"randomUnits": "seconds",
|
1268
|
+
"drop": false,
|
1269
|
+
"allowrate": false,
|
1270
|
+
"outputs": 1,
|
1271
|
+
"x": 580,
|
1272
|
+
"y": 160,
|
1273
|
+
"wires": [
|
1274
|
+
[
|
1275
|
+
"d37ef0e9d22656fa"
|
1276
|
+
]
|
1277
|
+
]
|
1252
1278
|
},
|
1253
1279
|
{
|
1254
|
-
"id": "
|
1280
|
+
"id": "ee77f6e85bd2d76f",
|
1255
1281
|
"type": "delay",
|
1256
1282
|
"z": "a23d2e782beb66f4",
|
1257
1283
|
"g": "70d7a70e375b162a",
|
1258
1284
|
"name": "",
|
1259
1285
|
"pauseType": "delay",
|
1260
|
-
"timeout": "
|
1286
|
+
"timeout": "3",
|
1261
1287
|
"timeoutUnits": "seconds",
|
1262
1288
|
"rate": "1",
|
1263
1289
|
"nbRateUnits": "1",
|
@@ -1268,46 +1294,63 @@
|
|
1268
1294
|
"drop": false,
|
1269
1295
|
"allowrate": false,
|
1270
1296
|
"outputs": 1,
|
1271
|
-
"x":
|
1272
|
-
"y":
|
1297
|
+
"x": 580,
|
1298
|
+
"y": 220,
|
1273
1299
|
"wires": [
|
1274
1300
|
[
|
1275
|
-
"
|
1301
|
+
"d37ef0e9d22656fa"
|
1276
1302
|
]
|
1277
1303
|
]
|
1278
1304
|
},
|
1279
1305
|
{
|
1280
|
-
"id": "
|
1281
|
-
"type": "
|
1306
|
+
"id": "f503048db777642f",
|
1307
|
+
"type": "inject",
|
1282
1308
|
"z": "a23d2e782beb66f4",
|
1283
1309
|
"g": "70d7a70e375b162a",
|
1284
1310
|
"name": "",
|
1285
|
-
"
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
"
|
1291
|
-
"
|
1292
|
-
"
|
1293
|
-
"
|
1294
|
-
"
|
1295
|
-
"
|
1296
|
-
"
|
1297
|
-
"
|
1298
|
-
"
|
1299
|
-
"
|
1300
|
-
|
1301
|
-
|
1311
|
+
"props": [
|
1312
|
+
{
|
1313
|
+
"p": "payload"
|
1314
|
+
}
|
1315
|
+
],
|
1316
|
+
"repeat": "",
|
1317
|
+
"crontab": "",
|
1318
|
+
"once": false,
|
1319
|
+
"onceDelay": 0.1,
|
1320
|
+
"topic": "",
|
1321
|
+
"payload": "[{\"test\":\"value\"},{\"test\":\"value\"}]",
|
1322
|
+
"payloadType": "json",
|
1323
|
+
"x": 110,
|
1324
|
+
"y": 280,
|
1325
|
+
"wires": [
|
1326
|
+
[
|
1327
|
+
"d289b450aca4064e"
|
1328
|
+
]
|
1329
|
+
]
|
1330
|
+
},
|
1331
|
+
{
|
1332
|
+
"id": "d289b450aca4064e",
|
1333
|
+
"type": "function",
|
1334
|
+
"z": "a23d2e782beb66f4",
|
1335
|
+
"g": "70d7a70e375b162a",
|
1336
|
+
"name": "function 1",
|
1337
|
+
"func": "msg.payload = [\n {\n \"test\": \"value\"\n },\n {\n \"test\": \"value\"\n }\n];\n\n\nreturn msg;",
|
1338
|
+
"outputs": 1,
|
1339
|
+
"timeout": 0,
|
1340
|
+
"noerr": 0,
|
1341
|
+
"initialize": "",
|
1342
|
+
"finalize": "",
|
1343
|
+
"libs": [],
|
1344
|
+
"x": 260,
|
1302
1345
|
"y": 180,
|
1303
1346
|
"wires": [
|
1304
1347
|
[
|
1305
|
-
"
|
1348
|
+
"77854a01cb815c27"
|
1306
1349
|
]
|
1307
1350
|
]
|
1308
1351
|
},
|
1309
1352
|
{
|
1310
|
-
"id": "
|
1353
|
+
"id": "9a3c7f3da50bdb42",
|
1311
1354
|
"type": "delay",
|
1312
1355
|
"z": "a23d2e782beb66f4",
|
1313
1356
|
"g": "70d7a70e375b162a",
|
@@ -1324,11 +1367,11 @@
|
|
1324
1367
|
"drop": false,
|
1325
1368
|
"allowrate": false,
|
1326
1369
|
"outputs": 1,
|
1327
|
-
"x":
|
1328
|
-
"y":
|
1370
|
+
"x": 920,
|
1371
|
+
"y": 180,
|
1329
1372
|
"wires": [
|
1330
1373
|
[
|
1331
|
-
"
|
1374
|
+
"911fde53bcbb7e3f"
|
1332
1375
|
]
|
1333
1376
|
]
|
1334
1377
|
},
|
@@ -2645,6 +2688,7 @@
|
|
2645
2688
|
"id": "930624edc6169c55",
|
2646
2689
|
"type": "process-event-listener",
|
2647
2690
|
"z": "76c047e0d8770a20",
|
2691
|
+
"d": true,
|
2648
2692
|
"name": "",
|
2649
2693
|
"engine": "42e6796dddd9d4db",
|
2650
2694
|
"processmodel": "External-Task-Sample_Process",
|
@@ -2689,6 +2733,7 @@
|
|
2689
2733
|
"id": "798de686e9cec9e3",
|
2690
2734
|
"type": "process-event-listener",
|
2691
2735
|
"z": "76c047e0d8770a20",
|
2736
|
+
"d": true,
|
2692
2737
|
"name": "deployed",
|
2693
2738
|
"engine": "42e6796dddd9d4db",
|
2694
2739
|
"processmodel": "",
|
@@ -2723,6 +2768,7 @@
|
|
2723
2768
|
"id": "78dd82dbc5fe824e",
|
2724
2769
|
"type": "process-event-listener",
|
2725
2770
|
"z": "76c047e0d8770a20",
|
2771
|
+
"d": true,
|
2726
2772
|
"name": "undeployed",
|
2727
2773
|
"engine": "42e6796dddd9d4db",
|
2728
2774
|
"processmodel": "",
|
@@ -2757,6 +2803,7 @@
|
|
2757
2803
|
"id": "6b1eeb91a71c7bcb",
|
2758
2804
|
"type": "process-event-listener",
|
2759
2805
|
"z": "76c047e0d8770a20",
|
2806
|
+
"d": true,
|
2760
2807
|
"name": "is-exeutable-changed",
|
2761
2808
|
"engine": "42e6796dddd9d4db",
|
2762
2809
|
"processmodel": "",
|
package/Dockerfile
CHANGED
package/docker-compose.yml
CHANGED
@@ -32,8 +32,10 @@ services:
|
|
32
32
|
ports:
|
33
33
|
- 8000:8000
|
34
34
|
volumes:
|
35
|
+
- ./.processcube/engine/config/config.json:/etc/engine/config/config.json:ro
|
35
36
|
- ./processes:/processes:ro
|
36
37
|
environment:
|
38
|
+
CONFIG_PATH: /etc/engine/config/config.json
|
37
39
|
application__name: Engine for Node-RED contrib
|
38
40
|
iam__baseUrl: http://authority:11560
|
39
41
|
iam__allowAnonymousRootAccess: true
|
@@ -45,6 +47,26 @@ services:
|
|
45
47
|
timeout: 1s
|
46
48
|
retries: 20
|
47
49
|
|
50
|
+
postgres:
|
51
|
+
image: postgres
|
52
|
+
environment:
|
53
|
+
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
54
|
+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
55
|
+
POSTGRES_DB: enginedb
|
56
|
+
PGDATA: /data/postgres/db
|
57
|
+
volumes:
|
58
|
+
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
59
|
+
- ./postgres/db.instance:/data/postgres
|
60
|
+
ports:
|
61
|
+
- 5432:5432
|
62
|
+
healthcheck:
|
63
|
+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
64
|
+
interval: 5s
|
65
|
+
retries: 10
|
66
|
+
timeout: 10s
|
67
|
+
restart: unless-stopped
|
68
|
+
|
69
|
+
|
48
70
|
authority:
|
49
71
|
image: 5minds/processcube_authority:3.0.4
|
50
72
|
ports:
|
package/externaltask-input.js
CHANGED
@@ -19,6 +19,7 @@ module.exports = function (RED) {
|
|
19
19
|
node._trace = '';
|
20
20
|
node._step = '';
|
21
21
|
node._tracking_nodes = {};
|
22
|
+
node._join_inputs = {};
|
22
23
|
node._tracking_for_etw = {};
|
23
24
|
|
24
25
|
node.isHandling = () => {
|
@@ -50,6 +51,20 @@ module.exports = function (RED) {
|
|
50
51
|
} else {
|
51
52
|
node._tracking_nodes[theNode.id].count++;
|
52
53
|
}
|
54
|
+
|
55
|
+
// bei nodes vom type 'join' müssen die eingänge gezählt werden,
|
56
|
+
// dass diese dann wieder beim verlassen am ausgang gesamt entfernt werden müssem
|
57
|
+
if (theNode.type === 'join') {
|
58
|
+
if (!node._join_inputs[theNode.id]) {
|
59
|
+
node._join_inputs[theNode.id] = {};
|
60
|
+
}
|
61
|
+
|
62
|
+
if (!node._join_inputs[theNode.id][msg.flowNodeInstanceId]) {
|
63
|
+
node._join_inputs[theNode.id][msg.flowNodeInstanceId] = 1;
|
64
|
+
} else {
|
65
|
+
node._join_inputs[theNode.id][msg.flowNodeInstanceId]++;
|
66
|
+
}
|
67
|
+
}
|
53
68
|
|
54
69
|
if (!node._tracking_for_etw[msg.flowNodeInstanceId]) {
|
55
70
|
node._tracking_for_etw[msg.flowNodeInstanceId] = [];
|
@@ -58,7 +73,9 @@ module.exports = function (RED) {
|
|
58
73
|
node._tracking_for_etw[msg.flowNodeInstanceId].push(theNode);
|
59
74
|
}
|
60
75
|
|
61
|
-
theNode.
|
76
|
+
if (!theNode.type === 'delay') {
|
77
|
+
theNode.status({ fill: 'blue', shape: 'dot', text: `tasks(${node._tracking_nodes[theNode.id].count})` });
|
78
|
+
}
|
62
79
|
};
|
63
80
|
|
64
81
|
node.decrMsgOnNode = (theNode, msg) => {
|
@@ -66,13 +83,29 @@ module.exports = function (RED) {
|
|
66
83
|
return;
|
67
84
|
}
|
68
85
|
|
86
|
+
// bei nodes vom type 'join' müssen die eingänge gezählt werden,
|
87
|
+
// dass diese dann wieder beim verlassen am ausgang gesamt entfernt werden müssen
|
88
|
+
let dec_count = 1;
|
89
|
+
|
90
|
+
if (theNode.type === 'join') {
|
91
|
+
if (!node._join_inputs[theNode.id]) {
|
92
|
+
node._join_inputs[theNode.id] = {};
|
93
|
+
}
|
94
|
+
|
95
|
+
if (node._join_inputs[theNode.id][msg.flowNodeInstanceId]) {
|
96
|
+
dec_count = node._join_inputs[theNode.id][msg.flowNodeInstanceId];
|
97
|
+
delete node._join_inputs[theNode.id][msg.flowNodeInstanceId];
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
69
101
|
if (!node._tracking_nodes[theNode.id]) {
|
70
102
|
node._tracking_nodes[theNode.id] = {
|
71
103
|
node: theNode,
|
72
104
|
count: 0,
|
73
105
|
};
|
74
106
|
} else {
|
75
|
-
node._tracking_nodes[theNode.id].count--;
|
107
|
+
//node._tracking_nodes[theNode.id].count--;
|
108
|
+
node._tracking_nodes[theNode.id].count =- dec_count;
|
76
109
|
|
77
110
|
if (node._tracking_nodes[theNode.id].count <= 0) {
|
78
111
|
node._tracking_nodes[theNode.id].count = 0;
|
@@ -80,14 +113,16 @@ module.exports = function (RED) {
|
|
80
113
|
}
|
81
114
|
|
82
115
|
if (node._tracking_for_etw[msg.flowNodeInstanceId]) {
|
83
|
-
|
116
|
+
const count_nodes = node._tracking_for_etw[msg.flowNodeInstanceId].filter(item => item !== theNode)
|
84
117
|
|
85
|
-
if (
|
118
|
+
if (count_nodes <= 0) {
|
86
119
|
delete node._tracking_for_etw[msg.flowNodeInstanceId];
|
87
120
|
}
|
88
121
|
}
|
89
122
|
|
90
|
-
theNode.
|
123
|
+
if (!theNode.type === 'delay') {
|
124
|
+
theNode.status({ fill: 'blue', shape: 'dot', text: `tasks(${node._tracking_nodes[theNode.id].count})` });
|
125
|
+
}
|
91
126
|
};
|
92
127
|
|
93
128
|
RED.hooks.add('preDeliver', (sendEvent) => {
|
@@ -296,6 +331,8 @@ module.exports = function (RED) {
|
|
296
331
|
});
|
297
332
|
};
|
298
333
|
|
334
|
+
node.setUnsubscribedStatus(new Error('Worker starting.'));
|
335
|
+
|
299
336
|
client.externalTasks
|
300
337
|
.subscribeToExternalTaskTopic(topic, etwCallback, options)
|
301
338
|
.then(async (externalTaskWorker) => {
|
@@ -346,7 +383,6 @@ module.exports = function (RED) {
|
|
346
383
|
|
347
384
|
try {
|
348
385
|
externalTaskWorker.start();
|
349
|
-
node.setUnsubscribedStatus(new Error('Worker starting.'));
|
350
386
|
} catch (error) {
|
351
387
|
node.error(`Worker start 'externalTaskWorker.start' failed: ${error.message}`, {});
|
352
388
|
}
|
package/package.json
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
CREATE USER engine_user with password 'enigne_password';
|
2
|
+
CREATE DATABASE engine_db;
|
3
|
+
GRANT ALL PRIVILEGES ON DATABASE engine_db TO engine_user;
|
4
|
+
|
5
|
+
\connect engine_db;
|
6
|
+
|
7
|
+
-- Berechtigungen erteilen
|
8
|
+
GRANT CREATE ON SCHEMA public TO engine_user;
|
9
|
+
|
10
|
+
-- Eigentümer des Schemas ändern
|
11
|
+
ALTER SCHEMA public OWNER TO engine_user;
|
12
|
+
|
13
|
+
|