@5minds/node-red-contrib-processcube 1.12.3 → 1.12.4

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.
@@ -93,7 +93,7 @@
93
93
  </div>
94
94
  <div class="form-row">
95
95
  <label for="node-input-traces"><i class="fa fa-check-square"></i> Traces</label>
96
- <select id="node-input-traces" multiple size="4" style="width: 100%"></select>
96
+ <select id="node-input-traces" multiple size="5" style="width: 100%"></select>
97
97
  </div>
98
98
  </script>
99
99
 
@@ -388,10 +388,21 @@ module.exports = function (RED) {
388
388
  };
389
389
 
390
390
  node.eventEmitter.once(`handle-${externalTask.flowNodeInstanceId}`, (msg, isError = false) => {
391
+ try {
392
+ msg.etw_finished_at = new Date().toISOString();
393
+
394
+ if (msg.etw_started_at) {
395
+ msg.etw_duration = new Date(msg.etw_finished_at) - new Date(msg.etw_started_at);
396
+ }
397
+ } catch (error) {
398
+ node.error(`failed to calculate duration: ${error?.message}`, msg);
399
+ }
400
+
391
401
  node.log(
392
- `handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}' and *isError* '${isError}'`
402
+ `handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}' and *isError* '${isError}' *duration* '${msg.etw_duration}' mSek`
393
403
  );
394
404
 
405
+
395
406
  if (isError) {
396
407
  handleErrorTask(msg);
397
408
  } else {
@@ -408,6 +419,7 @@ module.exports = function (RED) {
408
419
  flowNodeInstanceId: externalTask.flowNodeInstanceId,
409
420
  processInstanceId: externalTask.processInstanceId,
410
421
  etw_input_node_id: node.id,
422
+ etw_started_at: new Date().toISOString()
411
423
  };
412
424
 
413
425
  node.log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.12.3",
3
+ "version": "1.12.4",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -59,7 +59,7 @@
59
59
  "examples": "examples"
60
60
  },
61
61
  "dependencies": {
62
- "@5minds/processcube_engine_client": "5.3.4",
62
+ "@5minds/processcube_engine_client": "6.0.0-beta.6",
63
63
  "jwt-decode": "^4.0.0",
64
64
  "openid-client": "^5.5.0"
65
65
  },