@5minds/node-red-contrib-processcube 1.7.4-feature-6f3f78-m6l0ykww → 1.7.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.
Files changed (43) hide show
  1. package/.processcube/nodered/.config.nodes.json +1 -1
  2. package/.processcube/nodered/.config.users.json +1 -1
  3. package/.processcube/nodered/config.js +3 -2
  4. package/.processcube/nodered/settings.js +1 -1
  5. package/README.md +2 -8
  6. package/doc_generator/generator.js +5 -5
  7. package/doc_generator/generator_with_swagger.js +78 -80
  8. package/endevent-finished-listener.html +16 -16
  9. package/externaltask-error.html +11 -11
  10. package/externaltask-error.js +3 -5
  11. package/externaltask-event-listener.html +9 -9
  12. package/externaltask-input.html +26 -26
  13. package/externaltask-input.js +8 -6
  14. package/externaltask-output.html +7 -7
  15. package/externaltask-output.js +1 -1
  16. package/message-event-trigger.html +8 -8
  17. package/message-event-trigger.js +0 -3
  18. package/package.json +2 -5
  19. package/process-event-listener.html +74 -74
  20. package/process-event-listener.js +2 -1
  21. package/process-start.html +12 -12
  22. package/process-start.js +3 -6
  23. package/process-terminate.html +9 -9
  24. package/process-terminate.js +1 -3
  25. package/processcube-engine-config.html +8 -8
  26. package/processcube-engine-config.js +2 -0
  27. package/processdefinition-deploy.html +9 -9
  28. package/processdefinition-deploy.js +2 -4
  29. package/processdefinition-query.html +140 -139
  30. package/processdefinition-query.js +0 -4
  31. package/processinstance-delete.html +46 -48
  32. package/processinstance-delete.js +9 -24
  33. package/processinstance-query.html +119 -120
  34. package/processinstance-query.js +1 -3
  35. package/signal-event-trigger.html +9 -8
  36. package/signal-event-trigger.js +0 -3
  37. package/usertask-event-listener.html +127 -126
  38. package/usertask-input.html +125 -126
  39. package/usertask-input.js +1 -3
  40. package/usertask-output.html +7 -7
  41. package/usertask-output.js +2 -5
  42. package/wait-for-usertask.html +164 -173
  43. package/wait-for-usertask.js +25 -36
@@ -429,7 +429,7 @@
429
429
  },
430
430
  "@5minds/node-red-contrib-processcube": {
431
431
  "name": "@5minds/node-red-contrib-processcube",
432
- "version": "1.7.4",
432
+ "version": "1.7.3",
433
433
  "local": false,
434
434
  "user": false,
435
435
  "nodes": {
@@ -22,7 +22,7 @@
22
22
  }
23
23
  }
24
24
  },
25
- "menu-menu-item-sidebar": true,
25
+ "menu-menu-item-sidebar": false,
26
26
  "menu-menu-item-palette": true,
