bpmn-engine 24.0.0 → 24.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.
- package/lib/index.cjs +10 -1
- package/package.json +2 -2
- package/src/index.js +10 -1
package/lib/index.cjs
CHANGED
|
@@ -280,6 +280,12 @@ Engine.prototype.stop = function stop() {
|
|
|
280
280
|
};
|
|
281
281
|
|
|
282
282
|
Engine.prototype.recover = function recover(savedState, recoverOptions) {
|
|
283
|
+
if (this[kExecution]?.isRunning) {
|
|
284
|
+
this.logger.error('recover during running execution will be deprecated next major version');
|
|
285
|
+
this.logger.debug(`<${this.name}> stopping current running execution`);
|
|
286
|
+
this[kExecution].stop();
|
|
287
|
+
}
|
|
288
|
+
|
|
283
289
|
if (!savedState) return this;
|
|
284
290
|
|
|
285
291
|
let name = this.name;
|
|
@@ -287,7 +293,10 @@ Engine.prototype.recover = function recover(savedState, recoverOptions) {
|
|
|
287
293
|
|
|
288
294
|
this.logger.debug(`<${name}> recover`);
|
|
289
295
|
|
|
290
|
-
if (recoverOptions)
|
|
296
|
+
if (recoverOptions) {
|
|
297
|
+
this[kEnvironment] = this[kEnvironment].clone(recoverOptions);
|
|
298
|
+
}
|
|
299
|
+
|
|
291
300
|
if (savedState.environment) this[kEnvironment] = this[kEnvironment].recover(savedState.environment);
|
|
292
301
|
|
|
293
302
|
if (!savedState.definitions) return this;
|
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": "24.0.
|
|
4
|
+
"version": "24.0.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./src/index.js",
|
|
7
7
|
"main": "./lib/index.cjs",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"mocha-cakes-2": "^3.3.0",
|
|
67
67
|
"prettier": "^3.2.5",
|
|
68
68
|
"rollup": "^4.10.0",
|
|
69
|
-
"texample": "^0.0.
|
|
69
|
+
"texample": "^0.0.7"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"bpmn-elements": "^17.0.0",
|
package/src/index.js
CHANGED
|
@@ -134,6 +134,12 @@ Engine.prototype.stop = function stop() {
|
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
Engine.prototype.recover = function recover(savedState, recoverOptions) {
|
|
137
|
+
if (this[kExecution]?.isRunning) {
|
|
138
|
+
this.logger.error('recover during running execution will be deprecated next major version');
|
|
139
|
+
this.logger.debug(`<${this.name}> stopping current running execution`);
|
|
140
|
+
this[kExecution].stop();
|
|
141
|
+
}
|
|
142
|
+
|
|
137
143
|
if (!savedState) return this;
|
|
138
144
|
|
|
139
145
|
let name = this.name;
|
|
@@ -141,7 +147,10 @@ Engine.prototype.recover = function recover(savedState, recoverOptions) {
|
|
|
141
147
|
|
|
142
148
|
this.logger.debug(`<${name}> recover`);
|
|
143
149
|
|
|
144
|
-
if (recoverOptions)
|
|
150
|
+
if (recoverOptions) {
|
|
151
|
+
this[kEnvironment] = this[kEnvironment].clone(recoverOptions);
|
|
152
|
+
}
|
|
153
|
+
|
|
145
154
|
if (savedState.environment) this[kEnvironment] = this[kEnvironment].recover(savedState.environment);
|
|
146
155
|
|
|
147
156
|
if (!savedState.definitions) return this;
|