@5minds/node-red-contrib-processcube 0.7.1-develop-0efb28-ly43nhqf → 0.8.0-develop-13dd2c-ly45bz1z

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "id": "fd3c725340de4f74",
12
12
  "type": "tab",
13
- "label": "UserTask-Handling",
13
+ "label": "UserTask-Table",
14
14
  "disabled": false,
15
15
  "info": "",
16
16
  "env": []
@@ -23,36 +23,6 @@
23
23
  "info": "",
24
24
  "env": []
25
25
  },
26
- {
27
- "id": "405f8c703368777c",
28
- "type": "group",
29
- "z": "fd3c725340de4f74",
30
- "style": {
31
- "stroke": "#999999",
32
- "stroke-opacity": "1",
33
- "fill": "none",
34
- "fill-opacity": "1",
35
- "label": true,
36
- "label-position": "nw",
37
- "color": "#a4a4a4"
38
- },
39
- "nodes": [
40
- "ec0be0ef92746967",
41
- "090d42845540049c",
42
- "846c5269df75c7a1",
43
- "4267576c32c782ec",
44
- "68cf69be67688af6",
45
- "bcfb8893adeb57ed",
46
- "325156d6b8bfc4b6",
47
- "dac4a2305b629b9f",
48
- "6d1847a8cc5103ce",
49
- "3a47f3acf7a512ea"
50
- ],
51
- "x": 34,
52
- "y": 19,
53
- "w": 1092,
54
- "h": 342
55
- },
56
26
  {
57
27
  "id": "09cdc14cfb8ad687",
58
28
  "type": "group",
@@ -133,42 +103,18 @@
133
103
  "color": "#a4a4a4"
134
104
  },
135
105
  "nodes": [
136
- "3011d9be5207350a",
137
106
  "aa3ca456ddf1a7bd",
138
107
  "a2b09670ce6219e3",
139
- "efa57df2a7fa4a53"
108
+ "e283d772578fb6d2",
109
+ "86dd72913b9f2ee3",
110
+ "3e89be46a437d93c",
111
+ "f0d9df3d9fea075b",
112
+ "3011d9be5207350a"
140
113
  ],
141
- "x": 34,
142
- "y": 379,
143
- "w": 482,
144
- "h": 162
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
- "a547ad5dcdd4613f",
165
- "e98eecc53e433cfe",
166
- "ed3c805cc0dc276c"
167
- ],
168
- "x": 34,
169
- "y": 559,
170
- "w": 952,
171
- "h": 182
114
+ "x": 54,
115
+ "y": 59,
116
+ "w": 752,
117
+ "h": 282
172
118
  },
173
119
  {
174
120
  "id": "02fef81e2129ea71",
@@ -290,19 +236,6 @@
290
236
  "navigationStyle": "default",
291
237
  "titleBarStyle": "default"
292
238
  },
293
- {
294
- "id": "5403f00c961584ab",
295
- "type": "ui-group",
296
- "name": "Meine spezieller Dynamic-Form",
297
- "page": "540bda48de1fe22d",
298
- "width": "12",
299
- "height": "1",
300
- "order": 1,
301
- "showTitle": false,
302
- "className": "",
303
- "visible": "true",
304
- "disabled": "false"
305
- },
306
239
  {
307
240
  "id": "b4dcca3f3d895ff7",
308
241
  "type": "ui-page",
@@ -312,9 +245,9 @@
312
245
  "icon": "home",
313
246
  "layout": "grid",
314
247
  "theme": "7175f012d8e51857",
315
- "order": 2,
248
+ "order": 3,
316
249
  "className": "",
317
- "visible": "true",
250
+ "visible": false,
318
251
  "disabled": "false"
319
252
  },
320
253
  {
@@ -326,9 +259,9 @@
326
259
  "icon": "home",
327
260
  "layout": "grid",
328
261
  "theme": "7175f012d8e51857",
329
- "order": 3,
262
+ "order": 4,
330
263
  "className": "",
331
- "visible": true,
264
+ "visible": false,
332
265
  "disabled": "false"
333
266
  },
334
267
  {
@@ -363,9 +296,9 @@
363
296
  "icon": "home",
364
297
  "layout": "grid",
365
298
  "theme": "7175f012d8e51857",
366
- "order": 1,
299
+ "order": 2,
367
300
  "className": "",
368
- "visible": "true",
301
+ "visible": false,
369
302
  "disabled": "false"
370
303
  },
