@5minds/node-red-contrib-processcube 1.5.2-debug-11941e-m3600onb → 1.5.2-develop-8d36d4-m36yzcrk
Sign up to get free protection for your applications and to get access to all the features.
package/externaltask-input.js
CHANGED
@@ -98,7 +98,7 @@ module.exports = function (RED) {
|
|
98
98
|
task: RED.util.encodeObject(externalTask),
|
99
99
|
payload: payload,
|
100
100
|
flowNodeInstanceId: externalTask.flowNodeInstanceId,
|
101
|
-
processInstanceId: externalTask.processInstanceId
|
101
|
+
processInstanceId: externalTask.processInstanceId
|
102
102
|
};
|
103
103
|
|
104
104
|
node.log(
|
@@ -110,21 +110,12 @@ module.exports = function (RED) {
|
|
110
110
|
};
|
111
111
|
|
112
112
|
client.externalTasks
|
113
|
-
.subscribeToExternalTaskTopic(
|
114
|
-
config.topic,
|
115
|
-
etwCallback,
|
116
|
-
RED.util.evaluateNodeProperty(config.workerConfig, 'json', node)
|
117
|
-
)
|
113
|
+
.subscribeToExternalTaskTopic(config.topic, etwCallback, RED.util.evaluateNodeProperty(config.workerConfig, 'json', node))
|
118
114
|
.then(async (externalTaskWorker) => {
|
119
115
|
node.status({ fill: 'blue', shape: 'ring', text: 'subcribed' });
|
120
116
|
|
121
|
-
node.log('engine_identiy777');
|
122
|
-
|
123
|
-
node.log(engine.identity);
|
124
117
|
externalTaskWorker.identity = engine.identity;
|
125
118
|
engine.registerOnIdentityChanged((identity) => {
|
126
|
-
node.log('changed777');
|
127
|
-
node.log(identity);
|
128
119
|
externalTaskWorker.identity = identity;
|
129
120
|
});
|
130
121
|
|
package/package.json
CHANGED
@@ -6,7 +6,6 @@ const DELAY_FACTOR = 0.85;
|
|
6
6
|
|
7
7
|
module.exports = function (RED) {
|
8
8
|
function ProcessCubeEngineNode(n) {
|
9
|
-
node.log('node-redeploy777');
|
10
9
|
RED.nodes.createNode(this, n);
|
11
10
|
const node = this;
|
12
11
|
const identityChangedCallbacks = [];
|
@@ -16,11 +15,6 @@ module.exports = function (RED) {
|
|
16
15
|
this.credentials.clientId = RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node);
|
17
16
|
this.credentials.clientSecret = RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node);
|
18
17
|
|
19
|
-
node.log('clientId777');
|
20
|
-
node.log(this.credentials.clientId);
|
21
|
-
node.log('clientSecret777');
|
22
|
-
node.log(this.credentials.clientSecret);
|
23
|
-
|
24
18
|
this.registerOnIdentityChanged = function (callback) {
|
25
19
|
identityChangedCallbacks.push(callback);
|
26
20
|
};
|
@@ -50,7 +44,6 @@ module.exports = function (RED) {
|
|
50
44
|
});
|
51
45
|
|
52
46
|
if (this.credentials.clientId && this.credentials.clientSecret) {
|
53
|
-
node.log('credentials_set777');
|
54
47
|
this.engineClient = new engine_client.EngineClient(this.url);
|
55
48
|
|
56
49
|
this.engineClient.applicationInfo
|
@@ -71,7 +64,6 @@ module.exports = function (RED) {
|
|
71
64
|
node.error(reason);
|
72
65
|
});
|
73
66
|
} else {
|
74
|
-
node.log('credentials_NOT_set777');
|
75
67
|
this.engineClient = new engine_client.EngineClient(this.url);
|
76
68
|
}
|
77
69
|
}
|
@@ -133,7 +125,6 @@ async function startRefreshingIdentityCycle(clientId, clientSecret, authorityUrl
|
|
133
125
|
|
134
126
|
const refresh = async () => {
|
135
127
|
try {
|
136
|
-
console.log('refreshing_identity777', clientId, clientSecret);
|
137
128
|
const newTokenSet = await getFreshTokenSet(clientId, clientSecret, authorityUrl);
|
138
129
|
const expiresIn = await getExpiresInForExternalTaskWorkers(newTokenSet);
|
139
130
|
const delay = expiresIn * DELAY_FACTOR * 1000;
|
@@ -29,9 +29,8 @@ module.exports = function (RED) {
|
|
29
29
|
|
30
30
|
try {
|
31
31
|
const result = await client.processInstances.query({
|
32
|
-
processModelId: modelId
|
33
|
-
|
34
|
-
});
|
32
|
+
processModelId: modelId
|
33
|
+
}, { identity: engine.identity });
|
35
34
|
|
36
35
|
let allInstances = result.processInstances.filter((instance) => instance.state != 'suspended');
|
37
36
|
|