bpmn-engine 12.0.5 → 13.0.2

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 ADDED
@@ -0,0 +1,283 @@
1
+ Changelog
2
+ =========
3
+
4
+ # 13.0.2
5
+
6
+ - fix for removing wrong listener on error by @allain
7
+
8
+ # 13.0.1
9
+
10
+ ## Type definition
11
+ - fix: set the correct `Logger` type in `BpmnEngineOptions` by @leon19
12
+
13
+ # 13.0.0
14
+
15
+ - Slimmer state from [`bpmn-elements@6`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md). In most cases it should be safe to update, unless you inspect the broker states for some reason
16
+
17
+ # 12.0.5
18
+
19
+ - Prettify and actualize ts types
20
+
21
+ # 12.0.4
22
+
23
+ Update package.json to reflect what was stated in v12.0.3.
24
+
25
+ - And add tests for issue #142
26
+
27
+ # 12.0.3
28
+
29
+ - Bump [`bpmn-elements@5.2.0`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md) with support for bpmn:Property (#139)
30
+ - Bump [`smqp@5`](https://github.com/paed01/smqp/blob/default/CHANGELOG.md)
31
+
32
+ # 12.0.2
33
+
34
+ - Bump [`bpmn-elements@5.1.2`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
35
+ - Bump [`smqp@4`](https://github.com/paed01/smqp/blob/default/CHANGELOG.md)
36
+
37
+ # 12.0.1
38
+
39
+ - Bump [`bpmn-elements@5.1.0`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md) with "support" for bpmn:Group and Category. Kinda bugfix for the engine to be honest.
40
+
41
+ # 12.0.0
42
+
43
+ - Something about loop characteristics in [`bpmn-elements@5.0.0`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md). Not sure that a major was necessary, but semver is semver. In most cases it should be safe to update, unless you have used parallel loops without collection or cardinality (∞)?
44
+
45
+ # 11.4.2
46
+
47
+ - Bump [`bpmn-elements@4.4.2`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
48
+ - Add badge [![Coverage Status](https://coveralls.io/repos/github/paed01/bpmn-engine/badge.svg?branch=master)](https://coveralls.io/github/paed01/bpmn-engine?branch=master)
49
+
50
+ # 11.4.1
51
+
52
+ - Patch `moddle-context-serializer@0.16.1`
53
+ - Patch [`bpmn-elements@4.3.4`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
54
+
55
+ # 11.4.0
56
+
57
+ - Expose execution api on property `engine.execution` since it is basically the same as when returned on events
58
+
59
+ # 11.3.2
60
+
61
+ - Bump [`bpmn-elements@4.3.2`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
62
+ - Add tests for issue #125
63
+
64
+ # 11.3.1
65
+
66
+ ## Type definition
67
+ - Engine.resume returns Promise that resolves BpmnEngineExecutionApi by @mdwheele
68
+
69
+ ## Misc
70
+ - Pick recovered definition source from passed sources if not present on definition state
71
+
72
+ # 11.3.0
73
+
74
+ - Bump [`bpmn-elements@4.3.1`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md) to version with timer tracking
75
+ - Add the above timers, i.e. `setTimeout` and `clearTimeout`, to inline script context
76
+ - Clear all timers when execution is stopped
77
+
78
+ # 11.2.1
79
+
80
+ - [`bpmn-elements@4.1.0`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
81
+ - `bpmn-moddle` patch
82
+
83
+ # 11.2.0
84
+
85
+ - Major bump of [`bpmn-elements@4`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md). No apparent breaking change to engine except that gives more power to a custom script handler
86
+
87
+ # 11.1.0
88
+
89
+ - [`bpmn-elements@3.1.0`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
90
+
91
+ # 11.0.0
92
+
93
+ All conditional flows from `bpmn-elements@3`.
94
+
95
+ ## Breaking
96
+ - Outbound sequence flow with script condition requires `next(err, result)` to be called where result decides if it should be taken or discarded
97
+
98
+ ## Addititions
99
+ - Outbound sequence flow conditions are evaluated for all activities, as well as default flow
100
+ - Process now also have `cancelActivity` function for facilitation
101
+
102
+ # 10.1.2-3
103
+
104
+ Type definitions courtesy of @saeedtabrizi.
105
+
106
+ - Some type fix and add engine broker types
107
+
108
+ # 10.1.1
109
+
110
+ - Add type definition to package.json
111
+
112
+ # 10.1.0
113
+
114
+ - Bump bpmn-elements to 2.1, adding support for Transaction and CancelEventDefinition see [change log](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
115
+
116
+ # 10.0.0
117
+
118
+ Untangle issue #105 which resulted in refactoring outbound sequence flow handling.
119
+
120
+ - Bump bpmn-elements from 1.6 to 2, see [change log](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
121
+
122
+ ## Breaking
123
+ - No more `flow.pre-flight` events from sequence flows, not sure that anyone used them, but still
124
+ - Activities now publish (or emit) `activity.leave` when all outbound flows have been taken/discarded
125
+
126
+ # 9.2.0
127
+
128
+ - Bump bpmn-elements from 1.2 to 1.6, see [change log](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
129
+ - Support adding definition source with `addSource` function
130
+
131
+ # 9.1.1
132
+
133
+ - Bump bpmn-elements to version with ability to signal waiting start event from definition
134
+
135
+ # 9.1.0
136
+
137
+ - Bump bpmn-elements to version with shake activity functionality
138
+ - Bump moddle-context-serializer@0.16 with scripts and timers
139
+
140
+ ## Additions
141
+ - Add engine option `sourceContext` to hold pre-serialized context
142
+
143
+ # 9.0.0
144
+
145
+ ## Additions
146
+ - Add signal function to engine execution api
147
+
148
+ ## Breaking changes
149
+ - Bump bpmn-elements to v1.0.0 with some [breaking changes](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md) regarding MessageEventDefinition and SignalEventDefinition
150
+
151
+ # 8.7.0
152
+
153
+ - Bump bpmn-moddle, bpmn-elements, and smqp to latest
154
+
155
+ # 8.6.0
156
+
157
+ - Add typescript declaration file (Saeed Tabrizi)
158
+
159
+ # 8.5.0
160
+
161
+ - Bump [bpmn-elements@0.12.1](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md#0121)
162
+
163
+ # 8.4.0
164
+
165
+ - Bump bpmn-elements@0.11.0 with new ability to use process extensions
166
+
167
+ # 8.3.0
168
+
169
+ - Bump bpmn-elements@0.9.0 to support compensation
170
+
171
+ # 8.2.1
172
+
173
+ - Bump bpmn-elements@0.8.1 that expose sequence flow name
174
+
175
+ # 8.2.0
176
+
177
+ - Bump bpmn-elements@0.8.0 and moddle-context-serializer to support StandardLoopCharacteristics
178
+
179
+ # 8.1.0
180
+
181
+ - Bump bpmn-elements@0.7.0 to support LinkEventDefinition
182
+
183
+ # 8.0.0
184
+
185
+ ## Breaking changes
186
+ - Bump bpmn-elements to v0.6.0 with refactored MessageEventDefinition, ReceiveTask, and some bug fixes from @TallaInc
187
+
188
+ ## Additions
189
+ - Recover takes optional options that completely overrides environment and passes it along to the recovered definitions
190
+
191
+ # 7.1.0
192
+
193
+ - Bump bpmn-elements to v0.5.0
194
+
195
+ # 7.0.0
196
+
197
+ Bump bpmn-elements and bpmn-moddle (which now has a node dist :).
198
+
199
+ ## Breaking changes
200
+ - Implementation of ErrorEventDefinition is now closer to the BPMN 2.0 spec
201
+
202
+ ## Additions
203
+ - Start sub-process' sub-process if sub-process throws an error
204
+ - Expose the name of the element that emitted event
205
+
206
+ # 6.2.0
207
+
208
+ ## Additions
209
+ - Bump bpmn-elements and serializer and thereby add support for ConditionalEventDefinition
210
+
211
+ # 6.1.0
212
+
213
+ ## Additions
214
+ - Expose humanPerformer and potentialOwner
215
+
216
+ # 6.0.0
217
+
218
+ Use [bpmn-elements](https://github.com/paed01/bpmn-elements) to execute elements.
219
+
220
+ Behind the scenes the entire definition execution is replaced with [bpmn-elements](https://github.com/paed01/bpmn-elements)
221
+
222
+ ## Breaking changes
223
+ - Node version >= 10 is required
224
+ - Events are not emitted with name of the activity, i.e. no more `enter-task_a8dje7` emits
225
+ - Most events are emitted with the type of element as prefix, e.g. `activity.start`, one exception is `wait` wich is still emitted as `wait`
226
+ - `getPendingActivities()` is renamed to `getPostponed()`
227
+
228
+ ## Changes
229
+ - Change license to MIT
230
+
231
+ # 5.0.0
232
+
233
+ ## Breaking changes
234
+ - Engine `execute` callback is called when execution completes
235
+ - Node version >= 8.9 is supported
236
+ - `SendTask` message requires output
237
+ - `ParallelGateway` emits `start` on first taken inbound, i.e. discarded inbound are just registered
238
+ - Extensions have been moved to separate project [bpmn-engine-extensions](https://github.com/paed01/bpmn-engine-extensions)
239
+
240
+ ## Additions
241
+ - Support for parallell task loop
242
+
243
+ # 4.0.0
244
+
245
+ ## Breaking changes
246
+ - Parallel gateway `getState()` returns pending inbound and/or pending outbound, so old states are not supported
247
+
248
+ ## Changes
249
+ - Add support for Manual task
250
+ - Support camunda input/output for Exclusive Gateways, input is passed to conditional flows
251
+ - Support camunda errorCodeVariable and errorMessageVariable for Error Events
252
+
253
+ # 3.2.0
254
+
255
+ - Add support for SendTask and ReceiveTask
256
+
257
+ # 3.1.0
258
+
259
+ ## Changes
260
+ - A start event with form key will also emit wait
261
+
262
+ # 3.0.0
263
+
264
+ ## Breaking changes
265
+ - The `Engine` now handles definitions instead of processes, hence:
266
+ - `execute(callback)` returns executed definition in callback instead of process
267
+ - `getState()` returns executing definition instead of processes
268
+ - Engine `getState()` and `resume(state)` does no longer return or need the actual definition source. They work with moddle contexts.
269
+ - `Transformer` is now called `transformer` since it is not called with `new`
270
+ - Engine instance `resume()` is now a "static" function on engine, i.e. `Engine.resume`
271
+
272
+ ## Changes
273
+ - `Definition` is exposed and can be executed with moddle context and options, see [documentation](/docs/Definition.md)
274
+ - `validation` is exposed and harbours functions for validating moddle context and execute options
275
+ - Support camunda input forms for user task and start event
276
+
277
+ # 2.0.0
278
+
279
+ - Output from tasks with defined `camunda:inputOutput` now updates context variables. The previous behavior was to save result to `variables.taskInput`. That will still happen if no output is defined.
280
+
281
+ ## Changes
282
+ - Support service connector (#4)
283
+ - Support map and list input/output types from modeller (#5)
package/index.js CHANGED
@@ -246,7 +246,7 @@ function Engine(options = {}) {
246
246
  resolve(api);
247
247
  }
248
248
  function onError(err) {
249
- engine.removeListener(eventName, onError);
249
+ engine.removeListener(eventName, onEvent);
250
250
  reject(err);
251
251
  }
252
252
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bpmn-engine",
3
3
  "description": "BPMN 2.0 execution engine. Open source javascript workflow engine.",
4
- "version": "12.0.5",
4
+ "version": "13.0.2",
5
5
  "main": "index.js",
6
6
  "types": "types/bpmn-engine.d.ts",
7
7
  "repository": {
@@ -56,16 +56,16 @@
56
56
  "chronokinesis": "^3.0.0",
57
57
  "eslint": "^7.23.0",
58
58
  "markdown-toc": "^1.2.0",
59
- "mocha": "^9.1.1",
59
+ "mocha": "^9.1.2",
60
60
  "mocha-cakes-2": "^3.3.0",
61
61
  "nock": "^13.0.7",
62
62
  "nyc": "^15.1.0"
63
63
  },
64
64
  "dependencies": {
65
- "bpmn-elements": "^5.2.0",
65
+ "bpmn-elements": "^6.0.1",
66
66
  "bpmn-moddle": "^7.0.4",
67
67
  "debug": "^4.3.1",
68
68
  "moddle-context-serializer": "^1.1.1",
69
- "smqp": "^5.0.0"
69
+ "smqp": "^5.1.0"
70
70
  }
71
71
  }
@@ -218,7 +218,7 @@ declare module 'bpmn-engine' {
218
218
  /**
219
219
  * optional Logger factory, defaults to debug logger
220
220
  */
221
- Logger?: BpmnLogger;
221
+ Logger?: (scope: string) => BpmnLogger;
222
222
 
223
223
  /**
224
224
  * optional inline script handler, defaults to nodejs vm module handling, i.e. JavaScript