@5minds/node-red-contrib-processcube 0.3.5-feature-6c9546-lxi4vloc → 0.3.5-feature-a2045d-lximtnpj

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.
@@ -146,7 +146,7 @@
146
146
  {
147
147
  "id": "d042a4c68f51d6ab",
148
148
  "type": "processcube-engine-config",
149
- "url": "http://engine:8000"
149
+ "url": "http://localhost:56000"
150
150
  },
151
151
  {
152
152
  "id": "8e2205abbb41495b",
@@ -1347,6 +1347,62 @@
1347
1347
  "y": 440,
1348
1348
  "wires": []
1349
1349
  },
1350
+ {
1351
+ "id": "5cc47f646e818d1e",
1352
+ "type": "inject",
1353
+ "z": "fd3c725340de4f74",
1354
+ "name": "",
1355
+ "props": [
1356
+ {
1357
+ "p": "payload"
1358
+ }
1359
+ ],
1360
+ "repeat": "",
1361
+ "crontab": "",
1362
+ "once": false,
1363
+ "onceDelay": 0.1,
1364
+ "topic": "",
1365
+ "payload": "{\t \"state\": \"suspended\"\t}",
1366
+ "payloadType": "jsonata",
1367
+ "x": 110,
1368
+ "y": 640,
1369
+ "wires": [
1370
+ [
1371
+ "66b90cf83a531a75"
1372
+ ]
1373
+ ]
1374
+ },
1375
+ {
1376
+ "id": "66b90cf83a531a75",
1377
+ "type": "usertask-input",
1378
+ "z": "fd3c725340de4f74",
1379
+ "name": "",
1380
+ "engine": "d042a4c68f51d6ab",
1381
+ "multisend": false,
1382
+ "x": 380,
1383
+ "y": 640,
1384
+ "wires": [
1385
+ [
1386
+ "e002a108a6c7df75"
1387
+ ]
1388
+ ]
1389
+ },
1390
+ {
1391
+ "id": "e002a108a6c7df75",
1392
+ "type": "debug",
1393
+ "z": "fd3c725340de4f74",
1394
+ "name": "debug 15",
1395
+ "active": true,
1396
+ "tosidebar": true,
1397
+ "console": false,
1398
+ "tostatus": false,
1399
+ "complete": "false",
1400
+ "statusVal": "",
1401
+ "statusType": "auto",
1402
+ "x": 620,
1403
+ "y": 640,
1404
+ "wires": []
1405
+ },
1350
1406
  {
1351
1407
  "id": "0f5978f327b01bfb",
1352
1408
  "type": "ui-table",
@@ -1804,12 +1860,13 @@
1804
1860
  "g": "ec36901abb138306",
1805
1861
  "name": "",
1806
1862
  "engine": "d042a4c68f51d6ab",
1807
- "multisend": true,
1863
+ "multisend": false,
1808
1864
  "x": 600,
1809
1865
  "y": 660,
1810
1866
  "wires": [
1811
1867
  [
1812
- "da518322186bd83b"
1868
+ "da518322186bd83b",
1869
+ "8e2a2f993ee7156a"
1813
1870
  ]
1814
1871
  ]
1815
1872
  },
@@ -143,10 +143,34 @@
143
143
  "w": 482,
144
144
  "h": 162
145
145
  },
146
+ {
147
+ "id": "b60e94a5f1ee2790",
148
+ "type": "group",
149
+ "z": "fd3c725340de4f74",
150
+ "style": {
151
+ "stroke": "#999999",
152
+ "stroke-opacity": "1",
153
+ "fill": "none",
154
+ "fill-opacity": "1",
155
+ "label": true,
156
+ "label-position": "nw",
157
+ "color": "#a4a4a4"
158
+ },
159
+ "nodes": [
160
+ "5cc47f646e818d1e",
161
+ "66b90cf83a531a75",
162
+ "e002a108a6c7df75",
163
+ "2851b83de5fb070d"
164
+ ],
165
+ "x": 34,
166
+ "y": 559,
167
+ "w": 712,
168
+ "h": 142
169
+ },
146
170
  {
147
171
  "id": "d042a4c68f51d6ab",
148
172
  "type": "processcube-engine-config",
149
- "url": "http://engine:8000"
173
+ "url": "http://localhost:56000"
150
174
  },
151
175
  {
152
176
  "id": "8e2205abbb41495b",
@@ -1347,6 +1371,76 @@
1347
1371
  "y": 440,
1348
1372
  "wires": []
1349
1373
  },