371
304
  {
@@ -386,24 +319,11 @@
386
319
  "type": "ui-page",
387
320
  "name": "DynamicTable",
388
321
  "ui": "26a45d43c064bdb6",
389
- "path": "/page4",
322
+ "path": "/DynamicTable",
390
323
  "icon": "home",
391
324
  "layout": "grid",
392
325
  "theme": "7175f012d8e51857",
393
- "order": -1,
394
- "className": "",
395
- "visible": "true",
396
- "disabled": "false"
397
- },
398
- {
399
- "id": "99fb2417816969fd",
400
- "type": "ui-group",
401
- "name": "Table",
402
- "page": "973fe345c23a83a4",
403
- "width": "12",
404
- "height": "1",
405
- "order": -1,
406
- "showTitle": true,
326
+ "order": 1,
407
327
  "className": "",
408
328
  "visible": "true",
409
329
  "disabled": "false"
@@ -1264,7 +1184,9 @@
1264
1184
  "error": "MyErrorCode",
1265
1185
  "x": 610,
1266
1186
  "y": 1100,
1267
- "wires": []
1187
+ "wires": [
1188
+ []
1189
+ ]
1268
1190
  },
1269
1191
  {
1270
1192
  "id": "1ba1e62c9935255f",
@@ -1472,139 +1394,22 @@
1472
1394
  ]
1473
1395
  ]
1474
1396
  },
1475
- {
1476
- "id": "ec0be0ef92746967",
1477
- "type": "usertask-input",
1478
- "z": "fd3c725340de4f74",
1479
- "g": "405f8c703368777c",
1480
- "name": "",
1481
- "engine": "42e6796dddd9d4db",
1482
- "query": "payload",
1483
- "force_send_array": true,
1484
- "multisend": false,
1485
- "x": 540,
1486
- "y": 140,
1487
- "wires": [
1488
- [
1489
- "090d42845540049c",
1490
- "846c5269df75c7a1"
1491
- ]
1492
- ]
1493
- },
1494
- {
1495
- "id": "090d42845540049c",
1496
- "type": "debug",
1497
- "z": "fd3c725340de4f74",
1498
- "g": "405f8c703368777c",
1499
- "name": "debug 10",
1500
- "active": true,
1501
- "tosidebar": true,
1502
- "console": false,
1503
- "tostatus": false,
1504
- "complete": "false",
1505
- "statusVal": "",
1506
- "statusType": "auto",
1507
- "x": 780,
1508
- "y": 80,
1509
- "wires": []
1510
- },
1511
- {
1512
- "id": "846c5269df75c7a1",
1513
- "type": "function",
1514
- "z": "fd3c725340de4f74",
1515
- "g": "405f8c703368777c",
1516
- "name": "prepare formData",
1517
- "func": "const result = {};\n\nmsg.payload.userTask.userTaskConfig.formFields.forEach(function(element) {\n result[element.id] = `Test for ${element.label}`; \n});\n\nmsg.payload[\"formData\"] = result;\n\nreturn msg;",
1518
- "outputs": 1,
1519
- "timeout": 0,
1520
- "noerr": 0,
1521
- "initialize": "",
1522
- "finalize": "",
1523
- "libs": [],
1524
- "x": 810,
1525
- "y": 140,
1526
- "wires": [
1527
- [
1528
- "68cf69be67688af6",
1529
- "4267576c32c782ec"
1530
- ]
1531
- ]
1532
- },
1533
- {
1534
- "id": "4267576c32c782ec",
1535
- "type": "usertask-output",
1536
- "z": "fd3c725340de4f74",
1537
- "g": "405f8c703368777c",
1538
- "name": "",
1539
- "engine": "d042a4c68f51d6ab",
1540
- "result": "payload",
1541
- "result_type": "msg",
1542
- "x": 1020,
1543
- "y": 140,
1544
- "wires": [
1545
- []
1546
- ]
1547
- },
1548
- {
1549
- "id": "68cf69be67688af6",
1550
- "type": "debug",
1551
- "z": "fd3c725340de4f74",
1552
- "g": "405f8c703368777c",
1553
- "name": "debug 11",
1554
- "active": true,
1555
- "tosidebar": true,
1556
- "console": false,
1557
- "tostatus": false,
1558
- "complete": "false",
1559
- "statusVal": "",
1560
- "statusType": "auto",
1561
- "x": 1000,
1562
- "y": 200,
1563
- "wires": []
1564
- },
1565
- {
1566
- "id": "bcfb8893adeb57ed",
1567
- "type": "comment",
1568
- "z": "fd3c725340de4f74",
1569
- "g": "405f8c703368777c",
1570
- "name": "Beispiel für UserTask",
1571
- "info": "",
1572
- "x": 370,
1573
- "y": 60,
1574
- "wires": []
1575
- },
1576
- {
1577
- "id": "3011d9be5207350a",
1578
- "type": "usertask-new-listener",
1579
- "z": "fd3c725340de4f74",
1580
- "g": "f29182f397cab86b",
1581
- "name": "",
1582
- "engine": "42e6796dddd9d4db",
1583
- "multisend": false,
1584
- "x": 160,
1585
- "y": 500,
1586
- "wires": [
1587
- [
1588
- "aa3ca456ddf1a7bd",
1589
- "efa57df2a7fa4a53"
1590
- ]
1591
- ]
1592
- },
1593
1397
  {
1594
1398
  "id": "aa3ca456ddf1a7bd",
1595
1399
  "type": "debug",
1596
1400
  "z": "fd3c725340de4f74",
1597
1401
  "g": "f29182f397cab86b",
1598
- "name": "debug 12",
1402
+ "name": "new",
1599
1403
  "active": true,
1600
1404
  "tosidebar": true,
1601
1405
  "console": false,
1602
1406
  "tostatus": false,
1603
- "complete": "false",
1407
+ "complete": "payload",
1408
+ "targetType": "msg",
1604
1409
  "statusVal": "",
1605
1410
  "statusType": "auto",
1606
- "x": 410,
1607
- "y": 500,
1411
+ "x": 430,
1412
+ "y": 140,
1608
1413
  "wires": []
1609
1414
  },
