@5minds/node-red-contrib-processcube 1.1.1 → 1.1.2-develop-560a02-lzs4xzub

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.
@@ -23,7 +23,7 @@ services:
23
23
  environment:
24
24
  application__name: Engine for Node-RED contrib
25
25
  iam__baseUrl: http://authority:11560
26
- iam__allowAnonymousRootAccess: false
26
+ iam__allowAnonymousRootAccess: true
27
27
  command: --seed-dir=/processes --port 8000
28
28
  depends_on:
29
29
  - authority
@@ -38,5 +38,6 @@ services:
38
38
  - 11560:11560
39
39
  volumes:
40
40
  - ./.processcube/authority/config:/etc/authority/config:ro
41
+ - ./.processcube/authority/db:/app/authority/storage/
41
42
  environment:
42
43
  UPE_SEED_PATH: /etc/authority/config/upeSeedingData.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.1.1",
3
+ "version": "1.1.2-develop-560a02-lzs4xzub",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -49,7 +49,8 @@
49
49
  "UserTaskFinishedListener": "usertask-finished-listener.js",
50
50
  "UserTaskInput": "usertask-input.js",
51
51
  "UserTaskOutput": "usertask-output.js"
52
- }
52
+ },
53
+ "examples": "examples"
53
54
  },
54
55
  "dependencies": {
55
56
  "@5minds/processcube_engine_client": "^5.0.1",
package/usertask-input.js CHANGED
@@ -20,42 +20,45 @@ module.exports = function (RED) {
20
20
  ...query
21
21
  };
22
22
 
23
- client.userTasks.query(query, { identity: engine.identity} ).then((matchingFlowNodes) => {
24
- if (
25
- !config.force_send_array &&
26
- matchingFlowNodes &&
27
- matchingFlowNodes.userTasks &&
28
- matchingFlowNodes.userTasks.length == 1
29
- ) {
30
- userTask = matchingFlowNodes.userTasks[0];
31
-
32
- msg.payload = { userTask: userTask };
33
- node.send(msg);
34
- } else {
35
- if (!config.force_send_array) {
36
- if (config.multisend && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length > 1) {
37
- matchingFlowNodes.userTasks.forEach((userTask) => {
38
- msg.payload = { userTask: userTask };
39
- node.send(msg);
40
- });
41
- } else {
42
- if (matchingFlowNodes.userTasks == 1) {
43
- msg.payload = {
44
- userTasks: matchingFlowNodes.userTasks,
45
- };
46
- node.send(msg);
23
+ client.userTasks.query(query, { identity: engine.identity} )
24
+ .then((matchingFlowNodes) => {
25
+ if (
26
+ !config.force_send_array &&
27
+ matchingFlowNodes &&
28
+ matchingFlowNodes.userTasks &&
29
+ matchingFlowNodes.userTasks.length == 1
30
+ ) {
31
+ userTask = matchingFlowNodes.userTasks[0];
32
+
33
+ msg.payload = { userTask: userTask };
34
+ node.send(msg);
35
+ } else {
36
+ if (!config.force_send_array) {
37
+ if (config.multisend && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length > 1) {
38
+ matchingFlowNodes.userTasks.forEach((userTask) => {
39
+ msg.payload = { userTask: userTask };
40
+ node.send(msg);
41
+ });
47
42
  } else {
48
- node.log(`No user tasks found for query: ${JSON.stringify(query)}`);
43
+ if (matchingFlowNodes.userTasks == 1) {
44
+ msg.payload = {
45
+ userTasks: matchingFlowNodes.userTasks,
46
+ };
47
+ node.send(msg);
48
+ } else {
49
+ node.log(`No user tasks found for query: ${JSON.stringify(query)}`);
50
+ }
49
51
  }
52
+ } else {
53
+ msg.payload = {
54
+ userTasks: matchingFlowNodes.userTasks || [],
55
+ };
56
+ node.send(msg);
50
57
  }
51
- } else {
52
- msg.payload = {
53
- userTasks: matchingFlowNodes.userTasks || [],
54
- };
55
- node.send(msg);
56
58
  }
57
- }
58
- });
59
+ }).catch((error) => {
60
+ node.error(error);
61
+ });
59
62
  });
60
63
  }
61
64
  RED.nodes.registerType('usertask-input', UserTaskInput);