@5minds/node-red-contrib-processcube 1.3.1-feature-1ab585-m21yvqst → 1.3.2-feature-a99d33-m24jmsi2
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,187 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"id": "d6c450fe98faa45f",
|
4
|
+
"type": "tab",
|
5
|
+
"label": "Wait for usertask",
|
6
|
+
"disabled": false,
|
7
|
+
"info": "",
|
8
|
+
"env": []
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"id": "30b8f9c606a2bb83",
|
12
|
+
"type": "wait-for-usertask",
|
13
|
+
"z": "d6c450fe98faa45f",
|
14
|
+
"name": "",
|
15
|
+
"engine": "42e6796dddd9d4db",
|
16
|
+
"query": "payload",
|
17
|
+
"query_type": "msg",
|
18
|
+
"only_for_new": true,
|
19
|
+
"x": 590,
|
20
|
+
"y": 120,
|
21
|
+
"wires": [
|
22
|
+
[
|
23
|
+
"d9cb8e69e985d6df",
|
24
|
+
"a5c0ea907e64e759"
|
25
|
+
]
|
26
|
+
]
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"id": "20fd37adf0fb6f39",
|
30
|
+
"type": "process-start",
|
31
|
+
"z": "d6c450fe98faa45f",
|
32
|
+
"name": "",
|
33
|
+
"engine": "42e6796dddd9d4db",
|
34
|
+
"processmodel": "Wait-For-Usertask_Process",
|
35
|
+
"startevent": "StartEvent_1",
|
36
|
+
"x": 250,
|
37
|
+
"y": 120,
|
38
|
+
"wires": [
|
39
|
+
[
|
40
|
+
"1e1e9c428172eae2",
|
41
|
+
"c65a4ba5461e7ee0"
|
42
|
+
]
|
43
|
+
]
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"id": "e18451d69a169f5f",
|
47
|
+
"type": "inject",
|
48
|
+
"z": "d6c450fe98faa45f",
|
49
|
+
"name": "",
|
50
|
+
"props": [
|
51
|
+
{
|
52
|
+
"p": "payload"
|
53
|
+
}
|
54
|
+
],
|
55
|
+
"repeat": "",
|
56
|
+
"crontab": "",
|
57
|
+
"once": false,
|
58
|
+
"onceDelay": 0.1,
|
59
|
+
"topic": "",
|
60
|
+
"payload": "{}",
|
61
|
+
"payloadType": "json",
|
62
|
+
"x": 90,
|
63
|
+
"y": 120,
|
64
|
+
"wires": [
|
65
|
+
[
|
66
|
+
"20fd37adf0fb6f39"
|
67
|
+
]
|
68
|
+
]
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"id": "d9cb8e69e985d6df",
|
72
|
+
"type": "delay",
|
73
|
+
"z": "d6c450fe98faa45f",
|
74
|
+
"name": "",
|
75
|
+
"pauseType": "delay",
|
76
|
+
"timeout": "5",
|
77
|
+
"timeoutUnits": "seconds",
|
78
|
+
"rate": "1",
|
79
|
+
"nbRateUnits": "1",
|
80
|
+
"rateUnits": "second",
|
81
|
+
"randomFirst": "1",
|
82
|
+
"randomLast": "5",
|
83
|
+
"randomUnits": "seconds",
|
84
|
+
"drop": false,
|
85
|
+
"allowrate": false,
|
86
|
+
"outputs": 1,
|
87
|
+
"x": 540,
|
88
|
+
"y": 200,
|
89
|
+
"wires": [
|
90
|
+
[
|
91
|
+
"acecfeef70b5c4ad"
|
92
|
+
]
|
93
|
+
]
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"id": "44f4c6c64263d366",
|
97
|
+
"type": "usertask-output",
|
98
|
+
"z": "d6c450fe98faa45f",
|
99
|
+
"name": "",
|
100
|
+
"engine": "42e6796dddd9d4db",
|
101
|
+
"result": "payload",
|
102
|
+
"result_type": "msg",
|
103
|
+
"x": 880,
|
104
|
+
"y": 200,
|
105
|
+
"wires": [
|
106
|
+
[]
|
107
|
+
]
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"id": "acecfeef70b5c4ad",
|
111
|
+
"type": "function",
|
112
|
+
"z": "d6c450fe98faa45f",
|
113
|
+
"name": "pre",
|
114
|
+
"func": "msg.payload = {};\nreturn msg;",
|
115
|
+
"outputs": 1,
|
116
|
+
"timeout": 0,
|
117
|
+
"noerr": 0,
|
118
|
+
"initialize": "",
|
119
|
+
"finalize": "",
|
120
|
+
"libs": [],
|
121
|
+
"x": 710,
|
122
|
+
"y": 200,
|
123
|
+
"wires": [
|
124
|
+
[
|
125
|
+
"44f4c6c64263d366"
|
126
|
+
]
|
127
|
+
]
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"id": "1e1e9c428172eae2",
|
131
|
+
"type": "function",
|
132
|
+
"z": "d6c450fe98faa45f",
|
133
|
+
"name": "query",
|
134
|
+
"func": "msg.payload = {\n \"processInstanceId\": msg.payload.processInstanceId,\n \"flowNodeId\": \"make_it\"\n};\n\nreturn msg;",
|
135
|
+
"outputs": 1,
|
136
|
+
"timeout": 0,
|
137
|
+
"noerr": 0,
|
138
|
+
"initialize": "",
|
139
|
+
"finalize": "",
|
140
|
+
"libs": [],
|
141
|
+
"x": 410,
|
142
|
+
"y": 120,
|
143
|
+
"wires": [
|
144
|
+
[
|
145
|
+
"30b8f9c606a2bb83"
|
146
|
+
]
|
147
|
+
]
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"id": "c65a4ba5461e7ee0",
|
151
|
+
"type": "debug",
|
152
|
+
"z": "d6c450fe98faa45f",
|
153
|
+
"name": "debug 32",
|
154
|
+
"active": true,
|
155
|
+
"tosidebar": true,
|
156
|
+
"console": false,
|
157
|
+
"tostatus": false,
|
158
|
+
"complete": "false",
|
159
|
+
"statusVal": "",
|
160
|
+
"statusType": "auto",
|
161
|
+
"x": 370,
|
162
|
+
"y": 60,
|
163
|
+
"wires": []
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"id": "a5c0ea907e64e759",
|
167
|
+
"type": "debug",
|
168
|
+
"z": "d6c450fe98faa45f",
|
169
|
+
"name": "debug 33",
|
170
|
+
"active": true,
|
171
|
+
"tosidebar": true,
|
172
|
+
"console": false,
|
173
|
+
"tostatus": false,
|
174
|
+
"complete": "false",
|
175
|
+
"statusVal": "",
|
176
|
+
"statusType": "auto",
|
177
|
+
"x": 760,
|
178
|
+
"y": 60,
|
179
|
+
"wires": []
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"id": "42e6796dddd9d4db",
|
183
|
+
"type": "processcube-engine-config",
|
184
|
+
"name": "Engine 8000",
|
185
|
+
"url": "http://engine:8000"
|
186
|
+
}
|
187
|
+
]
|
package/nodered/flows.json
CHANGED
@@ -63,6 +63,14 @@
|
|
63
63
|
"info": "",
|
64
64
|
"env": []
|
65
65
|
},
|
66
|
+
{
|
67
|
+
"id": "d6c450fe98faa45f",
|
68
|
+
"type": "tab",
|
69
|
+
"label": "Wait for usertask",
|
70
|
+
"disabled": false,
|
71
|
+
"info": "",
|
72
|
+
"env": []
|
73
|
+
},
|
66
74
|
{
|
67
75
|
"id": "4c59118134081e05",
|
68
76
|
"type": "group",
|
@@ -1111,8 +1119,6 @@
|
|
1111
1119
|
"engine": "42e6796dddd9d4db",
|
1112
1120
|
"query": "payload",
|
1113
1121
|
"query_type": "msg",
|
1114
|
-
"force_send_array": false,
|
1115
|
-
"multisend": false,
|
1116
1122
|
"x": 180,
|
1117
1123
|
"y": 420,
|
1118
1124
|
"wires": [
|
@@ -1245,8 +1251,6 @@
|
|
1245
1251
|
"engine": "b78932d162d8d468",
|
1246
1252
|
"query": "payload",
|
1247
1253
|
"query_type": "msg",
|
1248
|
-
"force_send_array": false,
|
1249
|
-
"multisend": false,
|
1250
1254
|
"x": 200,
|
1251
1255
|
"y": 440,
|
1252
1256
|
"wires": [
|
@@ -1821,5 +1825,176 @@
|
|
1821
1825
|
"x": 110,
|
1822
1826
|
"y": 260,
|
1823
1827
|
"wires": []
|
1828
|
+
},
|
1829
|
+
{
|
1830
|
+
"id": "30b8f9c606a2bb83",
|
1831
|
+
"type": "wait-for-usertask",
|
1832
|
+
"z": "d6c450fe98faa45f",
|
1833
|
+
"name": "",
|
1834
|
+
"engine": "42e6796dddd9d4db",
|
1835
|
+
"query": "payload",
|
1836
|
+
"query_type": "msg",
|
1837
|
+
"only_for_new": true,
|
1838
|
+
"x": 590,
|
1839
|
+
"y": 120,
|
1840
|
+
"wires": [
|
1841
|
+
[
|
1842
|
+
"d9cb8e69e985d6df",
|
1843
|
+
"a5c0ea907e64e759"
|
1844
|
+
]
|
1845
|
+
]
|
1846
|
+
},
|
1847
|
+
{
|
1848
|
+
"id": "20fd37adf0fb6f39",
|
1849
|
+
"type": "process-start",
|
1850
|
+
"z": "d6c450fe98faa45f",
|
1851
|
+
"name": "",
|
1852
|
+
"engine": "42e6796dddd9d4db",
|
1853
|
+
"processmodel": "Wait-For-Usertask_Process",
|
1854
|
+
"startevent": "StartEvent_1",
|
1855
|
+
"x": 250,
|
1856
|
+
"y": 120,
|
1857
|
+
"wires": [
|
1858
|
+
[
|
1859
|
+
"1e1e9c428172eae2",
|
1860
|
+
"c65a4ba5461e7ee0"
|
1861
|
+
]
|
1862
|
+
]
|
1863
|
+
},
|
1864
|
+
{
|
1865
|
+
"id": "e18451d69a169f5f",
|
1866
|
+
"type": "inject",
|
1867
|
+
"z": "d6c450fe98faa45f",
|
1868
|
+
"name": "",
|
1869
|
+
"props": [
|
1870
|
+
{
|
1871
|
+
"p": "payload"
|
1872
|
+
}
|
1873
|
+
],
|
1874
|
+
"repeat": "",
|
1875
|
+
"crontab": "",
|
1876
|
+
"once": false,
|
1877
|
+
"onceDelay": 0.1,
|
1878
|
+
"topic": "",
|
1879
|
+
"payload": "{}",
|
1880
|
+
"payloadType": "json",
|
1881
|
+
"x": 90,
|
1882
|
+
"y": 120,
|
1883
|
+
"wires": [
|
1884
|
+
[
|
1885
|
+
"20fd37adf0fb6f39"
|
1886
|
+
]
|
1887
|
+
]
|
1888
|
+
},
|
1889
|
+
{
|
1890
|
+
"id": "d9cb8e69e985d6df",
|
1891
|
+
"type": "delay",
|
1892
|
+
"z": "d6c450fe98faa45f",
|
1893
|
+
"name": "",
|
1894
|
+
"pauseType": "delay",
|
1895
|
+
"timeout": "5",
|
1896
|
+
"timeoutUnits": "seconds",
|
1897
|
+
"rate": "1",
|
1898
|
+
"nbRateUnits": "1",
|
1899
|
+
"rateUnits": "second",
|
1900
|
+
"randomFirst": "1",
|
1901
|
+
"randomLast": "5",
|
1902
|
+
"randomUnits": "seconds",
|
1903
|
+
"drop": false,
|
1904
|
+
"allowrate": false,
|
1905
|
+
"outputs": 1,
|
1906
|
+
"x": 540,
|
1907
|
+
"y": 200,
|
1908
|
+
"wires": [
|
1909
|
+
[
|
1910
|
+
"acecfeef70b5c4ad"
|
1911
|
+
]
|
1912
|
+
]
|
1913
|
+
},
|
1914
|
+
{
|
1915
|
+
"id": "44f4c6c64263d366",
|
1916
|
+
"type": "usertask-output",
|
1917
|
+
"z": "d6c450fe98faa45f",
|
1918
|
+
"name": "",
|
1919
|
+
"engine": "42e6796dddd9d4db",
|
1920
|
+
"result": "payload",
|
1921
|
+
"result_type": "msg",
|
1922
|
+
"x": 880,
|
1923
|
+
"y": 200,
|
1924
|
+
"wires": [
|
1925
|
+
[]
|
1926
|
+
]
|
1927
|
+
},
|
1928
|
+
{
|
1929
|
+
"id": "acecfeef70b5c4ad",
|
1930
|
+
"type": "function",
|
1931
|
+
"z": "d6c450fe98faa45f",
|
1932
|
+
"name": "pre",
|
1933
|
+
"func": "msg.payload = {};\nreturn msg;",
|
1934
|
+
"outputs": 1,
|
1935
|
+
"timeout": 0,
|
1936
|
+
"noerr": 0,
|
1937
|
+
"initialize": "",
|
1938
|
+
"finalize": "",
|
1939
|
+
"libs": [],
|
1940
|
+
"x": 710,
|
1941
|
+
"y": 200,
|
1942
|
+
"wires": [
|
1943
|
+
[
|
1944
|
+
"44f4c6c64263d366"
|
1945
|
+
]
|
1946
|
+
]
|
1947
|
+
},
|
1948
|
+
{
|
1949
|
+
"id": "1e1e9c428172eae2",
|
1950
|
+
"type": "function",
|
1951
|
+
"z": "d6c450fe98faa45f",
|
1952
|
+
"name": "query",
|
1953
|
+
"func": "msg.payload = {\n \"processInstanceId\": msg.payload.processInstanceId,\n \"flowNodeId\": \"make_it\"\n};\n\nreturn msg;",
|
1954
|
+
"outputs": 1,
|
1955
|
+
"timeout": 0,
|
1956
|
+
"noerr": 0,
|
1957
|
+
"initialize": "",
|
1958
|
+
"finalize": "",
|
1959
|
+
"libs": [],
|
1960
|
+
"x": 410,
|
1961
|
+
"y": 120,
|
1962
|
+
"wires": [
|
1963
|
+
[
|
1964
|
+
"30b8f9c606a2bb83"
|
1965
|
+
]
|
1966
|
+
]
|
1967
|
+
},
|
1968
|
+
{
|
1969
|
+
"id": "c65a4ba5461e7ee0",
|
1970
|
+
"type": "debug",
|
1971
|
+
"z": "d6c450fe98faa45f",
|
1972
|
+
"name": "debug 32",
|
1973
|
+
"active": true,
|
1974
|
+
"tosidebar": true,
|
1975
|
+
"console": false,
|
1976
|
+
"tostatus": false,
|
1977
|
+
"complete": "false",
|
1978
|
+
"statusVal": "",
|
1979
|
+
"statusType": "auto",
|
1980
|
+
"x": 370,
|
1981
|
+
"y": 60,
|
1982
|
+
"wires": []
|
1983
|
+
},
|
1984
|
+
{
|
1985
|
+
"id": "a5c0ea907e64e759",
|
1986
|
+
"type": "debug",
|
1987
|
+
"z": "d6c450fe98faa45f",
|
1988
|
+
"name": "debug 33",
|
1989
|
+
"active": true,
|
1990
|
+
"tosidebar": true,
|
1991
|
+
"console": false,
|
1992
|
+
"tostatus": false,
|
1993
|
+
"complete": "false",
|
1994
|
+
"statusVal": "",
|
1995
|
+
"statusType": "auto",
|
1996
|
+
"x": 760,
|
1997
|
+
"y": 60,
|
1998
|
+
"wires": []
|
1824
1999
|
}
|
1825
2000
|
]
|
package/package.json
CHANGED
@@ -0,0 +1,74 @@
|
|
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="Wait-For-Usertask_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="Wait-For-Usertask" processRef="Wait-For-Usertask_Process" />
|
5
|
+
</bpmn:collaboration>
|
6
|
+
<bpmn:process id="Wait-For-Usertask_Process" name="Wait-For-Usertask" isExecutable="true">
|
7
|
+
<bpmn:laneSet>
|
8
|
+
<bpmn:lane id="Lane_1xzf0d3" name="Lane">
|
9
|
+
<bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
|
10
|
+
<bpmn:flowNodeRef>Event_0zjvsuj</bpmn:flowNodeRef>
|
11
|
+
<bpmn:flowNodeRef>make_it</bpmn:flowNodeRef>
|
12
|
+
<bpmn:flowNodeRef>Event_02k45ju</bpmn:flowNodeRef>
|
13
|
+
</bpmn:lane>
|
14
|
+
</bpmn:laneSet>
|
15
|
+
<bpmn:startEvent id="StartEvent_1" name="Start">
|
16
|
+
<bpmn:outgoing>Flow_085u77p</bpmn:outgoing>
|
17
|
+
</bpmn:startEvent>
|
18
|
+
<bpmn:sequenceFlow id="Flow_085u77p" sourceRef="StartEvent_1" targetRef="Event_02k45ju" />
|
19
|
+
<bpmn:sequenceFlow id="Flow_0rvexxn" sourceRef="Event_02k45ju" targetRef="make_it" />
|
20
|
+
<bpmn:endEvent id="Event_0zjvsuj">
|
21
|
+
<bpmn:incoming>Flow_10jnerm</bpmn:incoming>
|
22
|
+
</bpmn:endEvent>
|
23
|
+
<bpmn:sequenceFlow id="Flow_10jnerm" sourceRef="make_it" targetRef="Event_0zjvsuj" />
|
24
|
+
<bpmn:userTask id="make_it" name="Make it">
|
25
|
+
<bpmn:incoming>Flow_0rvexxn</bpmn:incoming>
|
26
|
+
<bpmn:outgoing>Flow_10jnerm</bpmn:outgoing>
|
27
|
+
</bpmn:userTask>
|
28
|
+
<bpmn:intermediateCatchEvent id="Event_02k45ju">
|
29
|
+
<bpmn:incoming>Flow_085u77p</bpmn:incoming>
|
30
|
+
<bpmn:outgoing>Flow_0rvexxn</bpmn:outgoing>
|
31
|
+
<bpmn:timerEventDefinition id="TimerEventDefinition_157z719">
|
32
|
+
<bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT5S</bpmn:timeDuration>
|
33
|
+
</bpmn:timerEventDefinition>
|
34
|
+
</bpmn:intermediateCatchEvent>
|
35
|
+
</bpmn:process>
|
36
|
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
37
|
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
|
38
|
+
<bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
|
39
|
+
<dc:Bounds x="5" y="4" width="535" height="346" />
|
40
|
+
</bpmndi:BPMNShape>
|
41
|
+
<bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
|
42
|
+
<dc:Bounds x="35" y="4" width="505" height="346" />
|
43
|
+
</bpmndi:BPMNShape>
|
44
|
+
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
|
45
|
+
<dc:Bounds x="92" y="152" width="36" height="36" />
|
46
|
+
<bpmndi:BPMNLabel>
|
47
|
+
<dc:Bounds x="98" y="195" width="24" height="14" />
|
48
|
+
</bpmndi:BPMNLabel>
|
49
|
+
</bpmndi:BPMNShape>
|
50
|
+
<bpmndi:BPMNShape id="Event_0zjvsuj_di" bpmnElement="Event_0zjvsuj">
|
51
|
+
<dc:Bounds x="442" y="152" width="36" height="36" />
|
52
|
+
</bpmndi:BPMNShape>
|
53
|
+
<bpmndi:BPMNShape id="Activity_0yse9qf_di" bpmnElement="make_it">
|
54
|
+
<dc:Bounds x="280" y="130" width="100" height="80" />
|
55
|
+
<bpmndi:BPMNLabel />
|
56
|
+
</bpmndi:BPMNShape>
|
57
|
+
<bpmndi:BPMNShape id="Event_09boky1_di" bpmnElement="Event_02k45ju">
|
58
|
+
<dc:Bounds x="182" y="152" width="36" height="36" />
|
59
|
+
</bpmndi:BPMNShape>
|
60
|
+
<bpmndi:BPMNEdge id="Flow_085u77p_di" bpmnElement="Flow_085u77p">
|
61
|
+
<di:waypoint x="128" y="170" />
|
62
|
+
<di:waypoint x="182" y="170" />
|
63
|
+
</bpmndi:BPMNEdge>
|
64
|
+
<bpmndi:BPMNEdge id="Flow_0rvexxn_di" bpmnElement="Flow_0rvexxn">
|
65
|
+
<di:waypoint x="218" y="170" />
|
66
|
+
<di:waypoint x="280" y="170" />
|
67
|
+
</bpmndi:BPMNEdge>
|
68
|
+
<bpmndi:BPMNEdge id="Flow_10jnerm_di" bpmnElement="Flow_10jnerm">
|
69
|
+
<di:waypoint x="380" y="170" />
|
70
|
+
<di:waypoint x="442" y="170" />
|
71
|
+
</bpmndi:BPMNEdge>
|
72
|
+
</bpmndi:BPMNPlane>
|
73
|
+
</bpmndi:BPMNDiagram>
|
74
|
+
</bpmn:definitions>
|
package/wait-for-usertask.js
CHANGED
@@ -30,6 +30,9 @@ module.exports = function (RED) {
|
|
30
30
|
const matchingFlowNodes = await client.userTasks.query(newQuery, { identity: currentIdentity });
|
31
31
|
|
32
32
|
if (matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
|
33
|
+
// remove subscription
|
34
|
+
client.userTasks.removeSubscription(subscription, currentIdentity);
|
35
|
+
|
33
36
|
const userTask = matchingFlowNodes.userTasks[0];
|
34
37
|
|
35
38
|
msg.payload = { userTask: userTask };
|
@@ -38,8 +41,6 @@ module.exports = function (RED) {
|
|
38
41
|
// nothing todo - wait for next notification
|
39
42
|
}
|
40
43
|
|
41
|
-
// remove subscription
|
42
|
-
client.userTasks.removeSubscription(subscription, currentIdentity);
|
43
44
|
}, { identity: currentIdentity });
|
44
45
|
|
45
46
|
node.log({"Handling old userTasks config.only_for_new": config.only_for_new});
|