@5minds/node-red-contrib-processcube 1.2.1-develop-3f34f2-m1xw7p4r → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/externaltask-error.js +9 -2
- package/package.json +1 -1
package/externaltask-error.js
CHANGED
@@ -3,10 +3,17 @@ module.exports = function (RED) {
|
|
3
3
|
RED.nodes.createNode(this, config);
|
4
4
|
var node = this;
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
const flowContext = node.context().flow;
|
7
|
+
let eventEmitter = null;
|
8
8
|
|
9
9
|
node.on('input', function (msg) {
|
10
|
+
eventEmitter = flowContext.get('emitter');
|
11
|
+
|
12
|
+
if (!eventEmitter) {
|
13
|
+
flowContext.set('emitter', new EventEmitter());
|
14
|
+
eventEmitter = flowContext.get('emitter');
|
15
|
+
}
|
16
|
+
|
10
17
|
const flowNodeInstanceId = msg.flowNodeInstanceId;
|
11
18
|
|
12
19
|
let msgError = msg.error;
|