bpmn-engine 18.0.0 → 19.0.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/index.js +56 -69
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ # 19.0.1
5
+
6
+ - Patch [`bpmn-elements`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
7
+
8
+ # 19.0.0
9
+
10
+ Upgrade is recommended since nasty evergroving state size is fixed.
11
+
12
+ - Major bump [`bpmn-elements@13`](https://github.com/paed01/bpmn-elements/blob/master/CHANGELOG.md)
13
+ - remove enumerable flag on prototype properties
14
+
4
15
  # 18.0.0
5
16
 
6
17
  Only breaking if multi-instance sub-process executions are inspected after sub-process run is completed. Picture a multi-instance sequential sub-process with a cardinality of 100. One hundred items in a list occupies some memory. That will not stand. Consequently, they are now removed when iteration completes and eventually collected by gc.
package/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  const BpmnModdle = require('bpmn-moddle');
4
- const DebugLogger = require('./lib/Logger');
5
4
  const Elements = require('bpmn-elements');
6
- const getOptionsAndCallback = require('./lib/getOptionsAndCallback');
7
- const JavaScripts = require('./lib/JavaScripts');
8
- const ProcessOutputDataObject = require('./lib/extensions/ProcessOutputDataObject');
9
5
  const {Broker} = require('smqp');
10
6
  const {default: serializer, deserialize, TypeResolver} = require('moddle-context-serializer');
11
7
  const {EventEmitter} = require('events');
12
8
  const {version: engineVersion} = require('./package.json');
9
+ const DebugLogger = require('./lib/Logger.js');
10
+ const JavaScripts = require('./lib/JavaScripts.js');
11
+ const getOptionsAndCallback = require('./lib/getOptionsAndCallback.js');
12
+ const ProcessOutputDataObject = require('./lib/extensions/ProcessOutputDataObject.js');
13
13
 
14
14
  const kEngine = Symbol.for('engine');
15
15
  const kEnvironment = Symbol.for('environment');
@@ -65,54 +65,46 @@ function defaultTypeResolver(elementTypes) {
65
65
 
66
66
  Engine.prototype = Object.create(EventEmitter.prototype);
67
67
 
68
- Object.defineProperty(Engine.prototype, 'name', {
69
- enumerable: true,
70
- get() {
71
- return this.options.name;
72
- },
73
- set(value) {
74
- this.options.name = value;
68
+ Object.defineProperties(Engine.prototype, {
69
+ name: {
70
+ get() {
71
+ return this.options.name;
72
+ },
73
+ set(value) {
74
+ this.options.name = value;
75
+ },
75
76
  },
76
- });
77
-
78
- Object.defineProperty(Engine.prototype, 'environment', {
79
- enumerable: true,
80
- get() {
81
- return this[kEnvironment];
77
+ environment: {
78
+ get() {
79
+ return this[kEnvironment];
80
+ },
82
81
  },
83
- });
84
-
85
- Object.defineProperty(Engine.prototype, 'state', {
86
- enumerable: true,
87
- get() {
88
- const execution = this.execution;
89
- if (execution) return execution.state;
90
- return 'idle';
82
+ state: {
83
+ get() {
84
+ const execution = this.execution;
85
+ if (execution) return execution.state;
86
+ return 'idle';
87
+ },
91
88
  },
92
- });
93
-
94
- Object.defineProperty(Engine.prototype, 'stopped', {
95
- enumerable: true,
96
- get() {
97
- const execution = this.execution;
98
- if (execution) return execution.stopped;
99
- return false;
89
+ stopped: {
90
+ get() {
91
+ const execution = this.execution;
92
+ if (execution) return execution.stopped;
93
+ return false;
94
+ },
100
95
  },
101
- });
102
-
103
- Object.defineProperty(Engine.prototype, 'execution', {
104
- enumerable: true,
105
- get() {
106
- return this[kExecution];
96
+ execution: {
97
+ enumerable: true,
98
+ get() {
99
+ return this[kExecution];
100
+ },
107
101
  },
108
- });
109
-
110
- Object.defineProperty(Engine.prototype, 'activityStatus', {
111
- enumerable: true,
112
- get() {
113
- const execution = this.execution;
114
- if (execution) return execution.activityStatus;
115
- return 'idle';
102
+ activityStatus: {
103
+ get() {
104
+ const execution = this.execution;
105
+ if (execution) return execution.activityStatus;
106
+ return 'idle';
107
+ },
116
108
  },
117
109
  });
118
110
 
@@ -287,31 +279,26 @@ function Execution(engine, definitions, options, isRecovered = false) {
287
279
  engine.broker.on('return', onBrokerReturn);
288
280
  }
289
281
 
290
- Object.defineProperty(Execution.prototype, 'state', {
291
- enumerable: true,
292
- get() {
293
- return this[kState];
282
+ Object.defineProperties(Execution.prototype, {
283
+ state: {
284
+ get() {
285
+ return this[kState];
286
+ },
294
287
  },
295
- });
296
-
297
- Object.defineProperty(Execution.prototype, 'stopped', {
298
- enumerable: true,
299
- get() {
300
- return this[kStopped];
288
+ stopped: {
289
+ get() {
290
+ return this[kStopped];
291
+ },
301
292
  },
302
- });
303
-
304
- Object.defineProperty(Execution.prototype, 'broker', {
305
- enumerable: true,
306
- get() {
307
- return this[kEngine].broker;
293
+ broker: {
294
+ get() {
295
+ return this[kEngine].broker;
296
+ },
308
297
  },
309
- });
310
-
311
- Object.defineProperty(Execution.prototype, 'environment', {
312
- enumerable: true,
313
- get() {
314
- return this[kEnvironment];
298
+ environment: {
299
+ get() {
300
+ return this[kEnvironment];
301
+ },
315
302
  },
316
303
  });
317
304
 
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": "18.0.0",
4
+ "version": "19.0.1",
5
5
  "main": "index.js",
6
6
  "types": "types/bpmn-engine.d.ts",
7
7
  "repository": {
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "devDependencies": {
49
49
  "bent": "^7.3.12",
50
- "c8": "^8.0.0",
50
+ "c8": "^9.1.0",
51
51
  "camunda-bpmn-moddle": "^7.0.1",
52
52
  "chai": "^4.3.7",
53
53
  "chronokinesis": "^6.0.0",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@types/bpmn-moddle": "^5.1.6",
62
- "bpmn-elements": "^12.0.0",
62
+ "bpmn-elements": "^13.1.2",
63
63
  "bpmn-moddle": "^8.0.1",
64
64
  "debug": "^4.3.4",
65
65
  "moddle-context-serializer": "^4.0.0",