@5minds/node-red-contrib-processcube 1.4.0-develop-d2cbe1-m2d1k6k4 → 2.0.0-feature-629c78-m2dq1ygt
Sign up to get free protection for your applications and to get access to all the features.
- package/doc_generator/_process_instances_query.md +115 -0
- package/doc_generator/generator.js +41 -0
- package/doc_generator/generator_with_swagger.js +72 -0
- package/doc_generator/package-lock.json +176 -0
- package/doc_generator/package.json +15 -0
- package/doc_generator/query_template.mustache +20 -0
- package/doc_generator/swagger.json +4110 -0
- package/externaltask-input.html +16 -1
- package/externaltask-input.js +9 -2
- package/nodered/flows.json +157 -1
- package/package.json +1 -1
- package/process-terminate.html +3 -2
- package/processinstance-query.html +115 -1
package/externaltask-input.html
CHANGED
@@ -58,11 +58,26 @@
|
|
58
58
|
Waiting for external tasks that correspond to the `Topic` configured in
|
59
59
|
the connected ProcessCube Engine for processing.
|
60
60
|
|
61
|
+
## Configs
|
62
|
+
|
63
|
+
: name (string) : The name of the node
|
64
|
+
: engine (string) : The ProcessCube Engine to connect to
|
65
|
+
: topic (string) : The topic of the external task
|
66
|
+
: workerConfig (object) : The configuration for the worker
|
67
|
+
|
68
|
+
### workerConfig
|
69
|
+
|
70
|
+
- workerId (string): The id of the worker
|
71
|
+
- lockDuration (number): The duration in milliseconds the external task is locked for execution
|
72
|
+
- maxTasks (number): The maximum number of tasks that can be fetched at once
|
73
|
+
- longpollingTimeout (number): The duration in milliseconds the external task is locked for execution
|
74
|
+
- payloadFilter (Req-Expression): The filter for the payload of the external task
|
75
|
+
|
61
76
|
## Outputs
|
62
77
|
|
63
78
|
: payload (string) : The payload the external task was started with.
|
64
79
|
: task (object) : The external task object
|
65
|
-
: flowNodeInstanceId : The unique identifier of the external task, which is needed to complete the task
|
80
|
+
: flowNodeInstanceId (string) : The unique identifier of the external task, which is needed to complete the task
|
66
81
|
|
67
82
|
### Details
|
68
83
|
|
package/externaltask-input.js
CHANGED
@@ -109,8 +109,14 @@ module.exports = function (RED) {
|
|
109
109
|
});
|
110
110
|
};
|
111
111
|
|
112
|
+
let options = {};
|
113
|
+
|
114
|
+
if (!!config.workerConfig) {
|
115
|
+
options = RED.util.evaluateNodeProperty(config.workerConfig, 'json', node);
|
116
|
+
}
|
117
|
+
|
112
118
|
client.externalTasks
|
113
|
-
.subscribeToExternalTaskTopic(config.topic, etwCallback,
|
119
|
+
.subscribeToExternalTaskTopic(config.topic, etwCallback, options)
|
114
120
|
.then(async (externalTaskWorker) => {
|
115
121
|
node.status({ fill: 'blue', shape: 'ring', text: 'subcribed' });
|
116
122
|
|
@@ -136,7 +142,8 @@ module.exports = function (RED) {
|
|
136
142
|
showStatus(node, Object.keys(started_external_tasks).length);
|
137
143
|
break;
|
138
144
|
default:
|
139
|
-
|
145
|
+
// reduce noise error logs
|
146
|
+
// node.error(`Worker error ${errorType}: ${error.message}`);
|
140
147
|
break;
|
141
148
|
}
|
142
149
|
});
|
package/nodered/flows.json
CHANGED
@@ -71,6 +71,22 @@
|
|
71
71
|
"info": "",
|
72
72
|
"env": []
|
73
73
|
},
|
74
|
+
{
|
75
|
+
"id": "76c047e0d8770a20",
|
76
|
+
"type": "tab",
|
77
|
+
"label": "Other Events",
|
78
|
+
"disabled": false,
|
79
|
+
"info": "",
|
80
|
+
"env": []
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"id": "2766c40d84283368",
|
84
|
+
"type": "tab",
|
85
|
+
"label": "Placeholder",
|
86
|
+
"disabled": false,
|
87
|
+
"info": "",
|
88
|
+
"env": []
|
89
|
+
},
|
74
90
|
{
|
75
91
|
"id": "4c59118134081e05",
|
76
92
|
"type": "group",
|
@@ -467,6 +483,52 @@
|
|
467
483
|
"w": 572,
|
468
484
|
"h": 142
|
469
485
|
},
|
486
|
+
{
|
487
|
+
"id": "865723b71ced9418",
|
488
|
+
"type": "group",
|
489
|
+
"z": "76c047e0d8770a20",
|
490
|
+
"style": {
|
491
|
+
"stroke": "#999999",
|
492
|
+
"stroke-opacity": "1",
|
493
|
+
"fill": "none",
|
494
|
+
"fill-opacity": "1",
|
495
|
+
"label": true,
|
496
|
+
"label-position": "nw",
|
497
|
+
"color": "#a4a4a4"
|
498
|
+
},
|
499
|
+
"nodes": [
|
500
|
+
"930624edc6169c55",
|
501
|
+
"2f2ec1cc0213eab5",
|
502
|
+
"bde205e77cd20558"
|
503
|
+
],
|
504
|
+
"x": 34,
|
505
|
+
"y": 39,
|
506
|
+
"w": 502,
|
507
|
+
"h": 142
|
508
|
+
},
|
509
|
+
{
|
510
|
+
"id": "9081b057a931f0cf",
|
511
|
+
"type": "group",
|
512
|
+
"z": "2766c40d84283368",
|
513
|
+
"style": {
|
514
|
+
"stroke": "#999999",
|
515
|
+
"stroke-opacity": "1",
|
516
|
+
"fill": "none",
|
517
|
+
"fill-opacity": "1",
|
518
|
+
"label": true,
|
519
|
+
"label-position": "nw",
|
520
|
+
"color": "#a4a4a4"
|
521
|
+
},
|
522
|
+
"nodes": [
|
523
|
+
"03ac7bc273197c45",
|
524
|
+
"bb734a85d4b37728",
|
525
|
+
"3d03550f7d93bfd3"
|
526
|
+
],
|
527
|
+
"x": 54,
|
528
|
+
"y": 39,
|
529
|
+
"w": 422,
|
530
|
+
"h": 142
|
531
|
+
},
|
470
532
|
{
|
471
533
|
"id": "42e6796dddd9d4db",
|
472
534
|
"type": "processcube-engine-config",
|
@@ -798,6 +860,8 @@
|
|
798
860
|
"name": "Test_Auth",
|
799
861
|
"engine": "b78932d162d8d468",
|
800
862
|
"topic": "Test_Auth",
|
863
|
+
"workerConfig": "{}",
|
864
|
+
"workerConfigType": "json",
|
801
865
|
"x": 120,
|
802
866
|
"y": 180,
|
803
867
|
"wires": [
|
@@ -861,6 +925,8 @@
|
|
861
925
|
"name": "SampleError_Auth",
|
862
926
|
"engine": "b78932d162d8d468",
|
863
927
|
"topic": "SampleError_Auth",
|
928
|
+
"workerConfig": "{}",
|
929
|
+
"workerConfigType": "json",
|
864
930
|
"x": 150,
|
865
931
|
"y": 360,
|
866
932
|
"wires": [
|
@@ -1387,7 +1453,7 @@
|
|
1387
1453
|
"g": "a71a168415778e2c",
|
1388
1454
|
"name": "",
|
1389
1455
|
"engine": "42e6796dddd9d4db",
|
1390
|
-
"query": "{\"includeXml\":false}",
|
1456
|
+
"query": "{\"includeXml\":false,\"processDefinitionId\":\"External-Task-Sample_Definition\"}",
|
1391
1457
|
"query_type": "json",
|
1392
1458
|
"x": 320,
|
1393
1459
|
"y": 140,
|
@@ -1996,5 +2062,95 @@
|
|
1996
2062
|
"x": 760,
|
1997
2063
|
"y": 60,
|
1998
2064
|
"wires": []
|
2065
|
+
},
|
2066
|
+
{
|
2067
|
+
"id": "930624edc6169c55",
|
2068
|
+
"type": "process-event-listener",
|
2069
|
+
"z": "76c047e0d8770a20",
|
2070
|
+
"g": "865723b71ced9418",
|
2071
|
+
"name": "",
|
2072
|
+
"engine": "42e6796dddd9d4db",
|
2073
|
+
"processmodel": "External-Task-Sample_Process",
|
2074
|
+
"eventtype": "starting",
|
2075
|
+
"query": "{}",
|
2076
|
+
"query_type": "json",
|
2077
|
+
"x": 160,
|
2078
|
+
"y": 140,
|
2079
|
+
"wires": [
|
2080
|
+
[
|
2081
|
+
"2f2ec1cc0213eab5"
|
2082
|
+
]
|
2083
|
+
]
|
2084
|
+
},
|
2085
|
+
{
|
2086
|
+
"id": "2f2ec1cc0213eab5",
|
2087
|
+
"type": "debug",
|
2088
|
+
"z": "76c047e0d8770a20",
|
2089
|
+
"g": "865723b71ced9418",
|
2090
|
+
"name": "debug 34",
|
2091
|
+
"active": true,
|
2092
|
+
"tosidebar": true,
|
2093
|
+
"console": false,
|
2094
|
+
"tostatus": false,
|
2095
|
+
"complete": "false",
|
2096
|
+
"statusVal": "",
|
2097
|
+
"statusType": "auto",
|
2098
|
+
"x": 430,
|
2099
|
+
"y": 140,
|
2100
|
+
"wires": []
|
2101
|
+
},
|
2102
|
+
{
|
2103
|
+
"id": "bde205e77cd20558",
|
2104
|
+
"type": "comment",
|
2105
|
+
"z": "76c047e0d8770a20",
|
2106
|
+
"g": "865723b71ced9418",
|
2107
|
+
"name": "Hört auf die Events der Processe",
|
2108
|
+
"info": "",
|
2109
|
+
"x": 190,
|
2110
|
+
"y": 80,
|
2111
|
+
"wires": []
|
2112
|
+
},
|
2113
|
+
{
|
2114
|
+
"id": "03ac7bc273197c45",
|
2115
|
+
"type": "process-terminate",
|
2116
|
+
"z": "2766c40d84283368",
|
2117
|
+
"g": "9081b057a931f0cf",
|
2118
|
+
"name": "",
|
2119
|
+
"engine": "42e6796dddd9d4db",
|
2120
|
+
"x": 170,
|
2121
|
+
"y": 140,
|
2122
|
+
"wires": [
|
2123
|
+
[
|
2124
|
+
"bb734a85d4b37728"
|
2125
|
+
]
|
2126
|
+
]
|
2127
|
+
},
|
2128
|
+
{
|
2129
|
+
"id": "bb734a85d4b37728",
|
2130
|
+
"type": "debug",
|
2131
|
+
"z": "2766c40d84283368",
|
2132
|
+
"g": "9081b057a931f0cf",
|
2133
|
+
"name": "debug 35",
|
2134
|
+
"active": true,
|
2135
|
+
"tosidebar": true,
|
2136
|
+
"console": false,
|
2137
|
+
"tostatus": false,
|
2138
|
+
"complete": "false",
|
2139
|
+
"statusVal": "",
|
2140
|
+
"statusType": "auto",
|
2141
|
+
"x": 370,
|
2142
|
+
"y": 140,
|
2143
|
+
"wires": []
|
2144
|
+
},
|
2145
|
+
{
|
2146
|
+
"id": "3d03550f7d93bfd3",
|
2147
|
+
"type": "comment",
|
2148
|
+
"z": "2766c40d84283368",
|
2149
|
+
"g": "9081b057a931f0cf",
|
2150
|
+
"name": "Event for Terminating a Process",
|
2151
|
+
"info": "",
|
2152
|
+
"x": 210,
|
2153
|
+
"y": 80,
|
2154
|
+
"wires": []
|
1999
2155
|
}
|
2000
2156
|
]
|
package/package.json
CHANGED
package/process-terminate.html
CHANGED
@@ -29,9 +29,10 @@
|
|
29
29
|
<script type="text/markdown" data-help-name="process-terminate">
|
30
30
|
Terminate an instance of a process model in the ProcessCube.
|
31
31
|
|
32
|
-
##
|
32
|
+
## Configs
|
33
33
|
|
34
|
-
:
|
34
|
+
: name (string): name of the node
|
35
|
+
: engine (string): the engine to connect to
|
35
36
|
|
36
37
|
## Outputs
|
37
38
|
|
@@ -50,13 +50,127 @@ A node to query process instances on the ProcessCube Engine.
|
|
50
50
|
|
51
51
|
## Inputs
|
52
52
|
|
53
|
-
:
|
53
|
+
: msg (Object | JSON) : The selected field of the *msg*, eg *payload*, will be used as the input for the query or can be directly set as JSON.
|
54
|
+
: query (Object) : The query that was used.
|
54
55
|
|
55
56
|
## Outputs
|
56
57
|
|
57
58
|
: processInstances (Array) : The process instances that matched the query.
|
58
59
|
: totalCount (number) : The number of matches.
|
59
60
|
|
61
|
+
### Query fields
|
62
|
+
|
63
|
+
**Summary**:
|
64
|
+
|
65
|
+
**Description**: Gets all ProcessInstances that match the given query.
|
66
|
+
|
67
|
+
#### Parameters:
|
68
|
+
- Name: `offset` Required: `false`
|
69
|
+
- Type: number
|
70
|
+
- Description: The index of the first ProcessInstance to include in the result set.
|
71
|
+
- Name: `limit` Required: `false`
|
72
|
+
- Type: number
|
73
|
+
- Description: The maximum number of ProcessInstances to return.
|
74
|
+
- Name: `correlationId` Required: `false`
|
75
|
+
- Type: Array<string> | string | SearchQuery
|
76
|
+
- string: myCorrelationId
|
77
|
+
- Array<string>: myCorrelationId1,myCorrelationId2
|
78
|
+
- object:
|
79
|
+
- Description: Filter by the CorrelationId of the ProcessInstances.
|
80
|
+
- Name: `processInstanceId` Required: ``
|
81
|
+
- Type: Array<string> | string | SearchQuery
|
82
|
+
- string: myProcessInstance_12345678
|
83
|
+
- Array<string>: myProcessInstance_12345678,myProcessInstance_87654321
|
84
|
+
- object:
|
85
|
+
- Description: Filter by the ID of the ProcessInstances.
|
86
|
+
- Name: `processDefinitionId` Required: ``
|
87
|
+
- Type: Array<string> | string | SearchQuery
|
88
|
+
- string: myProcess_12345678
|
89
|
+
- Array<string>: myProcess_12345678,myProcess_87654321
|
90
|
+
- object:
|
91
|
+
- Description: Filter by the ID of the ProcessDefinition that the ProcessInstances belong to.
|
92
|
+
- Name: `processModelId` Required: ``
|
93
|
+
- Type: Array<string> | string | SearchQuery
|
94
|
+
- string: myProcessModel_12345678
|
95
|
+
- Array<string>: myProcessModel_12345678,myProcessModel_87654321
|
96
|
+
- object:
|
97
|
+
- Description: Filter by the ID of the ProcessModel that the ProcessInstances belong to.
|
98
|
+
- Name: `processModelName` Required: ``
|
99
|
+
- Type: Array<string> | string | SearchQuery
|
100
|
+
- string: My Process Model
|
101
|
+
- Array<string>: My Process Model,My Other Process Model
|
102
|
+
- object:
|
103
|
+
- Description: Filter by the name of the ProcessModel that the ProcessInstances belong to.
|
104
|
+
- Name: `processModelHash` Required: ``
|
105
|
+
- Type: Array<string> | string | SearchQuery
|
106
|
+
- string: 12345678
|
107
|
+
- Array<string>: 12345678,87654321
|
108
|
+
- object:
|
109
|
+
- Description: Filter by the hash of the ProcessModel that the ProcessInstances belong to.
|
110
|
+
- Name: `ownerId` Required: ``
|
111
|
+
- Type: Array<string> | string | SearchQuery
|
112
|
+
- string: 12345678
|
113
|
+
- Array<string>: 12345678,87654321
|
114
|
+
- object:
|
115
|
+
- Description: Filter by the ID of the User that owns the ProcessInstances.
|
116
|
+
- Name: `state` Required: ``
|
117
|
+
- Type: Array<string> | string | SearchQuery
|
118
|
+
- string: running
|
119
|
+
- Array<string>: running,finished
|
120
|
+
- object:
|
121
|
+
- Description: Filter by the state of the ProcessInstances.
|
122
|
+
- Name: `parentProcessInstanceId` Required: ``
|
123
|
+
- Type: Array<string> | string | SearchQuery
|
124
|
+
- string: myParentProcessInstance_12345678
|
125
|
+
- Array<string>: myParentProcessInstance_12345678,myParentProcessInstance_87654321
|
126
|
+
- object:
|
127
|
+
- Description: Filter by the ID of the parent ProcessInstance.
|
128
|
+
- Name: `terminatedByUserId` Required: ``
|
129
|
+
- Type: Array<string> | string | SearchQuery
|
130
|
+
- string: 12345678
|
131
|
+
- Array<string>: 12345678,87654321
|
132
|
+
- object:
|
133
|
+
- Description: Filter by the ID of the User that terminated the ProcessInstances.
|
134
|
+
- Name: `createdBefore` Required: ``
|
135
|
+
- Type: string
|
136
|
+
- Description: The maximum created date of the ProcessInstances to include in the results.
|
137
|
+
- Name: `createdAt` Required: ``
|
138
|
+
- Type: Array<string> | string
|
139
|
+
- string: 2021-01-01T00:00:00.000Z
|
140
|
+
- array: 2021-01-01T00:00:00.000Z,2021-01-02T00:00:00.000Z
|
141
|
+
- Description: The minimum created date of the ProcessInstances to include in the results.
|
142
|
+
- Name: `createdAfter` Required: ``
|
143
|
+
- Type: string
|
144
|
+
- Description: The minimum created date of the ProcessInstances to include in the results.
|
145
|
+
- Name: `updatedBefore` Required: ``
|
146
|
+
- Type: string
|
147
|
+
- Description: The maximum updated date of the ProcessInstances to include in the results.
|
148
|
+
- Name: `updatedAt` Required: ``
|
149
|
+
- Type: Array<string> | string
|
150
|
+
- string: 2021-01-01T00:00:00.000Z
|
151
|
+
- array: 2021-01-01T00:00:00.000Z,2021-01-02T00:00:00.000Z
|
152
|
+
- Description: The exact updated date of the ProcessInstances to include in the results.
|
153
|
+
- Name: `updatedAfter` Required: ``
|
154
|
+
- Type: string
|
155
|
+
- Description: The minimum updated date of the ProcessInstances to include in the results.
|
156
|
+
- Name: `finishedBefore` Required: ``
|
157
|
+
- Type: string
|
158
|
+
- Description: The maximum finished date of the ProcessInstances to include in the results.
|
159
|
+
- Name: `finishedAt` Required: ``
|
160
|
+
- Type: Array<string> | string
|
161
|
+
- string: 2021-01-01T00:00:00.000Z
|
162
|
+
- array: 2021-01-01T00:00:00.000Z,2021-01-02T00:00:00.000Z
|
163
|
+
- Description: The exact finished date of the ProcessInstances to include in the results.
|
164
|
+
- Name: `finishedAfter` Required: ``
|
165
|
+
- Type: string
|
166
|
+
- Description: The minimum finished date of the ProcessInstances to include in the results.
|
167
|
+
- Name: `triggeredByFlowNodeInstance` Required: ``
|
168
|
+
- Type: Array<string> | string | SearchQuery
|
169
|
+
- string: myFlowNodeInstance_12345678
|
170
|
+
- array: myFlowNodeInstance_12345678,myFlowNodeInstance_87654321
|
171
|
+
- object:
|
172
|
+
- Description: Filter by the ID of the FlowNodeInstance that triggered the ProcessInstance.
|
173
|
+
|
60
174
|
### References
|
61
175
|
|
62
176
|
- [The ProcessCube© Developer Network](https://processcube.io) - All documentation for the ProcessCube© platform
|