bpmn-elements 16.0.0 → 16.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.
@@ -95,7 +95,7 @@ Environment.prototype.assignVariables = function assignVariables(newVars) {
95
95
  ...newVars
96
96
  };
97
97
  };
98
- Environment.prototype.assignSettings = function assignVariables(newSettings) {
98
+ Environment.prototype.assignSettings = function assignSettings(newSettings) {
99
99
  if (!newSettings || typeof newSettings !== 'object') return;
100
100
  this.settings = {
101
101
  ...this.settings,
package/dist/Scripts.js CHANGED
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Scripts = Scripts;
7
7
  function Scripts() {}
8
- Scripts.prototype.getScript = function getScript( /*scriptType, activity*/) {};
9
- Scripts.prototype.register = function register( /*activity*/) {};
8
+ Scripts.prototype.getScript = function getScript(/*scriptType, activity*/) {};
9
+ Scripts.prototype.register = function register(/*activity*/) {};
@@ -124,6 +124,8 @@ TimerEventDefinition.prototype._completed = function completed(completeContent,
124
124
  ...content,
125
125
  repeat
126
126
  }), options);
127
+ } else if (timerContent.repeat === -1) {
128
+ broker.publish('execution', 'execute.repeat', (0, _messageHelper.cloneContent)(timerContent, content), options);
127
129
  }
128
130
  broker.publish('execution', 'execute.completed', (0, _messageHelper.cloneContent)(timerContent, content), options);
129
131
  };
@@ -72,7 +72,9 @@ BoundaryEventBehaviour.prototype.execute = function execute(executeMessage) {
72
72
  });
73
73
  broker.bindQueue(execQ.name, 'execution', 'execute.detach');
74
74
  broker.bindQueue(execQ.name, 'execution', 'execute.bound.completed');
75
- broker.bindQueue(execQ.name, 'execution', 'execute.repeat');
75
+ if (!this.cancelActivity) {
76
+ broker.bindQueue(execQ.name, 'execution', 'execute.repeat');
77
+ }
76
78
  if (eventDefinitionExecution && !this.environment.settings.strict) {
77
79
  broker.bindQueue(execQ.name, 'execution', 'execute.expect');
78
80
  }
@@ -218,7 +220,6 @@ BoundaryEventBehaviour.prototype._onApiMessage = function onApiMessage(_, messag
218
220
  }
219
221
  };
220
222
  BoundaryEventBehaviour.prototype._onRepeatMessage = function onRepeatMessage(_, message) {
221
- if (this.cancelActivity) return;
222
223
  const executeMessage = this[kExecuteMessage];
223
224
  const repeat = message.content.repeat;
224
225
  this.broker.getQueue('inbound-q').queueMessage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-elements",
3
- "version": "16.0.0",
3
+ "version": "16.1.0",
4
4
  "description": "Executable workflow elements based on BPMN 2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -103,7 +103,7 @@
103
103
  "texample": "^0.0.6"
104
104
  },
105
105
  "dependencies": {
106
- "@0dep/piso": "^2.0.0",
106
+ "@0dep/piso": "^2.0.2",
107
107
  "smqp": "^9.0.2"
108
108
  }
109
109
  }
@@ -88,7 +88,7 @@ Environment.prototype.assignVariables = function assignVariables(newVars) {
88
88
  };
89
89
  };
90
90
 
91
- Environment.prototype.assignSettings = function assignVariables(newSettings) {
91
+ Environment.prototype.assignSettings = function assignSettings(newSettings) {
92
92
  if (!newSettings || typeof newSettings !== 'object') return;
93
93
 
94
94
  this.settings = {
@@ -125,6 +125,8 @@ TimerEventDefinition.prototype._completed = function completed(completeContent,
125
125
  if (timerContent.repeat > 1) {
126
126
  const repeat = timerContent.repeat - 1;
127
127
  broker.publish('execution', 'execute.repeat', cloneContent(timerContent, { ...content, repeat }), options);
128
+ } else if (timerContent.repeat === -1) {
129
+ broker.publish('execution', 'execute.repeat', cloneContent(timerContent, content), options);
128
130
  }
129
131
 
130
132
  broker.publish('execution', 'execute.completed', cloneContent(timerContent, content), options);
@@ -69,7 +69,11 @@ BoundaryEventBehaviour.prototype.execute = function execute(executeMessage) {
69
69
  const execQ = broker.assertQueue(`_bound-execution-${executionId}`, { durable: false, autoDelete: true });
70
70
  broker.bindQueue(execQ.name, 'execution', 'execute.detach');
71
71
  broker.bindQueue(execQ.name, 'execution', 'execute.bound.completed');
72
- broker.bindQueue(execQ.name, 'execution', 'execute.repeat');
72
+
73
+ if (!this.cancelActivity) {
74
+ broker.bindQueue(execQ.name, 'execution', 'execute.repeat');
75
+ }
76
+
73
77
  if (eventDefinitionExecution && !this.environment.settings.strict) {
74
78
  broker.bindQueue(execQ.name, 'execution', 'execute.expect');
75
79
  }
@@ -226,7 +230,6 @@ BoundaryEventBehaviour.prototype._onApiMessage = function onApiMessage(_, messag
226
230
  };
227
231
 
228
232
  BoundaryEventBehaviour.prototype._onRepeatMessage = function onRepeatMessage(_, message) {
229
- if (this.cancelActivity) return;
230
233
  const executeMessage = this[kExecuteMessage];
231
234
  const repeat = message.content.repeat;
232
235
  this.broker