1374
+ {
1375
+ "id": "5cc47f646e818d1e",
1376
+ "type": "inject",
1377
+ "z": "fd3c725340de4f74",
1378
+ "g": "b60e94a5f1ee2790",
1379
+ "name": "Parameter setzen",
1380
+ "props": [
1381
+ {
1382
+ "p": "payload"
1383
+ }
1384
+ ],
1385
+ "repeat": "",
1386
+ "crontab": "",
1387
+ "once": false,
1388
+ "onceDelay": 0.1,
1389
+ "topic": "",
1390
+ "payload": "{\t \"state\": \"suspended\"\t}",
1391
+ "payloadType": "jsonata",
1392
+ "x": 160,
1393
+ "y": 660,
1394
+ "wires": [
1395
+ [
1396
+ "66b90cf83a531a75"
1397
+ ]
1398
+ ]
1399
+ },
1400
+ {
1401
+ "id": "66b90cf83a531a75",
1402
+ "type": "usertask-input",
1403
+ "z": "fd3c725340de4f74",
1404
+ "g": "b60e94a5f1ee2790",
1405
+ "name": "",
1406
+ "engine": "d042a4c68f51d6ab",
1407
+ "multisend": false,
1408
+ "x": 400,
1409
+ "y": 660,
1410
+ "wires": [
1411
+ [
1412
+ "e002a108a6c7df75"
1413
+ ]
1414
+ ]
1415
+ },
1416
+ {
1417
+ "id": "e002a108a6c7df75",
1418
+ "type": "debug",
1419
+ "z": "fd3c725340de4f74",
1420
+ "g": "b60e94a5f1ee2790",
1421
+ "name": "debug 15",
1422
+ "active": true,
1423
+ "tosidebar": true,
1424
+ "console": false,
1425
+ "tostatus": false,
1426
+ "complete": "false",
1427
+ "statusVal": "",
1428
+ "statusType": "auto",
1429
+ "x": 640,
1430
+ "y": 660,
1431
+ "wires": []
1432
+ },
1433
+ {
1434
+ "id": "2851b83de5fb070d",
1435
+ "type": "comment",
1436
+ "z": "fd3c725340de4f74",
1437
+ "g": "b60e94a5f1ee2790",
1438
+ "name": "Abfragen von UserTasks (Made with beer)",
1439
+ "info": "",
1440
+ "x": 220,
1441
+ "y": 600,
1442
+ "wires": []
1443
+ },
1350
1444
  {
1351
1445
  "id": "0f5978f327b01bfb",
1352
1446
  "type": "ui-table",
@@ -1809,7 +1903,8 @@
1809
1903
  "y": 660,
1810
1904
  "wires": [
1811
1905
  [
1812
- "da518322186bd83b"
1906
+ "da518322186bd83b",
1907
+ "8e2a2f993ee7156a"
1813
1908
  ]
1814
1909
  ]
1815
1910
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "0.3.5-feature-6c9546-lxi4vloc",
3
+ "version": "0.3.5-feature-a2045d-lximtnpj",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "authors": [
package/usertask-input.js CHANGED
@@ -46,27 +46,24 @@ module.exports = function(RED) {
46
46
  console.log(`UserTaskInput received message: ${JSON.stringify(msg.payload)}`);
47
47
 
48
48
  let query = msg.payload;
49
- query = {"flowNodeInstanceId":"1f7225f4-f3c0-4865-91ad-8c6c71d23c22"};
50
49
 
51
50
  console.log(`UserTaskInput query: ${JSON.stringify(query)}`);
52
51
 
53
- client.userTasks.query({
54
- "flowNodeInstanceId" : "1f7225f4-f3c0-4865-91ad-8c6c71d23c22"
55
- }).then((matchingFlowNodes) => {
52
+ client.userTasks.query(query).then((matchingFlowNodes) => {
56
53
 
57
54
  console.log(`UserTaskInput query result: ${JSON.stringify(matchingFlowNodes)}`);
58
55
 
59
- if (matchingFlowNodes && matchingFlowNodes.flowNodeInstances && matchingFlowNodes.flowNodeInstances.length == 1) {
60
- userTask = matchingFlowNodes.flowNodeInstances[0];
56
+ if (matchingFlowNodes && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
57
+ userTask = matchingFlowNodes.userTasks[0];
61
58
 
62
59
  node.send({ payload: {userTask: userTask } });
63
60
  } else {
64
- if (config.multisend) {
65
- //matchingFlowNodes.forEach((userTask) => {
66
- // node.send({ payload: { userTask: userTask } });
67
- //});
61
+ if (config.multisend && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length > 1) {
62
+ matchingFlowNodes.userTasks.forEach((userTask) => {
63
+ node.send({ payload: { userTask: userTask } });
64
+ });
68
65
  } else {
69
- node.send({ payload: { userTasks: matchingFlowNodes } });
66
+ node.send({ payload: { userTasks: matchingFlowNodes.userTasks } });
70
67
  }
71
68
  }
72
69
  });