27
27
  "do": {
28
28
  "markNodes": true
@@ -1,3 +1,4 @@
1
+
1
2
  // let cause of merge custom settings
2
3
 
3
4
  let config = {};
@@ -5,7 +6,7 @@ let config = {};
5
6
  try {
6
7
  config = require('./settings.js');
7
8
  } catch (e) {
8
- console.log('>>>', e);
9
+ console.log(">>>", e);
9
10
  }
10
11
 
11
12
  process.on('uncaughtException', (err) => {
@@ -14,6 +15,6 @@ process.on('uncaughtException', (err) => {
14
15
 
15
16
  process.on('unhandledRejection', (reason, promise) => {
16
17
  console.error(`Unhandled Rejection at ${promise} reason: ${reason}`, {});
17
- });
18
+ });
18
19
 
19
20
  module.exports = config;
@@ -383,7 +383,7 @@ module.exports = {
383
383
 
384
384
  header: {
385
385
  title: ' powers by Node-RED',
386
- image: '/data/static/ProcessCube_Logo.svg',
386
+ image: "/data/static/ProcessCube_Logo.svg",
387
387
  url: 'https://processcube.io', // optional url to make the header text/image a link to this url
388
388
  },
389
389
  palette: {
package/README.md CHANGED
@@ -25,19 +25,13 @@ To install and run the Node-RED flows, follow these steps:
25
25
  cd processcube_nodered
26
26
  ```
27
27
 
28
- 3. Install the dependencies of the package `@5minds/node-red-contrib-processcube`:
29
-
30
- ```bash
31
- npm install
32
- ```
33
-
34
- 4. Build the Docker containers:
28
+ 3. Build the Docker containers:
35
29
 
36
30
  ```bash
37
31
  docker-compose build
38
32
  ```
39
33
 
40
- 5. Start the Docker containers:
34
+ 4. Start the Docker containers:
41
35
 
42
36
  ```bash
43
37
  docker-compose up -d
@@ -1,14 +1,14 @@
1
1
  const Mustache = require('mustache');
2
2
  const fs = require('fs');
3
3
 
4
- const swaggerFilename = '../../ProcessCube.Engine/docs/swagger/swagger.json'; // Dateiname der Swagger-Datei
4
+ const swaggerFilename = '../../ProcessCube.Engine/docs/swagger/swagger.json'; // Dateiname der Swagger-Datei
5
5
 
6
6
  const swaggerJson = JSON.parse(fs.readFileSync(swaggerFilename, 'utf-8'));
7
7
 
8
8
  //console.log(Object.keys(swaggerJson.paths));
9
9
  //return
10
10
 
11
- const apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
11
+ const apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
12
12
  const routeData = swaggerJson.paths[apiPath];
13
13
 
14
14
  if (routeData) {
@@ -20,14 +20,14 @@ if (routeData) {
20
20
  // API-Route-Information vorbereiten
21
21
  const apiRouteData = {
22
22
  path: apiPath,
23
- method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
23
+ method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
24
24
  summary: routeData[Object.keys(routeData)[0]].summary,
25
25
  description: routeData[Object.keys(routeData)[0]].description,
26
26
  parameters: routeData[Object.keys(routeData)[0]].parameters || [],
27
27
  responses: Object.entries(routeData[Object.keys(routeData)[0]].responses).map(([status, response]) => ({
28
28
  status,
29
- description: response.description,
30
- })),
29
+ description: response.description
30
+ }))
31
31
  };
32
32
 
33
33
  // Mustache-Template einlesen
@@ -6,86 +6,84 @@ const SwaggerParser = require('swagger-parser');
6
6
  //const swaggerFilename = '../../ProcessCube.Engine/docs/swagger/swagger.json'; // Dateiname der Swagger-Datei
7
7
  //const swaggerFilename = 'swagger.json'; // Dateiname der Swagger-Datei
8
8
 
9
- SwaggerParser.dereference('http://localhost:56100/atlas_engine/api/v1/swagger')
10
- //SwaggerParser.dereference(swaggerFilename)
11
- .then((swaggerJson) => {
12
- console.log('Dereferenced API:', swaggerJson);
13
9
 
14
- const apiPaths = [
15
- {
16
- 'ProcessInstance Query': {
17
- path: '/process_instances/query',
18
- method: 'get',
19
- },
20
- 'UserTasks Input': {
21
- path: '/process_instances/query',
22
- method: 'get',
23
- },
24
- 'Wait for UserTask': {
25
- path: '/process_instances/query',
26
- method: 'get',
27
- },
28
- 'UserTask Event Listener': {
29
- path: '/process_instances/query',
30
- method: 'get',
31
- },
32
- },
33
- ];
34
-
35
- apiPaths.forEach((apiEntry) => {
36
- console.log('API Entry:', apiEntry);
37
- console.log('API Entry Keys:', Object.keys(apiEntry));
38
-
39
- Object.keys(apiEntry).forEach((apiName) => {
40
- console.log('API Name:', apiName);
41
- console.log('API Data:', apiEntry[apiName]);
42
-
43
- let apiPath = apiEntry[apiName].path; // Die API-Route, die du dokumentieren möchtest
44
-
45
- //let apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
46
- const routeData = swaggerJson.paths[apiPath];
47
-
48
- if (routeData) {
49
- console.log(`Details for ${apiPath}:`, routeData);
50
- } else {
51
- console.error(`Route ${apiPath} not found in Swagger documentation.`);
52
- }
53
-
54
- let description = routeData[Object.keys(routeData)[0]].description;
55
-
56
- description = `Filter result for '${apiName}'`;
57
-
58
- // API-Route-Information vorbereiten
59
- const apiRouteData = {
60
- path: apiPath,
61
- method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
62
- summary: routeData[Object.keys(routeData)[0]].summary,
63
- description: description,
64
- parameters: routeData[Object.keys(routeData)[0]].parameters || [],
65
- responses: Object.entries(routeData[Object.keys(routeData)[0]].responses).map(
66
- ([status, response]) => ({
67
- status,
68
- description: response.description,
69
- }),
70
- ),
71
- };
72
-
73
- // Mustache-Template einlesen
74
- const template = fs.readFileSync('query_template.mustache', 'utf-8');
75
-
76
- // Mustache-Rendering
77
- const output = Mustache.render(template, apiRouteData);
78
-
79
- // Ausgabe in eine Datei schreiben oder anzeigen
80
- //console.log(output);
81
-
82
- const outputFilename = apiName.replace(/\/ /g, '_') + '.md';
83
- console.log(`Writing output to ${outputFilename}`);
84
-
85
- fs.writeFileSync(`outputs/${outputFilename}`, output);
86
- });
10
+ SwaggerParser.dereference("http://localhost:56100/atlas_engine/api/v1/swagger")
11
+ //SwaggerParser.dereference(swaggerFilename)
12
+ .then(swaggerJson => {
13
+ console.log('Dereferenced API:', swaggerJson);
14
+
15
+ const apiPaths = [{
16
+ "ProcessInstance Query": {
17
+ "path": "/process_instances/query",
18
+ "method": "get"
19
+ },
20
+ "UserTasks Input": {
21
+ "path": "/process_instances/query",
22
+ "method": "get"
23
+ },
24
+ "Wait for UserTask": {
25
+ "path": "/process_instances/query",
26
+ "method": "get"
27
+ },
28
+ "UserTask Event Listener": {
29
+ "path": "/process_instances/query",
30
+ "method": "get"
31
+ }
32
+ }];
33
+
34
+ apiPaths.forEach(apiEntry => {
35
+ console.log('API Entry:', apiEntry);
36
+ console.log('API Entry Keys:', Object.keys(apiEntry));
37
+
38
+ Object.keys(apiEntry).forEach(apiName => {
39
+ console.log('API Name:', apiName);
40
+ console.log('API Data:', apiEntry[apiName]);
41
+
42
+ let apiPath = apiEntry[apiName].path; // Die API-Route, die du dokumentieren möchtest
43
+
44
+ //let apiPath = '/process_instances/query'; // Die API-Route, die du dokumentieren möchtest
45
+ const routeData = swaggerJson.paths[apiPath];
46
+
47
+ if (routeData) {
48
+ console.log(`Details for ${apiPath}:`, routeData);
49
+ } else {
50
+ console.error(`Route ${apiPath} not found in Swagger documentation.`);
51
+ }
52
+
53
+ let description = routeData[Object.keys(routeData)[0]].description;
54
+
55
+ description = `Filter result for '${apiName}'`;
56
+
57
+ // API-Route-Information vorbereiten
58
+ const apiRouteData = {
59
+ path: apiPath,
60
+ method: Object.keys(routeData)[0], // z.B. GET, POST, etc.
61
+ summary: routeData[Object.keys(routeData)[0]].summary,
62
+ description: description,
63
+ parameters: routeData[Object.keys(routeData)[0]].parameters || [],
64
+ responses: Object.entries(routeData[Object.keys(routeData)[0]].responses).map(([status, response]) => ({
65
+ status,
66
+ description: response.description
67
+ }))
68
+ };
69
+
70
+ // Mustache-Template einlesen
71
+ const template = fs.readFileSync('query_template.mustache', 'utf-8');
72
+
73
+ // Mustache-Rendering
74
+ const output = Mustache.render(template, apiRouteData);
75
+
76
+ // Ausgabe in eine Datei schreiben oder anzeigen
77
+ //console.log(output);
78
+
79
+ const outputFilename = apiName.replace(/\/ /g, '_') + '.md';
80
+ console.log(`Writing output to ${outputFilename}`);
81
+
82
+ fs.writeFileSync(`outputs/${outputFilename}`, output);
87
83
  });
88
- })
89
- .catch((err) => {
90
- console.error('Dereferencing failed:', err);
91
84
  });
85
+
86
+ })
87
+ .catch(err => {
88
+ console.error('Dereferencing failed:', err);
89
+ });
@@ -27,24 +27,24 @@
27
27
  </script>
28
28
 
29
29
  <script type="text/markdown" data-help-name="endevent-finished-listener">
30
- Waiting for end events that are finished.
30
+ Waiting for end events that are finished.
31
31
 
32
- ## Outputs
32
+ ## Outputs
33
33
 
34
- : correlationId (string): The unique identifier for the correlation.
35
- : processDefinitionId (string): The identifier for the process definition.
36
- : processModelId (string): The identifier for the process model.
37
- : processModelName (string): The name of the process model.
38
- : processInstanceId (string): The unique identifier for the process instance.
39
- : flowNodeId (string): The identifier for the flow node.
40
- : flowNodeName (string): The name of the flow node.
41
- : flowNodeInstanceId (string): The unique identifier for the flow node instance.
42
- : previousFlowNodeInstanceId (string): The unique identifier for the previous flow node instance.
43
- : ownerId (string): The identifier of the owner.
44
- : currentToken (Object): An object representing the current token.
34
+ : correlationId (string): The unique identifier for the correlation.
35
+ : processDefinitionId (string): The identifier for the process definition.
36
+ : processModelId (string): The identifier for the process model.
37
+ : processModelName (string): The name of the process model.
38
+ : processInstanceId (string): The unique identifier for the process instance.
39
+ : flowNodeId (string): The identifier for the flow node.
40
+ : flowNodeName (string): The name of the flow node.
41
+ : flowNodeInstanceId (string): The unique identifier for the flow node instance.
42
+ : previousFlowNodeInstanceId (string): The unique identifier for the previous flow node instance.
43
+ : ownerId (string): The identifier of the owner.
44
+ : currentToken (Object): An object representing the current token.
45
45
 
46
- ### References
46
+ ### References
47
47
 
48
- - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
49
- - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
48
+ - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
49
+ - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
50
50
  </script>
@@ -28,19 +28,19 @@
28
28
  </script>
29
29
 
30
30
  <script type="text/markdown" data-help-name="externaltask-error">
31
- Used for reporting errors in the processing of external tasks. The error
32
- code `Error` in the configuration is forwarded to the ProcessCube engine for
33
- handling within _Error-Boundary-Events_.
31
+ Used for reporting errors in the processing of external tasks. The error
32
+ code `Error` in the configuration is forwarded to the ProcessCube engine for
33
+ handling within _Error-Boundary-Events_.
34
34
 
35
- ## Inputs
35
+ ## Inputs
36
36
 
37
- : msg (Object) : Passed as `ErrorDetails` to the engine
38
- : Error (string) : From the configuration
39
- : Message (string) : The caught exception message
40
- : StackTrace (string) : The stack trace of the exception
37
+ : msg (Object) : Passed as `ErrorDetails` to the engine
38
+ : Error (string) : From the configuration
39
+ : Message (string) : The caught exception message
40
+ : StackTrace (string) : The stack trace of the exception
41
41
 
42
- ### References
42
+ ### References
43
43
 
44
- - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
45
- - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
44
+ - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
45
+ - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
46
46
  </script>
@@ -12,8 +12,8 @@ module.exports = function (RED) {
12
12
  if (!eventEmitter) {
13
13
  flowContext.set('emitter', new EventEmitter());
14
14
  eventEmitter = flowContext.get('emitter');
15
- }
16
-
15
+ }
16
+
17
17
  const flowNodeInstanceId = msg.flowNodeInstanceId;
18
18
 
19
19
  let msgError = msg.error;
@@ -29,9 +29,7 @@ module.exports = function (RED) {
29
29
  msg.errorCode = config.error;
30
30
  msg.errorMessage = msgError.message;
31
31
 
32
- node.log(
33
- `handle-${flowNodeInstanceId}: *flowNodeInstanceId* '${flowNodeInstanceId}' with *msg._msgid* '${msg._msgid}'`,
34
- );
32
+ node.log(`handle-${flowNodeInstanceId}: *flowNodeInstanceId* '${flowNodeInstanceId}' with *msg._msgid* '${msg._msgid}'`);
35
33
 
36
34
  eventEmitter.emit(`handle-${flowNodeInstanceId}`, error, true);
37
35
 
@@ -41,17 +41,17 @@
41
41
  </script>
42
42
 
43
43
  <script type="text/markdown" data-help-name="externaltask-event-listener">
44
- A node which listens for events triggered by externaltasks
44
+ A node which listens for events triggered by externaltasks
45
45
 
46
- ## Outputs
46
+ ## Outputs
47
47
 
48
- : flowNodeInstanceId (string): The unique identifier for the flow node instance.
49
- : externalTaskEvent (Object): An Object containing the event data returned by the engine.
50
- : action (string): The event that occured.
51
- : type (string): The target of the event.
48
+ : flowNodeInstanceId (string): The unique identifier for the flow node instance.
49
+ : externalTaskEvent (Object): An Object containing the event data returned by the engine.
50
+ : action (string): The event that occured.
51
+ : type (string): The target of the event.
52
52
 
53
- ### References
53
+ ### References
54
54
 
55
- - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
56
- - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
55
+ - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
56
+ - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
57
57
  </script>
@@ -7,8 +7,8 @@
7
7
  engine: { value: '', type: 'processcube-engine-config' },
8
8
  topic: { value: '' },
9
9
  topicType: { value: '' },
10
- workerConfig: { value: '{}' },
11
- workerConfigType: { value: 'json' },
10
+ workerConfig: { value: '{}'},
11
+ workerConfigType: { value: 'json'}
12
12
  },
13
13
  inputs: 0,
14
14
  outputs: 1,
@@ -36,7 +36,7 @@
36
36
  oneditsave: function () {
37
37
  this.workerConfig = $('#node-input-workerConfig').typedInput('value');
38
38
  if (this.workerConfig == '') {
39
- this.workerConfig = '{}';
39
+ this.workerConfig = '{}'
40
40
  $('#node-input-workerConfig').typedInput('value', '{}');
41
41
  }
42
42
  this.workerConfigType = $('#node-input-workerConfig').typedInput('type');
@@ -66,37 +66,37 @@
66
66
  </script>
67
67
 
68
68
  <script type="text/markdown" data-help-name="externaltask-input">
69
- Waiting for external tasks that correspond to the `Topic` configured in
70
- the connected ProcessCube Engine for processing.
69
+ Waiting for external tasks that correspond to the `Topic` configured in
70
+ the connected ProcessCube Engine for processing.
71
71
 
72
- ## Configs
72
+ ## Configs
73
73
 
74
- : name (string) : The name of the node
75
- : engine (string) : The ProcessCube Engine to connect to
76
- : topic (string) : The topic of the external task
77
- : workerConfig (object) : The configuration for the worker
74
+ : name (string) : The name of the node
75
+ : engine (string) : The ProcessCube Engine to connect to
76
+ : topic (string) : The topic of the external task
77
+ : workerConfig (object) : The configuration for the worker
78
78
 
79
- ### workerConfig
79
+ ### workerConfig
80
80
 
81
- - workerId (string): The id of the worker
82
- - lockDuration (number): The duration in milliseconds the external task is locked for execution
83
- - maxTasks (number): The maximum number of tasks that can be fetched at once
84
- - longpollingTimeout (number): The duration in milliseconds the external task is locked for execution
85
- - payloadFilter (Req-Expression): The filter for the payload of the external task
81
+ - workerId (string): The id of the worker
82
+ - lockDuration (number): The duration in milliseconds the external task is locked for execution
83
+ - maxTasks (number): The maximum number of tasks that can be fetched at once
84
+ - longpollingTimeout (number): The duration in milliseconds the external task is locked for execution
85
+ - payloadFilter (Req-Expression): The filter for the payload of the external task
86
86
 
87
- ## Outputs
87
+ ## Outputs
88
88
 
89
- : payload (string) : The payload the external task was started with.
90
- : task (object) : The external task object
91
- : flowNodeInstanceId (string) : The unique identifier of the external task, which is needed to complete the task
89
+ : payload (string) : The payload the external task was started with.
90
+ : task (object) : The external task object
91
+ : flowNodeInstanceId (string) : The unique identifier of the external task, which is needed to complete the task
92
92
 
93
- ### Details
93
+ ### Details
94
94
 
95
- - To finish the external task the `externaltask-output` node is required.
96
- - For handling a error while executing a flow as external task the `externaltask-error` node is required.
95
+ - To finish the external task the `externaltask-output` node is required.
96
+ - For handling a error while executing a flow as external task the `externaltask-error` node is required.
97
97
 
98
- ### References
98
+ ### References
99
99
 
100
- - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
101
- - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
100
+ - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
101
+ - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
102
102
  </script>
@@ -10,6 +10,7 @@ function showStatus(node, msgCounter) {
10
10
  }
11
11
  }
12
12
 
13
+
13
14
  module.exports = function (RED) {
14
15
  function ExternalTaskInput(config) {
15
16
  RED.nodes.createNode(this, config);
@@ -18,6 +19,7 @@ module.exports = function (RED) {
18
19
 
19
20
  node.started_external_tasks = {};
20
21
 
22
+
21
23
  node.engine = RED.nodes.getNode(config.engine);
22
24
 
23
25
  var eventEmitter = flowContext.get('emitter');
@@ -60,7 +62,7 @@ module.exports = function (RED) {
60
62
  delete result.msg;
61
63
 
62
64
  node.log(
63
- `handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* ${externalTask.processInstanceId} with result ${JSON.stringify(result)} on msg._msgid ${msg._msgid}.`,
65
+ `handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* ${externalTask.processInstanceId} with result ${JSON.stringify(result)} on msg._msgid ${msg._msgid}.`
64
66
  );
65
67
 
66
68
  if (externalTask.flowNodeInstanceId) {
@@ -75,7 +77,7 @@ module.exports = function (RED) {
75
77
 
76
78
  const handleErrorTask = (msg) => {
77
79
  node.log(
78
- `handle error event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' on *msg._msgid* '${msg._msgid}'.`,
80
+ `handle error event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' on *msg._msgid* '${msg._msgid}'.`
79
81
  );
80
82
 
81
83
  if (externalTask.flowNodeInstanceId) {
@@ -93,7 +95,7 @@ module.exports = function (RED) {
93
95
 
94
96
  eventEmitter.once(`handle-${externalTask.flowNodeInstanceId}`, (msg, isError = false) => {
95
97
  node.log(
96
- `handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}' and *isError* '${isError}'`,
98
+ `handle event for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}' and *isError* '${isError}'`
97
99
  );
98
100
 
99
101
  if (isError) {
@@ -116,7 +118,7 @@ module.exports = function (RED) {
116
118
  };
117
119
 
118
120
  node.log(
119
- `Received *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}'`,
121
+ `Received *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}' with *msg._msgid* '${msg._msgid}'`
120
122
  );
121
123
 
122
124
  node.send(msg);
@@ -124,7 +126,7 @@ module.exports = function (RED) {
124
126
  };
125
127
 
126
128
  let options = RED.util.evaluateNodeProperty(config.workerConfig, config.workerConfigType, node);
127
- let topic = RED.util.evaluateNodeProperty(config.topic, config.topicType, node);
129
+ let topic = RED.util.evaluateNodeProperty(config.topic, config.topicType, node)
128
130
 
129
131
  client.externalTasks
130
132
  .subscribeToExternalTaskTopic(topic, etwCallback, options)
@@ -144,7 +146,7 @@ module.exports = function (RED) {
144
146
  case 'processExternalTask':
145
147
  node.error(
146
148
  `Worker error ${errorType} for *external task flowNodeInstanceId* '${externalTask.flowNodeInstanceId}' and *processInstanceId* '${externalTask.processInstanceId}': ${error.message}`,
147
- {},
149
+ {}
148
150
  );
149
151
 
150
152
  if (externalTask) {
@@ -22,15 +22,15 @@
22
22
  </script>
23
23
 
24
24
  <script type="text/markdown" data-help-name="externaltask-output">
25
- Used to complete the external task. The `msg.payload` is returned to the ProcessCube
26
- engine as the result of the external task.
25
+ Used to complete the external task. The `msg.payload` is returned to the ProcessCube
26
+ engine as the result of the external task.
27
27
 
28
- ## Inputs
28
+ ## Inputs
29
29
 
30
- : payload (Object) : Returned to the ProcessCube engine as the result of the external task
30
+ : payload (Object) : Returned to the ProcessCube engine as the result of the external task
31
31
 
32
- ### References
32
+ ### References
33
33
 
34
- - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
35
- - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
34
+ - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
35
+ - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
36
36
  </script>
@@ -12,7 +12,7 @@ module.exports = function (RED) {
12
12
  if (!eventEmitter) {
13
13
  flowContext.set('emitter', new EventEmitter());
14
14
  eventEmitter = flowContext.get('emitter');
15
- }
15
+ }
16
16
 
17
17
  const flowNodeInstanceId = msg.flowNodeInstanceId;
18
18
  const processInstanceId = msg.processInstanceId;
@@ -32,17 +32,17 @@
32
32
  </script>
33
33
 
34
34
  <script type="text/markdown" data-help-name="externaltask-input">
35
- A node to trigger an event that will be send to the corresponding intermediate message event in the connected ProcessCube Engine.
35
+ A node to trigger an event that will be send to the corresponding intermediate message event in the connected ProcessCube Engine.
36
36
 
37
- From the config the `messagename` and the `processInstanceId` must be set.
37
+ From the config the `messagename` and the `processInstanceId` must be set.
38
38
 
39
- ## Inputs
39
+ ## Inputs
40
40
 
41
- : payload (Object) : The payload will be sent to the message event and be used as a new token payload.
42
- : processInstanceId (string) : The process instance where the message event should be triggered.
41
+ : payload (Object) : The payload will be sent to the message event and be used as a new token payload.
42
+ : processInstanceId (string) : The process instance where the message event should be triggered.
43
43
 
44
- ### References
44
+ ### References
45
45
 
46
- - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
47
- - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
46
+ - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
47
+ - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
48
48
  </script>
@@ -6,8 +6,6 @@ module.exports = function (RED) {
6
6
  node.on('input', function (msg) {
7
7
  node.engine = RED.nodes.getNode(config.engine);
8
8
  const client = node.engine.engineClient;
9
- const isUser = !!msg._client?.user;
10
- const userIdentity = isUser ? { userId: msg._client.user.id, token: msg._client.user.accessToken } : null;
11
9
 
12
10
  if (!client) {
13
11
  node.error('No engine configured.', msg);
@@ -18,7 +16,6 @@ module.exports = function (RED) {
18
16
  .triggerMessageEvent(config.messagename, {
19
17
  processInstanceId: msg.processinstanceid,
20
18
  payload: msg.payload,
21
- identity: userIdentity,
22
19
  })
23
20
  .then((result) => {
24
21
  msg.payload = result;