@5minds/node-red-contrib-processcube 0.3.5-feature-6c9546-lxi4vloc → 0.3.5-feature-3e7fb8-lxi56r4q

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.
@@ -146,7 +146,7 @@
146
146
  {
147
147
  "id": "d042a4c68f51d6ab",
148
148
  "type": "processcube-engine-config",
149
- "url": "http://engine:8000"
149
+ "url": "http://localhost:56000"
150
150
  },
151
151
  {
152
152
  "id": "8e2205abbb41495b",
@@ -1804,7 +1804,7 @@
1804
1804
  "g": "ec36901abb138306",
1805
1805
  "name": "",
1806
1806
  "engine": "d042a4c68f51d6ab",
1807
- "multisend": true,
1807
+ "multisend": false,
1808
1808
  "x": 600,
1809
1809
  "y": 660,
1810
1810
  "wires": [
@@ -146,7 +146,7 @@
146
146
  {
147
147
  "id": "d042a4c68f51d6ab",
148
148
  "type": "processcube-engine-config",
149
- "url": "http://engine:8000"
149
+ "url": "http://localhost:56000"
150
150
  },
151
151
  {
152
152
  "id": "8e2205abbb41495b",
@@ -1809,7 +1809,8 @@
1809
1809
  "y": 660,
1810
1810
  "wires": [
1811
1811
  [
1812
- "da518322186bd83b"
1812
+ "da518322186bd83b",
1813
+ "8e2a2f993ee7156a"
1813
1814
  ]
1814
1815
  ]
1815
1816
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "0.3.5-feature-6c9546-lxi4vloc",
3
+ "version": "0.3.5-feature-3e7fb8-lxi56r4q",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "authors": [
package/usertask-input.js CHANGED
@@ -46,27 +46,24 @@ module.exports = function(RED) {
46
46
  console.log(`UserTaskInput received message: ${JSON.stringify(msg.payload)}`);
47
47
 
48
48
  let query = msg.payload;
49
- query = {"flowNodeInstanceId":"1f7225f4-f3c0-4865-91ad-8c6c71d23c22"};
50
49
 
51
50
  console.log(`UserTaskInput query: ${JSON.stringify(query)}`);
52
51
 
53
- client.userTasks.query({
54
- "flowNodeInstanceId" : "1f7225f4-f3c0-4865-91ad-8c6c71d23c22"
55
- }).then((matchingFlowNodes) => {
52
+ client.userTasks.query(query).then((matchingFlowNodes) => {
56
53
 
57
54
  console.log(`UserTaskInput query result: ${JSON.stringify(matchingFlowNodes)}`);
58
55
 
59
- if (matchingFlowNodes && matchingFlowNodes.flowNodeInstances && matchingFlowNodes.flowNodeInstances.length == 1) {
60
- userTask = matchingFlowNodes.flowNodeInstances[0];
56
+ if (matchingFlowNodes && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length == 1) {
57
+ userTask = matchingFlowNodes.userTasks[0];
61
58
 
62
59
  node.send({ payload: {userTask: userTask } });
63
60
  } else {
64
- if (config.multisend) {
65
- //matchingFlowNodes.forEach((userTask) => {
66
- // node.send({ payload: { userTask: userTask } });
67
- //});
61
+ if (config.multisend && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length > 1) {
62
+ matchingFlowNodes.userTasks.forEach((userTask) => {
63
+ node.send({ payload: { userTask: userTask } });
64
+ });
68
65
  } else {
69
- node.send({ payload: { userTasks: matchingFlowNodes } });
66
+ node.send({ payload: { userTasks: matchingFlowNodes.userTasks } });
70
67
  }
71
68
  }
72
69
  });