@5minds/node-red-contrib-processcube 0.5.0 → 0.5.2-develop-0a86d2-lxpxvugu
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.
@@ -324,7 +324,7 @@
|
|
324
324
|
"icon": "home",
|
325
325
|
"layout": "grid",
|
326
326
|
"theme": "7175f012d8e51857",
|
327
|
-
"order":
|
327
|
+
"order": 3,
|
328
328
|
"className": "",
|
329
329
|
"visible": true,
|
330
330
|
"disabled": "false"
|
@@ -361,7 +361,7 @@
|
|
361
361
|
"icon": "home",
|
362
362
|
"layout": "grid",
|
363
363
|
"theme": "7175f012d8e51857",
|
364
|
-
"order":
|
364
|
+
"order": 1,
|
365
365
|
"className": "",
|
366
366
|
"visible": "true",
|
367
367
|
"disabled": "false"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@5minds/node-red-contrib-processcube",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.2-develop-0a86d2-lxpxvugu",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Node-RED nodes for ProcessCube",
|
6
6
|
"authors": [
|
@@ -19,10 +19,10 @@
|
|
19
19
|
],
|
20
20
|
"repository": {
|
21
21
|
"type": "git",
|
22
|
-
"url": "https://github.com/5minds/
|
22
|
+
"url": "https://github.com/5minds/node-red-contrib-processcube"
|
23
23
|
},
|
24
24
|
"bugs": {
|
25
|
-
"url": "https://github.com/5minds/
|
25
|
+
"url": "https://github.com/5minds/node-red-contrib-processcube/issues",
|
26
26
|
"email": "processcube@5minds.de"
|
27
27
|
},
|
28
28
|
"engines": {
|
package/usertask-input.html
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
defaults: {
|
6
6
|
name: {value: ""},
|
7
7
|
engine: {value: "", type: "processcube-engine-config"},
|
8
|
+
force_send_array: {value: false},
|
8
9
|
multisend: {value: false}
|
9
10
|
},
|
10
11
|
inputs: 1,
|
@@ -25,6 +26,13 @@
|
|
25
26
|
<label for="node-input-engine"><i class="fa fa-tag"></i> Engine-URL</label>
|
26
27
|
<input type="text" id="node-input-engine" placeholder="http://engine:8000">
|
27
28
|
</div>
|
29
|
+
<div class="form-row" style="display:flex; margin-bottom: 3px;">
|
30
|
+
<label for="node-input-force_send_array" style="vertical-align:top"><i class="fa fa-list-alt"></i> Force send payload as array</label>
|
31
|
+
<div>
|
32
|
+
<input type="checkbox" checked id="node-input-force_send_array" style="display: inline-block; width: auto; margin: 0px 0px 0px 4px;">
|
33
|
+
<label style="width:auto" for="node-input-force_send_array">Alway send an array? Only works if <i>Send multi</i> is false.</label>
|
34
|
+
</div>
|
35
|
+
</div>
|
28
36
|
<div class="form-row" style="display:flex; margin-bottom: 3px;">
|
29
37
|
<label for="node-input-multisend" style="vertical-align:top"><i class="fa fa-list-alt"></i> Send multi</label>
|
30
38
|
<div>
|
package/usertask-input.js
CHANGED
@@ -51,17 +51,21 @@ module.exports = function(RED) {
|
|
51
51
|
|
52
52
|
console.log(`UserTaskInput query result: ${JSON.stringify(matchingFlowNodes)}`);
|
53
53
|
|
54
|
-
if (matchingFlowNodes && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
|
54
|
+
if (config.force_send_array == false && matchingFlowNodes && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
|
55
55
|
userTask = matchingFlowNodes.userTasks[0];
|
56
56
|
|
57
57
|
node.send({ payload: {userTask: userTask } });
|
58
58
|
} else {
|
59
|
-
if (config.
|
60
|
-
matchingFlowNodes.userTasks.
|
61
|
-
|
62
|
-
|
59
|
+
if (config.config.force_send_array == false) {
|
60
|
+
if (config.multisend && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length > 1) {
|
61
|
+
matchingFlowNodes.userTasks.forEach((userTask) => {
|
62
|
+
node.send({ payload: { userTask: userTask } });
|
63
|
+
});
|
64
|
+
} else {
|
65
|
+
node.send({ payload: { userTasks: matchingFlowNodes.userTasks } });
|
66
|
+
}
|
63
67
|
} else {
|
64
|
-
node.send({ payload: { userTasks: matchingFlowNodes.userTasks } });
|
68
|
+
node.send({ payload: { userTasks: matchingFlowNodes.userTasks || []} });
|
65
69
|
}
|
66
70
|
}
|
67
71
|
});
|