1610
1415
  {
@@ -1614,385 +1419,99 @@
1614
1419
  "g": "f29182f397cab86b",
1615
1420
  "name": "Listener für neue UserTasks",
1616
1421
  "info": "",
1617
- "x": 180,
1618
- "y": 420,
1619
- "wires": []
1620
- },
1621
- {
1622
- "id": "325156d6b8bfc4b6",
1623
- "type": "inject",
1624
- "z": "fd3c725340de4f74",
1625
- "g": "405f8c703368777c",
1626
- "name": "SampleUserTask_Process:Activity_0ljiko7",
1627
- "props": [
1628
- {
1629
- "p": "payload"
1630
- }
1631
- ],
1632
- "repeat": "",
1633
- "crontab": "",
1634
- "once": false,
1635
- "onceDelay": 0.1,
1636
- "topic": "",
1637
- "payload": "{\"processModelId\":\"SampleUserTask_Process\",\"flowNodeId\":\"Activity_0ljiko7\",\"flowNodeType\":\"bpmn:UserTask\",\"state\":\"suspended\"}",
1638
- "payloadType": "json",
1639
- "x": 240,
1640
- "y": 140,
1641
- "wires": [
1642
- [
1643
- "ec0be0ef92746967"
1644
- ]
1645
- ]
1646
- },
1647
- {
1648
- "id": "dac4a2305b629b9f",
1649
- "type": "inject",
1650
- "z": "fd3c725340de4f74",
1651
- "g": "405f8c703368777c",
1652
- "name": "SampleUserTask_Process:Activity_0glvmjk",
1653
- "props": [
1654
- {
1655
- "p": "payload"
1656
- }
1657
- ],
1658
- "repeat": "",
1659
- "crontab": "",
1660
- "once": false,
1661
- "onceDelay": 0.1,
1662
- "topic": "",
1663
- "payload": "{\"processModelId\":\"SampleUserTask_Process\",\"flowNodeId\":\"Activity_0glvmjk\",\"flowNodeType\":\"bpmn:UserTask\",\"state\":\"suspended\"}",
1664
- "payloadType": "json",
1665
- "x": 240,
1666
- "y": 200,
1667
- "wires": [
1668
- [
1669
- "ec0be0ef92746967"
1670
- ]
1671
- ]
1672
- },
1673
- {
1674
- "id": "6d1847a8cc5103ce",
1675
- "type": "inject",
1676
- "z": "fd3c725340de4f74",
1677
- "g": "405f8c703368777c",
1678
- "name": "flowNodeInstanceId",
1679
- "props": [
1680
- {
1681
- "p": "payload"
1682
- }
1683
- ],
1684
- "repeat": "",
1685
- "crontab": "",
1686
- "once": false,
1687
- "onceDelay": 0.1,
1688
- "topic": "",
1689
- "payload": "{\"flowNodeInstanceId\":\"af9f9061-304c-49df-8533-ff4260018130\"}",
1690
- "payloadType": "json",
1691
- "x": 310,
1692
- "y": 260,
1693
- "wires": [
1694
- [
1695
- "ec0be0ef92746967"
1696
- ]
1697
- ]
1698
- },
1699
- {
1700
- "id": "3a47f3acf7a512ea",
1701
- "type": "link in",
1702
- "z": "fd3c725340de4f74",
1703
- "g": "405f8c703368777c",
1704
- "name": "link in 1",
1705
- "links": [
1706
- "efa57df2a7fa4a53"
1707
- ],
1708
- "x": 385,
1709
- "y": 320,
1710
- "wires": [
1711
- [
1712
- "ec0be0ef92746967"
1713
- ]
1714
- ]
1715
- },
1716
- {
1717
- "id": "efa57df2a7fa4a53",
1718
- "type": "link out",
1719
- "z": "fd3c725340de4f74",
1720
- "g": "f29182f397cab86b",
1721
- "name": "link out 1",
1722
- "mode": "link",
1723
- "links": [
1724
- "3a47f3acf7a512ea"
1725
- ],
1726
- "x": 375,
1727
- "y": 440,
1422
+ "x": 200,
1423
+ "y": 100,
1728
1424
  "wires": []
1729
1425
  },
