@5minds/node-red-contrib-processcube 0.15.0-feature-2d3c96-lz0zm47e → 0.15.0-fix-error-in-process-instance-query-f9f0d2-lz03zzg4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,77 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="NodeRedExternalTask_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
3
+ <bpmn:collaboration id="Collaboration_1cidyxu" name="">
4
+ <bpmn:participant id="Participant_0px403d" name="NodeRedExternalTask" processRef="NodeRedExternalTask_Process" />
5
+ </bpmn:collaboration>
6
+ <bpmn:process id="NodeRedExternalTask_Process" name="NodeRedExternalTask" isExecutable="true">
7
+ <bpmn:laneSet>
8
+ <bpmn:lane id="Lane_1xzf0d3">
9
+ <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
10
+ <bpmn:flowNodeRef>Activity_1h843f0</bpmn:flowNodeRef>
11
+ <bpmn:flowNodeRef>Activity_1duxvq1</bpmn:flowNodeRef>
12
+ <bpmn:flowNodeRef>Event_0z1wtnd</bpmn:flowNodeRef>
13
+ </bpmn:lane>
14
+ </bpmn:laneSet>
15
+ <bpmn:startEvent id="StartEvent_1" name="Start">
16
+ <bpmn:outgoing>Flow_1xfzejj</bpmn:outgoing>
17
+ </bpmn:startEvent>
18
+ <bpmn:sequenceFlow id="Flow_1xfzejj" sourceRef="StartEvent_1" targetRef="Activity_1h843f0" />
19
+ <bpmn:serviceTask id="Activity_1h843f0" name="Node Red Flow" camunda:type="external" camunda:topic="Test">
20
+ <bpmn:extensionElements>
21
+ <camunda:properties>
22
+ <camunda:property name="payload" value="{&#10; test: 1&#10;}" />
23
+ </camunda:properties>
24
+ </bpmn:extensionElements>
25
+ <bpmn:incoming>Flow_1xfzejj</bpmn:incoming>
26
+ <bpmn:outgoing>Flow_110cohh</bpmn:outgoing>
27
+ </bpmn:serviceTask>
28
+ <bpmn:sequenceFlow id="Flow_110cohh" sourceRef="Activity_1h843f0" targetRef="Activity_1duxvq1" />
29
+ <bpmn:serviceTask id="Activity_1duxvq1" name="SampleError" camunda:type="external" camunda:topic="SampleError">
30
+ <bpmn:incoming>Flow_110cohh</bpmn:incoming>
31
+ <bpmn:outgoing>Flow_1u1afua</bpmn:outgoing>
32
+ </bpmn:serviceTask>
33
+ <bpmn:sequenceFlow id="Flow_1u1afua" sourceRef="Activity_1duxvq1" targetRef="Event_0z1wtnd" />
34
+ <bpmn:endEvent id="Event_0z1wtnd">
35
+ <bpmn:incoming>Flow_1u1afua</bpmn:incoming>
36
+ </bpmn:endEvent>
37
+ </bpmn:process>
38
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
39
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
40
+ <bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
41
+ <dc:Bounds x="5" y="4" width="695" height="346" />
42
+ </bpmndi:BPMNShape>
43
+ <bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
44
+ <dc:Bounds x="35" y="4" width="665" height="346" />
45
+ </bpmndi:BPMNShape>
46
+ <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
47
+ <dc:Bounds x="92" y="152" width="36" height="36" />
48
+ <bpmndi:BPMNLabel>
49
+ <dc:Bounds x="98" y="195" width="24" height="14" />
50
+ </bpmndi:BPMNLabel>
51
+ </bpmndi:BPMNShape>
52
+ <bpmndi:BPMNShape id="Activity_0sg2du2_di" bpmnElement="Activity_1h843f0">
53
+ <dc:Bounds x="180" y="130" width="100" height="80" />
54
+ <bpmndi:BPMNLabel />
55
+ </bpmndi:BPMNShape>
56
+ <bpmndi:BPMNShape id="Activity_1ohliek_di" bpmnElement="Activity_1duxvq1">
57
+ <dc:Bounds x="370" y="130" width="100" height="80" />
58
+ <bpmndi:BPMNLabel />
59
+ </bpmndi:BPMNShape>
60
+ <bpmndi:BPMNShape id="Event_0z1wtnd_di" bpmnElement="Event_0z1wtnd">
61
+ <dc:Bounds x="562" y="152" width="36" height="36" />
62
+ </bpmndi:BPMNShape>
63
+ <bpmndi:BPMNEdge id="Flow_1xfzejj_di" bpmnElement="Flow_1xfzejj">
64
+ <di:waypoint x="128" y="170" />
65
+ <di:waypoint x="180" y="170" />
66
+ </bpmndi:BPMNEdge>
67
+ <bpmndi:BPMNEdge id="Flow_110cohh_di" bpmnElement="Flow_110cohh">
68
+ <di:waypoint x="280" y="170" />
69
+ <di:waypoint x="370" y="170" />
70
+ </bpmndi:BPMNEdge>
71
+ <bpmndi:BPMNEdge id="Flow_1u1afua_di" bpmnElement="Flow_1u1afua">
72
+ <di:waypoint x="470" y="170" />
73
+ <di:waypoint x="562" y="170" />
74
+ </bpmndi:BPMNEdge>
75
+ </bpmndi:BPMNPlane>
76
+ </bpmndi:BPMNDiagram>
77
+ </bpmn:definitions>
@@ -0,0 +1,95 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="SampleUserTask_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
3
+ <bpmn:collaboration id="Collaboration_1cidyxu" name="">
4
+ <bpmn:participant id="Participant_0px403d" name="SampleUserTask" processRef="SampleUserTask_Process" />
5
+ </bpmn:collaboration>
6
+ <bpmn:process id="SampleUserTask_Process" name="SampleUserTask" isExecutable="true">
7
+ <bpmn:laneSet>
8
+ <bpmn:lane id="Lane_1xzf0d3" name="Lane">
9
+ <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
10
+ <bpmn:flowNodeRef>Activity_0ljiko7</bpmn:flowNodeRef>
11
+ <bpmn:flowNodeRef>Event_1eeiwx4</bpmn:flowNodeRef>
12
+ <bpmn:flowNodeRef>Activity_0glvmjk</bpmn:flowNodeRef>
13
+ </bpmn:lane>
14
+ </bpmn:laneSet>
15
+ <bpmn:startEvent id="StartEvent_1" name="Start">
16
+ <bpmn:extensionElements>
17
+ <camunda:properties>
18
+ <camunda:property name="studio.defaultCustomStartToken" value="{&#10; &#34;sample&#34;: &#34;hello&#34;&#10;}" />
19
+ </camunda:properties>
20
+ </bpmn:extensionElements>
21
+ <bpmn:outgoing>Flow_1h0giih</bpmn:outgoing>
22
+ </bpmn:startEvent>
23
+ <bpmn:sequenceFlow id="Flow_1h0giih" sourceRef="StartEvent_1" targetRef="Activity_0ljiko7" />
24
+ <bpmn:userTask id="Activity_0ljiko7" name="Hello world">
25
+ <bpmn:extensionElements>
26
+ <camunda:formData>
27
+ <camunda:formField id="text_id" label="Text Label" type="string" />
28
+ <camunda:formField id="number_id" label="Number Label" type="long" defaultValue="${token.current.sample}" customForm="{&#34;hint&#34;:&#34;Sample&#34;}" />
29
+ <camunda:formField id="date_id" label="Date Label" type="date" />
30
+ <camunda:formField id="select_id" label="Select Label" type="enum">
31
+ <camunda:value id="value_01" name="Value 01" />
32
+ <camunda:value id="value_02" name="Value 02" />
33
+ </camunda:formField>
34
+ <camunda:formField id="boolean_id" label="Boolean Label" type="boolean" />
35
+ </camunda:formData>
36
+ </bpmn:extensionElements>
37
+ <bpmn:incoming>Flow_1h0giih</bpmn:incoming>
38
+ <bpmn:outgoing>Flow_06e5qq4</bpmn:outgoing>
39
+ </bpmn:userTask>
40
+ <bpmn:sequenceFlow id="Flow_06e5qq4" sourceRef="Activity_0ljiko7" targetRef="Activity_0glvmjk" />
41
+ <bpmn:endEvent id="Event_1eeiwx4">
42
+ <bpmn:incoming>Flow_02dyxfy</bpmn:incoming>
43
+ </bpmn:endEvent>
44
+ <bpmn:sequenceFlow id="Flow_02dyxfy" sourceRef="Activity_0glvmjk" targetRef="Event_1eeiwx4" />
45
+ <bpmn:userTask id="Activity_0glvmjk" name="foo">
46
+ <bpmn:extensionElements>
47
+ <camunda:formData>
48
+ <camunda:formField id="FormField_BeDNcjma" label="Label 1" type="string" />
49
+ <camunda:formField id="FormField_Qv2INvg4" label="Label 2" type="string" />
50
+ </camunda:formData>
51
+ </bpmn:extensionElements>
52
+ <bpmn:incoming>Flow_06e5qq4</bpmn:incoming>
53
+ <bpmn:outgoing>Flow_02dyxfy</bpmn:outgoing>
54
+ </bpmn:userTask>
55
+ </bpmn:process>
56
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
57
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
58
+ <bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
59
+ <dc:Bounds x="5" y="4" width="665" height="346" />
60
+ </bpmndi:BPMNShape>
61
+ <bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
62
+ <dc:Bounds x="35" y="4" width="635" height="346" />
63
+ </bpmndi:BPMNShape>
64
+ <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
65
+ <dc:Bounds x="92" y="152" width="36" height="36" />
66
+ <bpmndi:BPMNLabel>
67
+ <dc:Bounds x="98" y="195" width="24" height="14" />
68
+ </bpmndi:BPMNLabel>
69
+ </bpmndi:BPMNShape>
70
+ <bpmndi:BPMNShape id="Activity_1uodwbi_di" bpmnElement="Activity_0ljiko7">
71
+ <dc:Bounds x="180" y="130" width="100" height="80" />
72
+ <bpmndi:BPMNLabel />
73
+ </bpmndi:BPMNShape>
74
+ <bpmndi:BPMNShape id="Event_1eeiwx4_di" bpmnElement="Event_1eeiwx4">
75
+ <dc:Bounds x="482" y="152" width="36" height="36" />
76
+ </bpmndi:BPMNShape>
77
+ <bpmndi:BPMNShape id="Activity_0vcm0z0_di" bpmnElement="Activity_0glvmjk">
78
+ <dc:Bounds x="330" y="130" width="100" height="80" />
79
+ <bpmndi:BPMNLabel />
80
+ </bpmndi:BPMNShape>
81
+ <bpmndi:BPMNEdge id="Flow_1h0giih_di" bpmnElement="Flow_1h0giih">
82
+ <di:waypoint x="128" y="170" />
83
+ <di:waypoint x="180" y="170" />
84
+ </bpmndi:BPMNEdge>
85
+ <bpmndi:BPMNEdge id="Flow_06e5qq4_di" bpmnElement="Flow_06e5qq4">
86
+ <di:waypoint x="280" y="170" />
87
+ <di:waypoint x="330" y="170" />
88
+ </bpmndi:BPMNEdge>
89
+ <bpmndi:BPMNEdge id="Flow_02dyxfy_di" bpmnElement="Flow_02dyxfy">
90
+ <di:waypoint x="430" y="170" />
91
+ <di:waypoint x="482" y="170" />
92
+ </bpmndi:BPMNEdge>
93
+ </bpmndi:BPMNPlane>
94
+ </bpmndi:BPMNDiagram>
95
+ </bpmn:definitions>
@@ -8,10 +8,18 @@ module.exports = function (RED) {
8
8
  RED.nodes.createNode(this, config);
9
9
  var node = this;
10
10
  var flowContext = node.context().flow;
11
+ var nodeContext = node.context();
11
12
 
12
13
  this.engine = this.server = RED.nodes.getNode(config.engine);
13
14
 
14
- const client = this.engine.getEngineClient();
15
+ const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
16
+
17
+ var client = nodeContext.get('client');
18
+
19
+ if (!client) {
20
+ nodeContext.set('client', new engine_client.EngineClient(engineUrl));
21
+ client = nodeContext.get('client');
22
+ }
15
23
 
16
24
  var eventEmitter = flowContext.get('emitter');
17
25
 
@@ -31,6 +39,7 @@ module.exports = function (RED) {
31
39
  client.processInstances
32
40
  .query(query, { identity: node.server.identity })
33
41
  .then((matchingInstances) => {
42
+ console.log(matchingInstances);
34
43
  msg.payload = matchingInstances;
35
44
 
36
45
  node.send(msg);
@@ -6,10 +6,18 @@ module.exports = function (RED) {
6
6
  function SignalEventTrigger(config) {
7
7
  RED.nodes.createNode(this, config);
8
8
  var node = this;
9
+ var nodeContext = node.context();
9
10
 
10
11
  this.engine = this.server = RED.nodes.getNode(config.engine);
11
12
 
12
- const client = this.engine.getEngineClient();
13
+ const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
14
+
15
+ var client = nodeContext.get('client');
16
+
17
+ if (!client) {
18
+ nodeContext.set('client', new engine_client.EngineClient(engineUrl));
19
+ client = nodeContext.get('client');
20
+ }
13
21
 
14
22
  node.on('input', function (msg) {
15
23
  client.events
@@ -22,11 +30,7 @@ module.exports = function (RED) {
22
30
  msg.payload = result;
23
31
 
24
32
  node.send(msg);
25
- node.status({
26
- fill: 'blue',
27
- shape: 'dot',
28
- text: `signal event triggered`,
29
- });
33
+ node.status({ fill: 'blue', shape: 'dot', text: `signal event triggered` });
30
34
  })
31
35
  .catch((error) => {
32
36
  node.error(error);
@@ -8,10 +8,18 @@ module.exports = function (RED) {
8
8
  RED.nodes.createNode(this, config);
9
9
  var node = this;
10
10
  var flowContext = node.context().flow;
11
+ var nodeContext = node.context();
11
12
 
12
13
  this.engine = this.server = RED.nodes.getNode(config.engine);
13
14
 
14
- const client = this.engine.getEngineClient();
15
+ const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
16
+
17
+ var client = nodeContext.get('client');
18
+
19
+ if (!client) {
20
+ nodeContext.set('client', new engine_client.EngineClient(engineUrl));
21
+ client = nodeContext.get('client');
22
+ }
15
23
 
16
24
  var eventEmitter = flowContext.get('emitter');
17
25
 
package/usertask-input.js CHANGED
@@ -5,17 +5,9 @@ const engine_client = require('@5minds/processcube_engine_client');
5
5
 
6
6
  function showStatus(node, msgCounter) {
7
7
  if (msgCounter >= 1) {
8
- node.status({
9
- fill: 'blue',
10
- shape: 'dot',
11
- text: `handling tasks ${msgCounter}`,
12
- });
8
+ node.status({ fill: 'blue', shape: 'dot', text: `handling tasks ${msgCounter}` });
13
9
  } else {
14
- node.status({
15
- fill: 'blue',
16
- shape: 'ring',
17
- text: `subcribed ${msgCounter}`,
18
- });
10
+ node.status({ fill: 'blue', shape: 'ring', text: `subcribed ${msgCounter}` });
19
11
  }
20
12
  }
21
13
 
@@ -25,10 +17,18 @@ module.exports = function (RED) {
25
17
  var node = this;
26
18
  var msgCounter = 0;
27
19
  var flowContext = node.context().flow;
20
+ var nodeContext = node.context();
28
21
 
29
22
  this.engine = this.server = RED.nodes.getNode(config.engine);
30
23
 
31
- const client = this.engine.getEngineClient();
24
+ const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
25
+
26
+ var client = nodeContext.get('client');
27
+
28
+ if (!client) {
29
+ nodeContext.set('client', new engine_client.EngineClient(engineUrl));
30
+ client = nodeContext.get('client');
31
+ }
32
32
 
33
33
  var eventEmitter = flowContext.get('emitter');
34
34
 
@@ -67,15 +67,11 @@ module.exports = function (RED) {
67
67
  node.send(msg);
68
68
  });
69
69
  } else {
70
- msg.payload = {
71
- userTasks: matchingFlowNodes.userTasks,
72
- };
70
+ msg.payload = { userTasks: matchingFlowNodes.userTasks };
73
71
  node.send(msg);
74
72
  }
75
73
  } else {
76
- msg.payload = {
77
- userTasks: matchingFlowNodes.userTasks || [],
78
- };
74
+ msg.payload = { userTasks: matchingFlowNodes.userTasks || [] };
79
75
  node.send(msg);
80
76
  }
81
77
  }
@@ -8,10 +8,18 @@ module.exports = function (RED) {
8
8
  RED.nodes.createNode(this, config);
9
9
  var node = this;
10
10
  var flowContext = node.context().flow;
11
+ var nodeContext = node.context();
11
12
 
12
13
  this.engine = this.server = RED.nodes.getNode(config.engine);
13
14
 
14
- const client = this.engine.getEngineClient();
15
+ const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
16
+
17
+ var client = nodeContext.get('client');
18
+
19
+ if (!client) {
20
+ nodeContext.set('client', new engine_client.EngineClient(engineUrl));
21
+ client = nodeContext.get('client');
22
+ }
15
23
 
16
24
  var eventEmitter = flowContext.get('emitter');
17
25
 
@@ -9,10 +9,18 @@ module.exports = function (RED) {
9
9
 
10
10
  var node = this;
11
11
  var flowContext = node.context().flow;
12
+ var nodeContext = node.context();
12
13
 
13
14
  this.engine = this.server = RED.nodes.getNode(config.engine);
14
15
 
15
- const client = this.engine.getEngineClient();
16
+ const engineUrl = this.engine?.url || process.env.ENGINE_URL || 'http://engine:8000';
17
+
18
+ var client = nodeContext.get('client');
19
+
20
+ if (!client) {
21
+ nodeContext.set('client', new engine_client.EngineClient(engineUrl));
22
+ client = nodeContext.get('client');
23
+ }
16
24
 
17
25
  var eventEmitter = flowContext.get('emitter');
18
26
 
@@ -1,252 +0,0 @@
1
- [
2
- {
3
- "id": "a23d2e782beb66f4",
4
- "type": "tab",
5
- "label": "External Task Sample",
6
- "disabled": false,
7
- "info": "",
8
- "env": []
9
- },
10
- {
11
- "id": "70d7a70e375b162a",
12
- "type": "group",
13
- "z": "a23d2e782beb66f4",
14
- "style": {
15
- "stroke": "#999999",
16
- "stroke-opacity": "1",
17
- "fill": "none",
18
- "fill-opacity": "1",
19
- "label": true,
20
- "label-position": "nw",
21
- "color": "#a4a4a4"
22
- },
23
- "nodes": [
24
- "2991a5e6df2b87d2",
25
- "911fde53bcbb7e3f",
26
- "d56bb7cd73fd220c",
27
- "15a5f64b9e2e05fc"
28
- ],
29
- "x": 34,
30
- "y": 79,
31
- "w": 512,
32
- "h": 142
33
- },
34
- {
35
- "id": "31cb6729aac0ba46",
36
- "type": "group",
37
- "z": "a23d2e782beb66f4",
38
- "style": {
39
- "stroke": "#999999",
40
- "stroke-opacity": "1",
41
- "fill": "none",
42
- "fill-opacity": "1",
43
- "label": true,
44
- "label-position": "nw",
45
- "color": "#a4a4a4"
46
- },
47
- "nodes": [
48
- "18e05d562d48f32d",
49
- "49aee03a7885fae8",
50
- "e4555d9019cd3f47",
51
- "bd68c4bdc53b8f80",
52
- "fb87f79852b22e4a",
53
- "1ba1e62c9935255f",
54
- "b49f226ba865e164"
55
- ],
56
- "x": 34,
57
- "y": 259,
58
- "w": 812,
59
- "h": 202
60
- },
61
- {
62
- "id": "2991a5e6df2b87d2",
63
- "type": "externaltask-input",
64
- "z": "a23d2e782beb66f4",
65
- "g": "70d7a70e375b162a",
66
- "name": "Test",
67
- "engine": "42e6796dddd9d4db",
68
- "topic": "Test",
69
- "x": 110,
70
- "y": 180,
71
- "wires": [
72
- [
73
- "d56bb7cd73fd220c"
74
- ]
75
- ]
76
- },
77
- {
78
- "id": "911fde53bcbb7e3f",
79
- "type": "externaltask-output",
80
- "z": "a23d2e782beb66f4",
81
- "g": "70d7a70e375b162a",
82
- "name": "Test Ende",
83
- "x": 460,
84
- "y": 180,
85
- "wires": []
86
- },
87
- {
88
- "id": "d56bb7cd73fd220c",
89
- "type": "delay",
90
- "z": "a23d2e782beb66f4",
91
- "g": "70d7a70e375b162a",
92
- "name": "",
93
- "pauseType": "delay",
94
- "timeout": "1",
95
- "timeoutUnits": "seconds",
96
- "rate": "1",
97
- "nbRateUnits": "1",
98
- "rateUnits": "second",
99
- "randomFirst": "1",
100
- "randomLast": "5",
101
- "randomUnits": "seconds",
102
- "drop": false,
103
- "allowrate": false,
104
- "outputs": 1,
105
- "x": 280,
106
- "y": 180,
107
- "wires": [
108
- [
109
- "911fde53bcbb7e3f"
110
- ]
111
- ]
112
- },
113
- {
114
- "id": "18e05d562d48f32d",
115
- "type": "externaltask-input",
116
- "z": "a23d2e782beb66f4",
117
- "g": "31cb6729aac0ba46",
118
- "name": "SampleError",
119
- "engine": "42e6796dddd9d4db",
120
- "topic": "SampleError",
121
- "x": 130,
122
- "y": 360,
123
- "wires": [
124
- [
125
- "49aee03a7885fae8"
126
- ]
127
- ]
128
- },
129
- {
130
- "id": "49aee03a7885fae8",
131
- "type": "delay",
132
- "z": "a23d2e782beb66f4",
133
- "g": "31cb6729aac0ba46",
134
- "name": "",
135
- "pauseType": "delay",
136
- "timeout": "5",
137
- "timeoutUnits": "seconds",
138
- "rate": "1",
139
- "nbRateUnits": "1",
140
- "rateUnits": "second",
141
- "randomFirst": "1",
142
- "randomLast": "5",
143
- "randomUnits": "seconds",
144
- "drop": false,
145
- "allowrate": false,
146
- "outputs": 1,
147
- "x": 320,
148
- "y": 360,
149
- "wires": [
150
- [
151
- "bd68c4bdc53b8f80"
152
- ]
153
- ]
154
- },
155
- {
156
- "id": "e4555d9019cd3f47",
157
- "type": "catch",
158
- "z": "a23d2e782beb66f4",
159
- "g": "31cb6729aac0ba46",
160
- "name": "",
161
- "scope": "group",
162
- "uncaught": false,
163
- "x": 510,
164
- "y": 420,
165
- "wires": [
166
- [
167
- "fb87f79852b22e4a"
168
- ]
169
- ]
170
- },
171
- {
172
- "id": "bd68c4bdc53b8f80",
173
- "type": "function",
174
- "z": "a23d2e782beb66f4",
175
- "g": "31cb6729aac0ba46",
176
- "name": "raise Error",
177
- "func": "throw Error(\"hello error\");\n\nreturn msg;",
178
- "outputs": 1,
179
- "timeout": 0,
180
- "noerr": 0,
181
- "initialize": "",
182
- "finalize": "",
183
- "libs": [],
184
- "x": 510,
185
- "y": 360,
186
- "wires": [
187
- [
188
- "1ba1e62c9935255f"
189
- ]
190
- ]
191
- },
192
- {
193
- "id": "fb87f79852b22e4a",
194
- "type": "externaltask-error",
195
- "z": "a23d2e782beb66f4",
196
- "g": "31cb6729aac0ba46",
197
- "name": "Send Error to Engine",
198
- "error": "MyErrorCode",
199
- "x": 720,
200
- "y": 420,
201
- "wires": [
202
- []
203
- ]
204
- },
205
- {
206
- "id": "1ba1e62c9935255f",
207
- "type": "externaltask-output",
208
- "z": "a23d2e782beb66f4",
209
- "g": "31cb6729aac0ba46",
210
- "name": "",
211
- "x": 710,
212
- "y": 360,
213
- "wires": []
214
- },
215
- {
216
- "id": "15a5f64b9e2e05fc",
217
- "type": "comment",
218
- "z": "a23d2e782beb66f4",
219
- "g": "70d7a70e375b162a",
220
- "name": "Simple External Task handling",
221
- "info": "",
222
- "x": 180,
223
- "y": 120,
224
- "wires": []
225
- },
226
- {
227
- "id": "b49f226ba865e164",
228
- "type": "comment",
229
- "z": "a23d2e782beb66f4",
230
- "g": "31cb6729aac0ba46",
231
- "name": "Error handling with external tasks",
232
- "info": "",
233
- "x": 190,
234
- "y": 300,
235
- "wires": []
236
- },
237
- {
238
- "id": "799125e21de02f13",
239
- "type": "comment",
240
- "z": "a23d2e782beb66f4",
241
- "name": "For Testing, deploy \"External-Task-Sample.bpmn\" and start the process.",
242
- "info": "",
243
- "x": 300,
244
- "y": 40,
245
- "wires": []
246
- },
247
- {
248
- "id": "42e6796dddd9d4db",
249
- "type": "processcube-engine-config",
250
- "url": "http://engine:8000"
251
- }
252
- ]