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
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _BoundaryEvent = require("./BoundaryEvent.js");
|
|
7
|
+
Object.keys(_BoundaryEvent).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _BoundaryEvent[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _BoundaryEvent[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _EndEvent = require("./EndEvent.js");
|
|
18
|
+
Object.keys(_EndEvent).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _EndEvent[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _EndEvent[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _IntermediateCatchEvent = require("./IntermediateCatchEvent.js");
|
|
29
|
+
Object.keys(_IntermediateCatchEvent).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _IntermediateCatchEvent[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _IntermediateCatchEvent[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _IntermediateThrowEvent = require("./IntermediateThrowEvent.js");
|
|
40
|
+
Object.keys(_IntermediateThrowEvent).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _IntermediateThrowEvent[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _IntermediateThrowEvent[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _StartEvent = require("./StartEvent.js");
|
|
51
|
+
Object.keys(_StartEvent).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _StartEvent[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _StartEvent[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -52,7 +52,6 @@ function Association(associationDef, {
|
|
|
52
52
|
logger.debug(`<${id}> init, <${sourceId}> -> <${targetId}>`);
|
|
53
53
|
}
|
|
54
54
|
Object.defineProperty(Association.prototype, 'counters', {
|
|
55
|
-
enumerable: true,
|
|
56
55
|
get() {
|
|
57
56
|
return {
|
|
58
57
|
...this[kCounters]
|
|
@@ -72,11 +71,13 @@ Association.prototype.discard = function discard(content = {}) {
|
|
|
72
71
|
return true;
|
|
73
72
|
};
|
|
74
73
|
Association.prototype.getState = function getState() {
|
|
74
|
+
const brokerState = this.broker.getState(true);
|
|
75
|
+
if (!brokerState && this.environment.settings.disableTrackState) return;
|
|
75
76
|
return {
|
|
76
77
|
id: this.id,
|
|
77
78
|
type: this.type,
|
|
78
79
|
counters: this.counters,
|
|
79
|
-
broker:
|
|
80
|
+
broker: brokerState
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
83
|
Association.prototype.recover = function recover(state) {
|
|
@@ -48,7 +48,6 @@ function MessageFlow(flowDef, context) {
|
|
|
48
48
|
this.logger = context.environment.Logger(type.toLowerCase());
|
|
49
49
|
}
|
|
50
50
|
Object.defineProperty(MessageFlow.prototype, 'counters', {
|
|
51
|
-
enumerable: true,
|
|
52
51
|
get() {
|
|
53
52
|
return {
|
|
54
53
|
...this[kCounters]
|
|
@@ -56,11 +55,13 @@ Object.defineProperty(MessageFlow.prototype, 'counters', {
|
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
57
|
MessageFlow.prototype.getState = function getState() {
|
|
58
|
+
const brokerState = this.broker.getState(true);
|
|
59
|
+
if (!brokerState && this.environment.settings.disableTrackState) return;
|
|
59
60
|
return {
|
|
60
61
|
id: this.id,
|
|
61
62
|
type: this.type,
|
|
62
63
|
counters: this.counters,
|
|
63
|
-
broker:
|
|
64
|
+
broker: brokerState
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
67
|
MessageFlow.prototype.recover = function recover(state) {
|
|
@@ -61,7 +61,6 @@ function SequenceFlow(flowDef, {
|
|
|
61
61
|
logger.debug(`<${id}> init, <${sourceId}> -> <${targetId}>`);
|
|
62
62
|
}
|
|
63
63
|
Object.defineProperty(SequenceFlow.prototype, 'counters', {
|
|
64
|
-
enumerable: true,
|
|
65
64
|
get() {
|
|
66
65
|
return {
|
|
67
66
|
...this[kCounters]
|
|
@@ -93,11 +92,13 @@ SequenceFlow.prototype.discard = function discard(content = {}) {
|
|
|
93
92
|
this._publishEvent('discard', content);
|
|
94
93
|
};
|
|
95
94
|
SequenceFlow.prototype.getState = function getState() {
|
|
95
|
+
const brokerState = this.broker.getState(true);
|
|
96
|
+
if (!brokerState && this.environment.settings.disableTrackState) return;
|
|
96
97
|
return {
|
|
97
98
|
id: this.id,
|
|
98
99
|
type: this.type,
|
|
99
100
|
counters: this.counters,
|
|
100
|
-
broker:
|
|
101
|
+
broker: brokerState
|
|
101
102
|
};
|
|
102
103
|
};
|
|
103
104
|
SequenceFlow.prototype.recover = function recover(state) {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _EventBasedGateway = require("./EventBasedGateway.js");
|
|
7
|
+
Object.keys(_EventBasedGateway).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _EventBasedGateway[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _EventBasedGateway[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _ExclusiveGateway = require("./ExclusiveGateway.js");
|
|
18
|
+
Object.keys(_ExclusiveGateway).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _ExclusiveGateway[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _ExclusiveGateway[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _InclusiveGateway = require("./InclusiveGateway.js");
|
|
29
|
+
Object.keys(_InclusiveGateway).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _InclusiveGateway[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _InclusiveGateway[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _ParallelGateway = require("./ParallelGateway.js");
|
|
40
|
+
Object.keys(_ParallelGateway).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _ParallelGateway[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _ParallelGateway[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
package/dist/process/Process.js
CHANGED
|
@@ -71,65 +71,59 @@ function Process(processDef, context) {
|
|
|
71
71
|
}
|
|
72
72
|
this[kExtensions] = context.loadExtensions(this);
|
|
73
73
|
}
|
|
74
|
-
Object.
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return this[kStatus];
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
Object.defineProperty(Process.prototype, 'activityStatus', {
|
|
131
|
-
get() {
|
|
132
|
-
return this[kExec].execution && this[kExec].execution.activityStatus || 'idle';
|
|
74
|
+
Object.defineProperties(Process.prototype, {
|
|
75
|
+
counters: {
|
|
76
|
+
get() {
|
|
77
|
+
return {
|
|
78
|
+
...this[kCounters]
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
lanes: {
|
|
83
|
+
get() {
|
|
84
|
+
const lanes = this[kLanes];
|
|
85
|
+
return lanes && lanes.slice();
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
extensions: {
|
|
89
|
+
get() {
|
|
90
|
+
return this[kExtensions];
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
stopped: {
|
|
94
|
+
get() {
|
|
95
|
+
return this[kStopped];
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
isRunning: {
|
|
99
|
+
get() {
|
|
100
|
+
if (!this[kConsuming]) return false;
|
|
101
|
+
return !!this.status;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
executionId: {
|
|
105
|
+
get() {
|
|
106
|
+
const {
|
|
107
|
+
executionId,
|
|
108
|
+
initExecutionId
|
|
109
|
+
} = this[kExec];
|
|
110
|
+
return executionId || initExecutionId;
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
execution: {
|
|
114
|
+
get() {
|
|
115
|
+
return this[kExec].execution;
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
status: {
|
|
119
|
+
get() {
|
|
120
|
+
return this[kStatus];
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
activityStatus: {
|
|
124
|
+
get() {
|
|
125
|
+
return this[kExec].execution && this[kExec].execution.activityStatus || 'idle';
|
|
126
|
+
}
|
|
133
127
|
}
|
|
134
128
|
});
|
|
135
129
|
Process.prototype.init = function init(useAsExecutionId) {
|
|
@@ -64,37 +64,36 @@ function ProcessExecution(parentActivity, context) {
|
|
|
64
64
|
onMessageFlowEvent: this._onMessageFlowEvent.bind(this)
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
Object.
|
|
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
|
-
return this[kTracker].activityStatus;
|
|
67
|
+
Object.defineProperties(ProcessExecution.prototype, {
|
|
68
|
+
stopped: {
|
|
69
|
+
get() {
|
|
70
|
+
return this[kStopped];
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
completed: {
|
|
74
|
+
get() {
|
|
75
|
+
return this[kCompleted];
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
status: {
|
|
79
|
+
get() {
|
|
80
|
+
return this[kStatus];
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
postponedCount: {
|
|
84
|
+
get() {
|
|
85
|
+
return this[kElements].postponed.length;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
isRunning: {
|
|
89
|
+
get() {
|
|
90
|
+
return this[kActivated];
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
activityStatus: {
|
|
94
|
+
get() {
|
|
95
|
+
return this[kTracker].activityStatus;
|
|
96
|
+
}
|
|
98
97
|
}
|
|
99
98
|
});
|
|
100
99
|
ProcessExecution.prototype.execute = function execute(executeMessage) {
|
|
@@ -163,6 +162,11 @@ ProcessExecution.prototype.getState = function getState() {
|
|
|
163
162
|
outboundMessageFlows,
|
|
164
163
|
associations
|
|
165
164
|
} = this[kElements];
|
|
165
|
+
const flowStates = flows.reduce((result, flow) => {
|
|
166
|
+
const elmState = flow.getState();
|
|
167
|
+
if (elmState) result.push(elmState);
|
|
168
|
+
return result;
|
|
169
|
+
}, []);
|
|
166
170
|
return {
|
|
167
171
|
executionId: this.executionId,
|
|
168
172
|
stopped: this[kStopped],
|
|
@@ -170,17 +174,18 @@ ProcessExecution.prototype.getState = function getState() {
|
|
|
170
174
|
status: this.status,
|
|
171
175
|
children: children.reduce((result, activity) => {
|
|
172
176
|
if (activity.placeholder) return result;
|
|
173
|
-
|
|
177
|
+
const elmState = activity.getState();
|
|
178
|
+
if (elmState) result.push(elmState);
|
|
174
179
|
return result;
|
|
175
180
|
}, []),
|
|
176
181
|
...(flows.length && {
|
|
177
|
-
flows:
|
|
182
|
+
flows: flowStates
|
|
178
183
|
}),
|
|
179
184
|
...(outboundMessageFlows.length && {
|
|
180
|
-
messageFlows: outboundMessageFlows.length && outboundMessageFlows.map(f => f.getState())
|
|
185
|
+
messageFlows: outboundMessageFlows.length && outboundMessageFlows.map(f => f.getState()).filter(Boolean)
|
|
181
186
|
}),
|
|
182
187
|
...(associations.length && {
|
|
183
|
-
associations: associations.map(f => f.getState())
|
|
188
|
+
associations: associations.map(f => f.getState()).filter(Boolean)
|
|
184
189
|
})
|
|
185
190
|
};
|
|
186
191
|
};
|
package/dist/tasks/SubProcess.js
CHANGED
|
@@ -60,12 +60,12 @@ function SubProcessBehaviour(activity, context) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
Object.defineProperties(SubProcessBehaviour.prototype, {
|
|
63
|
-
|
|
63
|
+
execution: {
|
|
64
64
|
get() {
|
|
65
65
|
return this[kExecutions][0];
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
|
|
68
|
+
executions: {
|
|
69
69
|
get() {
|
|
70
70
|
return this[kExecutions].slice();
|
|
71
71
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _CallActivity = require("./CallActivity.js");
|
|
7
|
+
Object.keys(_CallActivity).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _CallActivity[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _CallActivity[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _ReceiveTask = require("./ReceiveTask.js");
|
|
18
|
+
Object.keys(_ReceiveTask).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _ReceiveTask[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _ReceiveTask[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _ScriptTask = require("./ScriptTask.js");
|
|
29
|
+
Object.keys(_ScriptTask).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _ScriptTask[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _ScriptTask[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _ServiceTask = require("./ServiceTask.js");
|
|
40
|
+
Object.keys(_ServiceTask).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _ServiceTask[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _ServiceTask[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _SignalTask = require("./SignalTask.js");
|
|
51
|
+
Object.keys(_SignalTask).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _SignalTask[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _SignalTask[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _SubProcess = require("./SubProcess.js");
|
|
62
|
+
Object.keys(_SubProcess).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _SubProcess[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _SubProcess[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _Task = require("./Task.js");
|
|
73
|
+
Object.keys(_Task).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _Task[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _Task[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _Transaction = require("./Transaction.js");
|
|
84
|
+
Object.keys(_Transaction).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _Transaction[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return _Transaction[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
package/events.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './types/index.js';
|
package/gateways.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './types/index.js';
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './types/index.js';
|
package/package.json
CHANGED
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-elements",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "Executable workflow elements based on BPMN 2.0",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "src/index.js",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./src/index.js",
|
|
8
8
|
"jsnext:main": "./src/index.js",
|
|
9
|
-
"types": "./types",
|
|
9
|
+
"types": "./types/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
|
-
"
|
|
12
|
-
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./types/index.d.ts",
|
|
13
|
+
"require": "./dist/index.js",
|
|
14
|
+
"import": "./src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./events": {
|
|
17
|
+
"types": "./types/index.d.ts",
|
|
18
|
+
"require": "./dist/events/index.js",
|
|
19
|
+
"import": "./src/events/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./gateways": {
|
|
22
|
+
"types": "./types/index.d.ts",
|
|
23
|
+
"require": "./dist/gateways/index.js",
|
|
24
|
+
"import": "./src/gateways/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./tasks": {
|
|
27
|
+
"types": "./types/index.d.ts",
|
|
28
|
+
"require": "./dist/tasks/index.js",
|
|
29
|
+
"import": "./src/tasks/index.js"
|
|
30
|
+
}
|
|
13
31
|
},
|
|
14
32
|
"sideEffects": false,
|
|
15
33
|
"scripts": {
|
|
@@ -41,30 +59,32 @@
|
|
|
41
59
|
"files": [
|
|
42
60
|
"dist",
|
|
43
61
|
"types",
|
|
44
|
-
"src"
|
|
62
|
+
"src",
|
|
63
|
+
"*.d.ts"
|
|
45
64
|
],
|
|
46
65
|
"devDependencies": {
|
|
47
66
|
"@aircall/expression-parser": "^1.0.4",
|
|
48
|
-
"@babel/cli": "^7.
|
|
49
|
-
"@babel/core": "^7.23.
|
|
50
|
-
"@babel/preset-env": "^7.23.
|
|
51
|
-
"@babel/register": "^7.
|
|
67
|
+
"@babel/cli": "^7.23.9",
|
|
68
|
+
"@babel/core": "^7.23.9",
|
|
69
|
+
"@babel/preset-env": "^7.23.9",
|
|
70
|
+
"@babel/register": "^7.23.7",
|
|
52
71
|
"@bonniernews/hot-bev": "^0.4.0",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
72
|
+
"@types/node": "^16.18.80",
|
|
73
|
+
"bpmn-moddle": "^8.1.0",
|
|
74
|
+
"c8": "^9.1.0",
|
|
55
75
|
"camunda-bpmn-moddle": "^7.0.1",
|
|
56
|
-
"chai": "^
|
|
76
|
+
"chai": "^5.0.3",
|
|
57
77
|
"chronokinesis": "^6.0.0",
|
|
58
78
|
"debug": "^4.3.4",
|
|
59
79
|
"eslint": "^8.56.0",
|
|
60
80
|
"eslint-plugin-import": "^2.29.1",
|
|
61
|
-
"got": "^
|
|
62
|
-
"mocha": "^10.
|
|
81
|
+
"got": "^14.2.0",
|
|
82
|
+
"mocha": "^10.3.0",
|
|
63
83
|
"mocha-cakes-2": "^3.3.0",
|
|
64
|
-
"moddle-context-serializer": "^4.
|
|
65
|
-
"nock": "^13.
|
|
84
|
+
"moddle-context-serializer": "^4.1.2",
|
|
85
|
+
"nock": "^13.5.1"
|
|
66
86
|
},
|
|
67
87
|
"dependencies": {
|
|
68
|
-
"smqp": "^8.
|
|
88
|
+
"smqp": "^8.2.2"
|
|
69
89
|
}
|
|
70
90
|
}
|
package/src/Environment.js
CHANGED
|
@@ -31,24 +31,23 @@ export default function Environment(options = {}) {
|
|
|
31
31
|
this[kVariables] = options.variables || {};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
Object.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
Object.defineProperties(Environment.prototype, {
|
|
35
|
+
variables: {
|
|
36
|
+
get() {
|
|
37
|
+
return this[kVariables];
|
|
38
|
+
},
|
|
38
39
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
Object.assign(services, value);
|
|
40
|
+
services: {
|
|
41
|
+
get() {
|
|
42
|
+
return this[kServices];
|
|
43
|
+
},
|
|
44
|
+
set(value) {
|
|
45
|
+
const services = this[kServices];
|
|
46
|
+
for (const name in services) {
|
|
47
|
+
if (!(name in value)) delete services[name];
|
|
48
|
+
}
|
|
49
|
+
Object.assign(services, value);
|
|
50
|
+
},
|
|
52
51
|
},
|
|
53
52
|
});
|
|
54
53
|
|