1730
1426
  {
1731
- "id": "5cc47f646e818d1e",
1732
- "type": "inject",
1733
- "z": "fd3c725340de4f74",
1734
- "g": "b60e94a5f1ee2790",
1735
- "name": "Parameter setzen",
1736
- "props": [
1737
- {
1738
- "p": "payload"
1739
- }
1740
- ],
1741
- "repeat": "",
1742
- "crontab": "",
1743
- "once": false,
1744
- "onceDelay": 0.1,
1745
- "topic": "",
1746
- "payload": "{\"flowNodeInstanceId\":\"a84dfgh2b416-58f7-443f-bd38-c10ddcd776cb\"}",
1747
- "payloadType": "json",
1748
- "x": 160,
1749
- "y": 700,
1750
- "wires": [
1751
- [
1752
- "66b90cf83a531a75"
1753
- ]
1754
- ]
1755
- },
1756
- {
1757
- "id": "66b90cf83a531a75",
1427
+ "id": "e283d772578fb6d2",
1758
1428
  "type": "usertask-input",
1759
1429
  "z": "fd3c725340de4f74",
1760
- "g": "b60e94a5f1ee2790",
1430
+ "g": "f29182f397cab86b",
1761
1431
  "name": "",
1762
1432
  "engine": "d042a4c68f51d6ab",
1763
- "query": "payload",
1764
- "query_type": "msg",
1765
- "force_send_array": false,
1433
+ "query": "{\"state\":\"suspended\"}",
1434
+ "query_type": "json",
1435
+ "force_send_array": true,
1766
1436
  "multisend": false,
1767
- "x": 400,
1768
- "y": 700,
1437
+ "x": 460,
1438
+ "y": 220,
1769
1439
  "wires": [
1770
1440
  [
1771
- "e002a108a6c7df75",
1772
- "a547ad5dcdd4613f"
1441
+ "86dd72913b9f2ee3"
1773
1442
  ]
1774
1443
  ]
1775
1444
  },
