bpmn-elements 12.0.0 → 13.1.0
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.
- package/CHANGELOG.md +14 -0
- package/dist/Environment.js +15 -15
- package/dist/activity/Activity.js +125 -142
- package/dist/activity/ActivityExecution.js +0 -1
- package/dist/definition/Definition.js +38 -42
- package/dist/definition/DefinitionExecution.js +51 -53
- package/dist/eventDefinitions/EventDefinitionExecution.js +10 -10
- package/dist/eventDefinitions/TimerEventDefinition.js +16 -16
- package/dist/events/BoundaryEvent.js +12 -11
- package/dist/events/index.js +60 -0
- package/dist/flows/Association.js +3 -2
- package/dist/flows/MessageFlow.js +3 -2
- package/dist/flows/SequenceFlow.js +3 -2
- package/dist/gateways/index.js +49 -0
- package/dist/process/Process.js +53 -59
- package/dist/process/ProcessExecution.js +40 -35
- package/dist/tasks/SubProcess.js +2 -2
- package/dist/tasks/index.js +93 -0
- package/events.d.ts +1 -0
- package/gateways.d.ts +1 -0
- package/index.d.ts +1 -0
- package/package.json +39 -19
- package/src/Environment.js +16 -17
- package/src/activity/Activity.js +100 -132
- package/src/activity/ActivityExecution.js +0 -1
- package/src/definition/Definition.js +30 -40
- package/src/definition/DefinitionExecution.js +47 -55
- package/src/eventDefinitions/EventDefinitionExecution.js +9 -10
- package/src/eventDefinitions/TimerEventDefinition.js +14 -16
- package/src/events/BoundaryEvent.js +11 -11
- package/src/events/index.js +5 -0
- package/src/flows/Association.js +4 -2
- package/src/flows/MessageFlow.js +4 -2
- package/src/flows/SequenceFlow.js +4 -2
- package/src/gateways/index.js +4 -0
- package/src/process/Process.js +40 -54
- package/src/process/ProcessExecution.js +37 -35
- package/src/tasks/SubProcess.js +2 -2
- package/src/tasks/index.js +8 -0
- package/tasks.d.ts +1 -0
- package/types/index.d.ts +69 -767
- package/types/types.d.ts +721 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
# 13.1.0
|
|
5
|
+
|
|
6
|
+
- introduce `disableTrackState` setting. Tracking of elements is done by counters, e.g. activity taken or discarded, sequence flow taken and discarded. Counters are saved when getting state. If you run really big flows the state will keep all elements just to be able to recover the number of times an element has been touched. Needless to say it the state will grow out of it's comfort zone. Setting `disableTrackState` to true will only return state for elements that are actually running
|
|
7
|
+
|
|
8
|
+
## Breaking
|
|
9
|
+
|
|
10
|
+
- `getState()` can return undefined
|
|
11
|
+
|
|
12
|
+
# 13.0.0
|
|
13
|
+
|
|
14
|
+
- export task-, events-, and gateway activity behaviors through `bpmn-elements/tasks`, `bpmn-elements/events`, and `bpmn-elements/gateways` respectively
|
|
15
|
+
- refactor type definitions for three days to make the above type safe and VS-code happy. Why is it so freaking complicated? Ambient bla bla bla ts(4-digit-number)??? Looped through all 10.000 ts-typescript errors. Patches are inevitable and imminent
|
|
16
|
+
- use `Object.defineProperties` when feasible and skip pointless enumerable option on property
|
|
17
|
+
|
|
4
18
|
# 12.0.0
|
|
5
19
|
|
|
6
20
|
Memory issues running sequential multi-instance sub-process (MISP). All MISP executions are put in a list to be able to save state.
|
package/dist/Environment.js
CHANGED
|
@@ -25,23 +25,23 @@ function Environment(options = {}) {
|
|
|
25
25
|
this[kServices] = options.services || {};
|
|
26
26
|
this[kVariables] = options.variables || {};
|
|
27
27
|
}
|
|
28
|
-
Object.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
Object.defineProperty(Environment.prototype, 'services', {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get() {
|
|
37
|
-
return this[kServices];
|
|
28
|
+
Object.defineProperties(Environment.prototype, {
|
|
29
|
+
variables: {
|
|
30
|
+
get() {
|
|
31
|
+
return this[kVariables];
|
|
32
|
+
}
|
|
38
33
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
services: {
|
|
35
|
+
get() {
|
|
36
|
+
return this[kServices];
|
|
37
|
+
},
|
|
38
|
+
set(value) {
|
|
39
|
+
const services = this[kServices];
|
|
40
|
+
for (const name in services) {
|
|
41
|
+
if (!(name in value)) delete services[name];
|
|
42
|
+
}
|
|
43
|
+
Object.assign(services, value);
|
|
43
44
|
}
|
|
44
|
-
Object.assign(services, value);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
Environment.prototype.getState = function getState() {
|
|
@@ -114,147 +114,128 @@ function Activity(Behaviour, activityDef, context) {
|
|
|
114
114
|
this[kEventDefinitions] = eventDefinitions && eventDefinitions.map(ed => new ed.Behaviour(this, ed, this.context));
|
|
115
115
|
this[kExtensions] = context.loadExtensions(this);
|
|
116
116
|
}
|
|
117
|
-
Object.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
Object.defineProperty(Activity.prototype, 'lane', {
|
|
240
|
-
enumerable: true,
|
|
241
|
-
get() {
|
|
242
|
-
const laneId = this[kFlags].lane;
|
|
243
|
-
if (!laneId) return undefined;
|
|
244
|
-
const parent = this.parentElement;
|
|
245
|
-
return parent.getLaneById && parent.getLaneById(laneId);
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
Object.defineProperty(Activity.prototype, 'eventDefinitions', {
|
|
249
|
-
enumerable: true,
|
|
250
|
-
get() {
|
|
251
|
-
return this[kEventDefinitions];
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
Object.defineProperty(Activity.prototype, 'parentElement', {
|
|
255
|
-
enumerable: true,
|
|
256
|
-
get() {
|
|
257
|
-
return this.context.getActivityParentById(this.id);
|
|
117
|
+
Object.defineProperties(Activity.prototype, {
|
|
118
|
+
counters: {
|
|
119
|
+
get() {
|
|
120
|
+
return {
|
|
121
|
+
...this[kCounters]
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
execution: {
|
|
126
|
+
get() {
|
|
127
|
+
return this[kExec].execution;
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
executionId: {
|
|
131
|
+
get() {
|
|
132
|
+
return this[kExec].executionId;
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
extensions: {
|
|
136
|
+
get() {
|
|
137
|
+
return this[kExtensions];
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
bpmnIo: {
|
|
141
|
+
get() {
|
|
142
|
+
const extensions = this[kExtensions];
|
|
143
|
+
return extensions && extensions.extensions.find(e => e.type === 'bpmnio');
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
formatter: {
|
|
147
|
+
get() {
|
|
148
|
+
let formatter = this[kFormatter];
|
|
149
|
+
if (formatter) return formatter;
|
|
150
|
+
const broker = this.broker;
|
|
151
|
+
formatter = this[kFormatter] = new _MessageFormatter.Formatter({
|
|
152
|
+
id: this.id,
|
|
153
|
+
broker,
|
|
154
|
+
logger: this.logger
|
|
155
|
+
}, broker.getQueue('format-run-q'));
|
|
156
|
+
return formatter;
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
isRunning: {
|
|
160
|
+
get() {
|
|
161
|
+
if (!this[kConsuming]) return false;
|
|
162
|
+
return !!this.status;
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
outbound: {
|
|
166
|
+
get() {
|
|
167
|
+
return this[kFlows].outboundSequenceFlows;
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
inbound: {
|
|
171
|
+
get() {
|
|
172
|
+
return this[kFlows].inboundSequenceFlows;
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
isEnd: {
|
|
176
|
+
get() {
|
|
177
|
+
return this[kFlags].isEnd;
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
isStart: {
|
|
181
|
+
get() {
|
|
182
|
+
return this[kFlags].isStart;
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
isSubProcess: {
|
|
186
|
+
get() {
|
|
187
|
+
return this[kFlags].isSubProcess;
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
isTransaction: {
|
|
191
|
+
get() {
|
|
192
|
+
return this[kFlags].isTransaction;
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
isMultiInstance: {
|
|
196
|
+
get() {
|
|
197
|
+
return this[kFlags].isMultiInstance;
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
isThrowing: {
|
|
201
|
+
get() {
|
|
202
|
+
return this[kFlags].isThrowing;
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
isForCompensation: {
|
|
206
|
+
get() {
|
|
207
|
+
return this[kFlags].isForCompensation;
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
triggeredByEvent: {
|
|
211
|
+
get() {
|
|
212
|
+
return this[kActivityDef].triggeredByEvent;
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
attachedTo: {
|
|
216
|
+
get() {
|
|
217
|
+
const attachedToId = this[kFlags].attachedTo;
|
|
218
|
+
if (!attachedToId) return null;
|
|
219
|
+
return this.getActivityById(attachedToId);
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
lane: {
|
|
223
|
+
get() {
|
|
224
|
+
const laneId = this[kFlags].lane;
|
|
225
|
+
if (!laneId) return undefined;
|
|
226
|
+
const parent = this.parentElement;
|
|
227
|
+
return parent.getLaneById && parent.getLaneById(laneId);
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
eventDefinitions: {
|
|
231
|
+
get() {
|
|
232
|
+
return this[kEventDefinitions];
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
parentElement: {
|
|
236
|
+
get() {
|
|
237
|
+
return this.context.getActivityParentById(this.id);
|
|
238
|
+
}
|
|
258
239
|
}
|
|
259
240
|
});
|
|
260
241
|
Activity.prototype.activate = function activate() {
|
|
@@ -298,6 +279,8 @@ Activity.prototype.run = function run(runContent) {
|
|
|
298
279
|
Activity.prototype.getState = function getState() {
|
|
299
280
|
const status = this.status;
|
|
300
281
|
const exec = this[kExec];
|
|
282
|
+
const brokerState = this.broker.getState(true);
|
|
283
|
+
if (!brokerState && this.environment.settings.disableTrackState) return;
|
|
301
284
|
return {
|
|
302
285
|
id: this.id,
|
|
303
286
|
type: this.type,
|
|
@@ -307,7 +290,7 @@ Activity.prototype.getState = function getState() {
|
|
|
307
290
|
executionId: exec.executionId,
|
|
308
291
|
stopped: this.stopped,
|
|
309
292
|
counters: this.counters,
|
|
310
|
-
broker:
|
|
293
|
+
broker: brokerState,
|
|
311
294
|
execution: exec.execution && exec.execution.getState()
|
|
312
295
|
};
|
|
313
296
|
};
|
|
@@ -69,48 +69,44 @@ function Definition(context, options) {
|
|
|
69
69
|
this.emitFatal = emitFatal;
|
|
70
70
|
this.logger = environment.Logger(type.toLowerCase());
|
|
71
71
|
}
|
|
72
|
-
Object.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
111
|
-
Object.defineProperty(Definition.prototype, 'activityStatus', {
|
|
112
|
-
get() {
|
|
113
|
-
return this[kExec].execution && this[kExec].execution.activityStatus || 'idle';
|
|
72
|
+
Object.defineProperties(Definition.prototype, {
|
|
73
|
+
counters: {
|
|
74
|
+
get() {
|
|
75
|
+
return {
|
|
76
|
+
...this[kCounters]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
execution: {
|
|
81
|
+
get() {
|
|
82
|
+
return this[kExec].execution;
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
executionId: {
|
|
86
|
+
get() {
|
|
87
|
+
return this[kExec].executionId;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
isRunning: {
|
|
91
|
+
get() {
|
|
92
|
+
if (!this[kConsuming]) return false;
|
|
93
|
+
return !!this.status;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
status: {
|
|
97
|
+
get() {
|
|
98
|
+
return this[kStatus];
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
stopped: {
|
|
102
|
+
get() {
|
|
103
|
+
return this[kStopped];
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
activityStatus: {
|
|
107
|
+
get() {
|
|
108
|
+
return this[kExec].execution && this[kExec].execution.activityStatus || 'idle';
|
|
109
|
+
}
|
|
114
110
|
}
|
|
115
111
|
});
|
|
116
112
|
Definition.prototype.run = function run(optionsOrCallback, optionalCallback) {
|
|
@@ -62,61 +62,59 @@ function DefinitionExecution(definition, context) {
|
|
|
62
62
|
onProcessMessage: this._onProcessMessage.bind(this)
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
Object.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
if (status === 'idle') status = bpStatus;
|
|
116
|
-
break;
|
|
65
|
+
Object.defineProperties(DefinitionExecution.prototype, {
|
|
66
|
+
stopped: {
|
|
67
|
+
get() {
|
|
68
|
+
return this[kStopped];
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
completed: {
|
|
72
|
+
get() {
|
|
73
|
+
return this[kCompleted];
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
status: {
|
|
77
|
+
get() {
|
|
78
|
+
return this[kStatus];
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
processes: {
|
|
82
|
+
get() {
|
|
83
|
+
return this[kProcesses].running;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
postponedCount: {
|
|
87
|
+
get() {
|
|
88
|
+
return this[kProcesses].postponed.length;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
isRunning: {
|
|
92
|
+
get() {
|
|
93
|
+
return this[kActivated];
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
activityStatus: {
|
|
97
|
+
get() {
|
|
98
|
+
let status = 'idle';
|
|
99
|
+
const running = this[kProcesses].running;
|
|
100
|
+
if (!running || !running.length) return status;
|
|
101
|
+
for (const bp of running) {
|
|
102
|
+
const bpStatus = bp.activityStatus;
|
|
103
|
+
switch (bp.activityStatus) {
|
|
104
|
+
case 'idle':
|
|
105
|
+
break;
|
|
106
|
+
case 'executing':
|
|
107
|
+
return bpStatus;
|
|
108
|
+
case 'timer':
|
|
109
|
+
status = bpStatus;
|
|
110
|
+
break;
|
|
111
|
+
case 'wait':
|
|
112
|
+
if (status === 'idle') status = bpStatus;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
117
115
|
}
|
|
116
|
+
return status;
|
|
118
117
|
}
|
|
119
|
-
return status;
|
|
120
118
|
}
|
|
121
119
|
});
|
|
122
120
|
DefinitionExecution.prototype.execute = function execute(executeMessage) {
|
|
@@ -18,16 +18,16 @@ function EventDefinitionExecution(activity, eventDefinitions, completedRoutingKe
|
|
|
18
18
|
this[kStopped] = false;
|
|
19
19
|
this[kExecuteMessage] = null;
|
|
20
20
|
}
|
|
21
|
-
Object.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
Object.defineProperties(EventDefinitionExecution.prototype, {
|
|
22
|
+
completed: {
|
|
23
|
+
get() {
|
|
24
|
+
return this[kCompleted];
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
stopped: {
|
|
28
|
+
get() {
|
|
29
|
+
return this[kStopped];
|
|
30
|
+
}
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
EventDefinitionExecution.prototype.execute = function execute(executeMessage) {
|
|
@@ -27,22 +27,22 @@ function TimerEventDefinition(activity, eventDefinition) {
|
|
|
27
27
|
this[kStopped] = false;
|
|
28
28
|
this[kTimer] = null;
|
|
29
29
|
}
|
|
30
|
-
Object.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
Object.defineProperties(TimerEventDefinition.prototype, {
|
|
31
|
+
executionId: {
|
|
32
|
+
get() {
|
|
33
|
+
const content = this[kTimerContent];
|
|
34
|
+
return content && content.executionId;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
stopped: {
|
|
38
|
+
get() {
|
|
39
|
+
return this[kStopped];
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
timer: {
|
|
43
|
+
get() {
|
|
44
|
+
return this[kTimer];
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
TimerEventDefinition.prototype.execute = function execute(executeMessage) {
|
|
@@ -29,17 +29,18 @@ function BoundaryEventBehaviour(activity) {
|
|
|
29
29
|
this[kShovels] = [];
|
|
30
30
|
this[kAttachedTags] = [];
|
|
31
31
|
}
|
|
32
|
-
Object.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
Object.defineProperties(BoundaryEventBehaviour.prototype, {
|
|
33
|
+
executionId: {
|
|
34
|
+
get() {
|
|
35
|
+
const message = this[kExecuteMessage];
|
|
36
|
+
return message && message.content.executionId;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
cancelActivity: {
|
|
40
|
+
get() {
|
|
41
|
+
const behaviour = this.activity.behaviour || {};
|
|
42
|
+
return 'cancelActivity' in behaviour ? behaviour.cancelActivity : true;
|
|
43
|
+
}
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
BoundaryEventBehaviour.prototype.execute = function execute(executeMessage) {
|