bpmn-engine 14.1.1 → 15.0.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 +5 -0
- package/index.js +3 -4
- package/lib/JavaScripts.js +0 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -189,7 +189,7 @@ Engine.prototype.addSource = function addSource({sourceContext: addContext} = {}
|
|
|
189
189
|
|
|
190
190
|
Engine.prototype.getDefinitions = async function getDefinitions(executeOptions) {
|
|
191
191
|
const loadedDefinitions = this[kLoadedDefinitions];
|
|
192
|
-
if (loadedDefinitions
|
|
192
|
+
if (loadedDefinitions?.length) return loadedDefinitions;
|
|
193
193
|
return this._loadDefinitions(executeOptions);
|
|
194
194
|
};
|
|
195
195
|
|
|
@@ -318,7 +318,6 @@ Execution.prototype._execute = function execute(executeOptions, callback) {
|
|
|
318
318
|
return result;
|
|
319
319
|
}, []);
|
|
320
320
|
|
|
321
|
-
|
|
322
321
|
if (!definitionExecutions.length) {
|
|
323
322
|
const error = new Error('No executable processes');
|
|
324
323
|
if (!callback) return this[kEngine].emit('error', error);
|
|
@@ -409,7 +408,7 @@ Execution.prototype._setup = function setup(setupOptions = {}) {
|
|
|
409
408
|
|
|
410
409
|
Execution.prototype._onChildMessage = function onChildMessage(routingKey, message, owner) {
|
|
411
410
|
const {environment: ownerEnvironment} = owner;
|
|
412
|
-
const listener = ownerEnvironment.options
|
|
411
|
+
const listener = ownerEnvironment.options?.listener;
|
|
413
412
|
this[kState] = 'running';
|
|
414
413
|
|
|
415
414
|
let newState;
|
|
@@ -540,7 +539,7 @@ Execution.prototype.getPostponed = function getPostponed() {
|
|
|
540
539
|
|
|
541
540
|
Execution.prototype.signal = function signal(payload, {ignoreSameDefinition} = {}) {
|
|
542
541
|
for (const definition of this[kExecuting]) {
|
|
543
|
-
if (ignoreSameDefinition && payload
|
|
542
|
+
if (ignoreSameDefinition && payload?.parent?.id === definition.id) continue;
|
|
544
543
|
definition.signal(payload);
|
|
545
544
|
}
|
|
546
545
|
};
|
package/lib/JavaScripts.js
CHANGED
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": "
|
|
4
|
+
"version": "15.0.0",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types/bpmn-engine.d.ts",
|
|
7
7
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/paed01"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
16
|
+
"node": ">=14"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"lib/",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"test": "mocha -R dot",
|
|
25
25
|
"posttest": "eslint . --cache && npm run toc",
|
|
26
|
-
"wintest": "
|
|
26
|
+
"wintest": "mocha",
|
|
27
27
|
"cov:html": "nyc mocha -R dot && nyc report --reporter=html",
|
|
28
28
|
"test:lcov": "nyc mocha -R dot && nyc report --reporter lcov && npm run posttest",
|
|
29
29
|
"toc": "node scripts/generate-api-toc ./docs/API.md,./docs/Examples.md",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"camunda-bpmn-moddle": "^6.1.2",
|
|
55
55
|
"chai": "^4.3.6",
|
|
56
56
|
"chronokinesis": "^3.0.0",
|
|
57
|
-
"eslint": "^
|
|
57
|
+
"eslint": "^8.21.0",
|
|
58
58
|
"markdown-toc": "^1.2.0",
|
|
59
|
-
"mocha": "^
|
|
59
|
+
"mocha": "^10.0.0",
|
|
60
60
|
"mocha-cakes-2": "^3.3.0",
|
|
61
61
|
"nock": "^13.2.9",
|
|
62
62
|
"nyc": "^15.1.0"
|