1776
1445
  {
1777
- "id": "e002a108a6c7df75",
1446
+ "id": "86dd72913b9f2ee3",
1778
1447
  "type": "debug",
1779
1448
  "z": "fd3c725340de4f74",
1780
- "g": "b60e94a5f1ee2790",
1781
- "name": "debug 15",
1449
+ "g": "f29182f397cab86b",
1450
+ "name": "user tasks",
1782
1451
  "active": true,
1783
1452
  "tosidebar": true,
1784
1453
  "console": false,
1785
1454
  "tostatus": false,
1786
- "complete": "false",
1455
+ "complete": "payload",
1456
+ "targetType": "msg",
1787
1457
  "statusVal": "",
1788
1458
  "statusType": "auto",
1789
- "x": 640,
1790
- "y": 700,
1791
- "wires": []
1792
- },
1793
- {
1794
- "id": "2851b83de5fb070d",
1795
- "type": "comment",
1796
- "z": "fd3c725340de4f74",
1797
- "g": "b60e94a5f1ee2790",
1798
- "name": "Abfragen von UserTasks",
1799
- "info": "",
1800
- "x": 170,
1801
- "y": 640,
1459
+ "x": 690,
1460
+ "y": 220,
1802
1461
  "wires": []
1803
1462
  },
1804
1463
  {
1805
- "id": "a547ad5dcdd4613f",
1806
- "type": "dynamic-form",
1464
+ "id": "3e89be46a437d93c",
1465
+ "type": "usertask-finished-listener",
1807
1466
  "z": "fd3c725340de4f74",
1808
- "g": "b60e94a5f1ee2790",
1467
+ "g": "f29182f397cab86b",
1809
1468
  "name": "",
1810
- "group": "5403f00c961584ab",
1811
- "order": 0,
1812
- "options": [
1813
- {
1814
- "label": "jljlkj"
1815
- },
1816
- {
1817
- "label": "another"
1818
- },
1819
- {
1820
- "label": "dsfjklsdj"
1821
- }
1822
- ],
1823
- "waiting_title": "Warten auf den Usertask...",
1824
- "waiting_info": "Der Usertask wird automatisch angezeigt, wenn ein entsprechender Task vorhanden ist.",
1825
- "width": 0,
1826
- "height": 0,
1827
- "outputs": 3,
1828
- "x": 640,
1829
- "y": 640,
1469
+ "engine": "d042a4c68f51d6ab",
1470
+ "multisend": false,
1471
+ "x": 190,
1472
+ "y": 260,
1830
1473
  "wires": [
1831
1474
  [
1832
- "e98eecc53e433cfe"
1833
- ],
1834
- [
1835
- "ed3c805cc0dc276c"
1836
- ],
1837
- [
1838
- "ed3c805cc0dc276c"
1475
+ "f0d9df3d9fea075b",
1476
+ "e283d772578fb6d2"
1839
1477
  ]
1840
1478
  ]
1841
1479
  },
1842
1480
  {
1843
- "id": "e98eecc53e433cfe",
1844
- "type": "debug",
1845
- "z": "fd3c725340de4f74",
1846
- "g": "b60e94a5f1ee2790",
1847
- "name": "debug 25",
1848
- "active": true,
1849
- "tosidebar": true,
1850
- "console": false,
1851
- "tostatus": false,
1852
- "complete": "false",
1853
- "statusVal": "",
1854
- "statusType": "auto",
1855
- "x": 860,
1856
- "y": 600,
1857
- "wires": []
1858
- },
1859
- {
1860
- "id": "ed3c805cc0dc276c",
1481
+ "id": "f0d9df3d9fea075b",
1861
1482
  "type": "debug",
1862
1483
  "z": "fd3c725340de4f74",
1863
- "g": "b60e94a5f1ee2790",
1864
- "name": "debug 26",
1484
+ "g": "f29182f397cab86b",
1485
+ "name": "finished",
1865
1486
  "active": true,
1866
1487
  "tosidebar": true,
1867
1488
  "console": false,
1868
1489
  "tostatus": false,
1869
- "complete": "false",
1490
+ "complete": "payload",
1491
+ "targetType": "msg",
1870
1492
  "statusVal": "",
1871
1493
  "statusType": "auto",
1872
- "x": 880,
1873
- "y": 640,
1494
+ "x": 440,
1495
+ "y": 300,
1874
1496
  "wires": []
1875
1497
  },
