@5minds/node-red-contrib-processcube 0.5.7-develop-9cb5f7-lxu2vowj → 0.6.0-develop-3a2e82-lxu52q0o
Sign up to get free protection for your applications and to get access to all the features.
- package/externaltask-error.html +1 -1
- package/externaltask-error.js +2 -0
- package/externaltask-input.js +13 -2
- package/package.json +1 -1
package/externaltask-error.html
CHANGED
package/externaltask-error.js
CHANGED
package/externaltask-input.js
CHANGED
@@ -11,6 +11,16 @@ function showStatus(node, msgCounter) {
|
|
11
11
|
}
|
12
12
|
}
|
13
13
|
|
14
|
+
function decrCounter(msgCounter) {
|
15
|
+
msgCounter--;
|
16
|
+
|
17
|
+
if (msgCounter < 0) {
|
18
|
+
msgCounter = 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
return msgCounter;
|
22
|
+
}
|
23
|
+
|
14
24
|
module.exports = function(RED) {
|
15
25
|
function ExternalTaskInput(config) {
|
16
26
|
RED.nodes.createNode(this,config);
|
@@ -46,13 +56,14 @@ module.exports = function(RED) {
|
|
46
56
|
|
47
57
|
// TODO: once ist 2x gebunden
|
48
58
|
eventEmitter.once(`finish-${externalTask.flowNodeInstanceId}`, (result) => {
|
49
|
-
msgCounter
|
59
|
+
msgCounter = decrCounter(msgCounter);
|
60
|
+
|
50
61
|
showStatus(node, msgCounter);
|
51
62
|
resolve(result);
|
52
63
|
});
|
53
64
|
|
54
65
|
eventEmitter.once(`error-${externalTask.flowNodeInstanceId}`, (msg) => {
|
55
|
-
msgCounter
|
66
|
+
msgCounter = decrCounter(msgCounter);
|
56
67
|
showStatus(node, msgCounter);
|
57
68
|
|
58
69
|
var result = msg.payload ? msg.payload : msg;
|