1876
1498
  {
1877
- "id": "a80d2f28ea46f22f",
1878
- "type": "inject",
1879
- "z": "fd3c725340de4f74",
1880
- "name": "",
1881
- "props": [
1882
- {
1883
- "p": "payload"
1884
- },
1885
- {
1886
- "p": "topic",
1887
- "vt": "str"
1888
- }
1889
- ],
1890
- "repeat": "",
1891
- "crontab": "",
1892
- "once": false,
1893
- "onceDelay": 0.1,
1894
- "topic": "",
1895
- "payload": "",
1896
- "payloadType": "date",
1897
- "x": 140,
1898
- "y": 840,
1899
- "wires": [
1900
- [
1901
- "e283d772578fb6d2"
1902
- ]
1903
- ]
1904
- },
1905
- {
1906
- "id": "09a463e42d3ce5b8",
1907
- "type": "dynamic-table",
1908
- "z": "fd3c725340de4f74",
1909
- "name": "",
1910
- "tableName": "",
1911
- "group": "99fb2417816969fd",
1912
- "order": 0,
1913
- "data": "payload.userTasks",
1914
- "data_type": "msg",
1915
- "options": [
1916
- {
1917
- "label": "action",
1918
- "condition": ""
1919
- },
1920
- {
1921
- "label": "another",
1922
- "condition": ""
1923
- }
1924
- ],
1925
- "columns": [
1926
- {
1927
- "label": "State",
1928
- "value": "state",
1929
- "type": "str"
1930
- }
1931
- ],
1932
- "width": 0,
1933
- "height": 0,
1934
- "outputs": 2,
1935
- "x": 560,
1936
- "y": 840,
1937
- "wires": [
1938
- [
1939
- "8c5309ae86d0cb66"
1940
- ],
1941
- [
1942
- "45208778372636d3"
1943
- ]
1944
- ]
1945
- },
1946
- {
1947
- "id": "e283d772578fb6d2",
1948
- "type": "usertask-input",
1499
+ "id": "3011d9be5207350a",
1500
+ "type": "usertask-new-listener",
1949
1501
  "z": "fd3c725340de4f74",
1502
+ "g": "f29182f397cab86b",
1950
1503
  "name": "",
1951
1504
  "engine": "d042a4c68f51d6ab",
1952
- "query": "{\"state\":\"suspended\"}",
1953
- "query_type": "json",
1954
- "force_send_array": true,
1955
1505
  "multisend": false,
1956
- "x": 340,
1957
- "y": 840,
1506
+ "x": 200,
1507
+ "y": 180,
1958
1508
  "wires": [
1959
1509
  [
1960
- "09a463e42d3ce5b8"
1510
+ "aa3ca456ddf1a7bd",
1511
+ "e283d772578fb6d2"
1961
1512
  ]
1962
1513
  ]
1963
1514
  },
1964
- {
1965
- "id": "8c5309ae86d0cb66",
1966
- "type": "debug",
1967
- "z": "fd3c725340de4f74",
1968
- "name": "debug 27",
1969
- "active": true,
1970
- "tosidebar": true,
1971
- "console": false,
1972
- "tostatus": false,
1973
- "complete": "false",
1974
- "statusVal": "",
1975
- "statusType": "auto",
1976
- "x": 740,
1977
- "y": 780,
1978
- "wires": []
1979
- },
1980
- {
1981
- "id": "45208778372636d3",
1982
- "type": "debug",
1983
- "z": "fd3c725340de4f74",
1984
- "name": "debug 28",
1985
- "active": true,
1986
- "tosidebar": true,
1987
- "console": false,
1988
- "tostatus": false,
1989
- "complete": "false",
1990
- "statusVal": "",
1991
- "statusType": "auto",
1992
- "x": 780,
1993
- "y": 880,
1994
- "wires": []
1995
- },
1996
1515
  {
1997
1516
  "id": "0f5978f327b01bfb",
1998
1517
  "type": "ui-table",
@@ -2218,6 +1737,7 @@
2218
1737
  "id": "97afbbf01ec1cd88",
2219
1738
  "type": "ui-event",
2220
1739
  "z": "b195bc3ca2e1a665",
1740
+ "d": true,
2221
1741
  "g": "09cdc14cfb8ad687",
2222
1742
  "ui": "26a45d43c064bdb6",
2223
1743
  "name": "",
@@ -2310,6 +1830,7 @@
2310
1830
  "id": "493500b42d8d0f5b",
2311
1831
  "type": "ui-event",
2312
1832
  "z": "b195bc3ca2e1a665",
1833
+ "d": true,
2313
1834
  "g": "ec36901abb138306",
2314
1835
  "ui": "26a45d43c064bdb6",
2315
1836
  "name": "",
@@ -2428,6 +1949,7 @@
2428
1949
  "id": "54a2572d4a48cf34",
2429
1950
  "type": "usertask-new-listener",
2430
1951
  "z": "b195bc3ca2e1a665",
1952
+ "d": true,
2431
1953
  "g": "bd2bef99e757d7bf",
2432
1954
  "name": "",
2433
1955
  "engine": "d042a4c68f51d6ab",
@@ -2627,6 +2149,7 @@
2627
2149
  "id": "879b5476deda73b0",
2628
2150
  "type": "ui-event",
2629
2151
  "z": "b195bc3ca2e1a665",
2152
+ "d": true,
2630
2153
  "g": "17b562c4786348d6",
2631
2154
  "ui": "26a45d43c064bdb6",
2632
2155
  "name": "",
@@ -8,6 +8,7 @@
8
8
  "dependencies": {
9
9
  "@5minds/node-red-contrib-processcube": "file:..",
10
10
  "@5minds/node-red-dashboard-2-processcube-dynamic-form": "^1.0.4",
11
+ "@5minds/node-red-dashboard-2-processcube-usertask-table": "^1.0.7",
11
12
  "@flowfuse/node-red-dashboard": "^1.11.1",
12
13
  "node-red": "^3.1.10",
13
14
  "node-red-debugger": "^1.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "0.7.1-develop-0efb28-ly43nhqf",
3
+ "version": "0.8.0-develop-13dd2c-ly45bz1z",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "authors": [
@@ -40,6 +40,7 @@
40
40
  "messageEventTrigger": "message-event-trigger.js",
41
41
  "signalEventTrigger": "signal-event-trigger.js",
42
42
  "UserTaskNewListener": "usertask-new-listener.js",
43
+ "UserTaskFinishedListener": "usertask-finished-listener.js",
43
44
  "UserTaskInput": "usertask-input.js",
44
45
  "UserTaskOutput": "usertask-output.js"
45
46
  }
@@ -32,7 +32,6 @@
32
32
  <camunda:value id="value_02" name="Value 02" />
33
33
  </camunda:formField>
34
34
  <camunda:formField id="boolean_id" label="Boolean Label" type="boolean" />
35
- <camunda:formField id="customer_01" label="Custom_01" type="v-text-field" />
36
35
  </camunda:formData>
37
36
  </bpmn:extensionElements>
38
37
  <bpmn:incoming>Flow_1h0giih</bpmn:incoming>
@@ -0,0 +1,39 @@
1
+ <script type="text/javascript">
2
+ RED.nodes.registerType('usertask-finished-listener',{
3
+ category: 'ProcessCube',
4
+ color: '#00aed7',
5
+ defaults: {
6
+ name: {value: ""},
7
+ engine: {value: "", type: "processcube-engine-config"},
8
+ multisend: {value: false}
9
+ },
10
+ inputs: 0,
11
+ outputs: 1,
12
+ icon: "font-awesome/fa-envelope",
13
+ label: function() {
14
+ return this.name || "usertask-finished-listener";
15
+ }
16
+ });
17
+ </script>
18
+
19
+ <script type="text/html" data-template-name="usertask-finished-listener">
20
+ <div class="form-row">
21
+ <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
22
+ <input type="text" id="node-input-name" placeholder="Name">
23
+ </div>
24
+ <div class="form-row">
25
+ <label for="node-input-engine"><i class="fa fa-tag"></i> Engine-URL</label>
26
+ <input type="text" id="node-input-engine" placeholder="http://engine:8000">
27
+ </div>
28
+ <div class="form-row" style="display:flex; margin-bottom: 3px;">
29
+ <label for="node-input-multisend" style="vertical-align:top"><i class="fa fa-list-alt"></i> Send multi</label>
30
+ <div>
31
+ <input type="checkbox" checked id="node-input-multisend" style="display: inline-block; width: auto; margin: 0px 0px 0px 4px;">
32
+ <label style="width:auto" for="node-input-multisend">Send one output of each usertask input?</label>
33
+ </div>
34
+ </div>
35
+ </script>
36
+
37
+ <script type="text/html" data-help-name="usertask-finished-listener">
38
+ <p>A node which subscribes to an User Task of https://processcube.io</p>
39
+ </script>
@@ -0,0 +1,41 @@
1
+ const process = require('process');
2
+ const EventEmitter = require('node:events');
3
+
4
+ const engine_client = require('@5minds/processcube_engine_client');
5
+
6
+ module.exports = function(RED) {
7
+ function UserTaskFinishedListener(config) {
8
+ RED.nodes.createNode(this, config);
9
+ var node = this;
10
+ var flowContext = node.context().flow;
11
+ var nodeContext = node.context();
12
+
13
+ this.engine = this.server = RED.nodes.getNode(config.engine);
14
+
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
+ }
23
+
24
+ var eventEmitter = flowContext.get('emitter');
25
+
26
+ if (!eventEmitter) {
27
+ flowContext.set('emitter', new EventEmitter());
28
+ eventEmitter = flowContext.get('emitter');
29
+ }
30
+
31
+ node.on("close", async () => {
32
+ client.dispose();
33
+ client = null;
34
+ });
35
+
36
+ client.userTasks.onUserTaskFinished((userTaskFinishedNotification) => {
37
+ node.send({ payload: { flowNodeInstanceId: userTaskFinishedNotification.flowNodeInstanceId, action: "finished", type: "usertask" } });
38
+ });
39
+ }
40
+ RED.nodes.registerType("usertask-finished-listener", UserTaskFinishedListener);
41
+ }
package/usertask-input.js CHANGED
@@ -44,12 +44,9 @@ module.exports = function(RED) {
44
44
 
45
45
  node.on('input', function(msg) {
46
46
  const query = RED.util.evaluateNodeProperty(config.query, config.query_type, node, msg)
47
- console.log(query)
48
47
 
49
48
  client.userTasks.query(query).then((matchingFlowNodes) => {
50
49
 
51
- console.log(`UserTaskInput query result: ${JSON.stringify(matchingFlowNodes)}`);
52
-
53
50
  if (!config.force_send_array && matchingFlowNodes && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
54
51
  userTask = matchingFlowNodes.userTasks[0];
55
52
 
@@ -34,6 +34,6 @@
34
34
  </div>
35
35
  </script>
36
36
 
37
- <script type="text/html" data-help-name="usertask-input">
37
+ <script type="text/html" data-help-name="usertask-new-listener">
38
38
  <p>A node which subscribes to an User Task of https://processcube.io</p>
39
39
  </script>
@@ -34,9 +34,7 @@ module.exports = function(RED) {
34
34
  });
35
35
 
36
36
  client.userTasks.onUserTaskWaiting((userTaskWaitingNotification) => {
37
- console.log(`UserTask with id ${userTaskWaitingNotification.flowNodeInstanceId} is waiting.`);
38
-
39
- node.send({ payload: { flowNodeInstanceId: userTaskWaitingNotification.flowNodeInstanceId } });
37
+ node.send({ payload: { flowNodeInstanceId: userTaskWaitingNotification.flowNodeInstanceIdaction, action: "new", type: "usertask" } });
40
38
  });
41
39
  }
42
40
  RED.nodes.registerType("usertask-new-listener", UserTaskNewListener);
@@ -32,14 +32,12 @@ module.exports = function(RED) {
32
32
 
33
33
  node.on('input', function(msg) {
34
34
  if (msg.payload.userTask) {
35
- console.log(`Try to finsih UserTask with id ${msg.payload.userTask.flowNodeInstanceId}.`);
36
35
 
37
36
  const flowNodeInstanceId = msg.payload.userTask.flowNodeInstanceId;
38
37
 
39
38
  const userTaskResult = RED.util.evaluateNodeProperty(config.result, config.result_type, node, msg);
40
39
 
41
40
  client.userTasks.finishUserTask(flowNodeInstanceId, userTaskResult).then(() => {
42
- console.log(`UserTask with id ${flowNodeInstanceId} finished.`);
43
41
 
44
42
  node.send(msg);
45
43
  }).catch(error => {