bpmn-elements 8.2.4 → 9.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.
Files changed (123) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{src/Api.js → Api.js} +11 -12
  3. package/dist/{src/Context.js → Context.js} +26 -27
  4. package/dist/{src/Environment.js → Environment.js} +15 -16
  5. package/dist/{src/EventBroker.js → EventBroker.js} +1 -1
  6. package/dist/{src/Expressions.js → Expressions.js} +1 -1
  7. package/dist/{src/MessageFormatter.js → MessageFormatter.js} +3 -3
  8. package/dist/{src/activity → activity}/Activity.js +62 -63
  9. package/dist/{src/activity → activity}/ActivityExecution.js +23 -24
  10. package/dist/{src/activity → activity}/Dummy.js +1 -1
  11. package/dist/{src/activity → activity}/ExecutionScope.js +2 -2
  12. package/dist/{src/definition → definition}/Definition.js +41 -42
  13. package/dist/{src/definition → definition}/DefinitionExecution.js +45 -46
  14. package/dist/{src/error → error}/Errors.js +1 -1
  15. package/dist/{src/eventDefinitions → eventDefinitions}/CancelEventDefinition.js +12 -13
  16. package/dist/{src/eventDefinitions → eventDefinitions}/CompensateEventDefinition.js +12 -13
  17. package/dist/{src/eventDefinitions → eventDefinitions}/ConditionalEventDefinition.js +13 -14
  18. package/dist/{src/eventDefinitions → eventDefinitions}/ErrorEventDefinition.js +13 -14
  19. package/dist/{src/eventDefinitions → eventDefinitions}/EscalationEventDefinition.js +12 -13
  20. package/dist/{src/eventDefinitions → eventDefinitions}/EventDefinitionExecution.js +10 -11
  21. package/dist/{src/eventDefinitions → eventDefinitions}/LinkEventDefinition.js +14 -15
  22. package/dist/{src/eventDefinitions → eventDefinitions}/MessageEventDefinition.js +13 -14
  23. package/dist/{src/eventDefinitions → eventDefinitions}/SignalEventDefinition.js +13 -14
  24. package/dist/{src/eventDefinitions → eventDefinitions}/TerminateEventDefinition.js +1 -1
  25. package/dist/{src/eventDefinitions → eventDefinitions}/TimerEventDefinition.js +15 -16
  26. package/dist/{src/events → events}/BoundaryEvent.js +15 -16
  27. package/dist/{src/events → events}/EndEvent.js +3 -3
  28. package/dist/{src/events → events}/IntermediateCatchEvent.js +3 -3
  29. package/dist/{src/events → events}/IntermediateThrowEvent.js +3 -3
  30. package/dist/{src/events → events}/StartEvent.js +8 -9
  31. package/dist/{src/flows → flows}/Association.js +15 -16
  32. package/dist/{src/flows → flows}/MessageFlow.js +16 -14
  33. package/dist/{src/flows → flows}/SequenceFlow.js +16 -18
  34. package/dist/{src/gateways → gateways}/EventBasedGateway.js +2 -2
  35. package/dist/{src/gateways → gateways}/ExclusiveGateway.js +2 -2
  36. package/dist/{src/gateways → gateways}/InclusiveGateway.js +2 -2
  37. package/dist/{src/gateways → gateways}/ParallelGateway.js +2 -2
  38. package/dist/index.js +48 -48
  39. package/dist/{src/io → io}/InputOutputSpecification.js +8 -9
  40. package/dist/{src/io → io}/Properties.js +7 -8
  41. package/dist/package.json +3 -0
  42. package/dist/{src/process → process}/Process.js +39 -40
  43. package/dist/{src/process → process}/ProcessExecution.js +42 -43
  44. package/dist/{src/tasks → tasks}/CallActivity.js +7 -8
  45. package/dist/{src/tasks → tasks}/LoopCharacteristics.js +2 -2
  46. package/dist/{src/tasks → tasks}/ReceiveTask.js +14 -15
  47. package/dist/{src/tasks → tasks}/ScriptTask.js +4 -4
  48. package/dist/{src/tasks → tasks}/ServiceImplementation.js +1 -1
  49. package/dist/{src/tasks → tasks}/ServiceTask.js +6 -7
  50. package/dist/{src/tasks → tasks}/SignalTask.js +7 -8
  51. package/dist/{src/tasks → tasks}/StandardLoopCharacteristics.js +1 -1
  52. package/dist/{src/tasks → tasks}/SubProcess.js +17 -18
  53. package/dist/{src/tasks → tasks}/Task.js +2 -2
  54. package/dist/{src/tasks → tasks}/Transaction.js +1 -1
  55. package/package.json +30 -30
  56. package/src/Api.js +11 -13
  57. package/src/Context.js +26 -28
  58. package/src/Environment.js +15 -17
  59. package/src/EventBroker.js +1 -1
  60. package/src/Expressions.js +1 -1
  61. package/src/MessageFormatter.js +3 -3
  62. package/src/activity/Activity.js +62 -64
  63. package/src/activity/ActivityExecution.js +23 -25
  64. package/src/activity/Dummy.js +1 -1
  65. package/src/activity/ExecutionScope.js +2 -2
  66. package/src/definition/Definition.js +41 -43
  67. package/src/definition/DefinitionExecution.js +45 -47
  68. package/src/error/Errors.js +1 -1
  69. package/src/eventDefinitions/CancelEventDefinition.js +12 -14
  70. package/src/eventDefinitions/CompensateEventDefinition.js +12 -14
  71. package/src/eventDefinitions/ConditionalEventDefinition.js +13 -15
  72. package/src/eventDefinitions/ErrorEventDefinition.js +13 -15
  73. package/src/eventDefinitions/EscalationEventDefinition.js +12 -14
  74. package/src/eventDefinitions/EventDefinitionExecution.js +10 -12
  75. package/src/eventDefinitions/LinkEventDefinition.js +14 -16
  76. package/src/eventDefinitions/MessageEventDefinition.js +13 -15
  77. package/src/eventDefinitions/SignalEventDefinition.js +13 -15
  78. package/src/eventDefinitions/TerminateEventDefinition.js +1 -1
  79. package/src/eventDefinitions/TimerEventDefinition.js +15 -17
  80. package/src/events/BoundaryEvent.js +15 -17
  81. package/src/events/EndEvent.js +3 -3
  82. package/src/events/IntermediateCatchEvent.js +3 -3
  83. package/src/events/IntermediateThrowEvent.js +3 -3
  84. package/src/events/StartEvent.js +8 -10
  85. package/src/flows/Association.js +15 -17
  86. package/src/flows/MessageFlow.js +14 -15
  87. package/src/flows/SequenceFlow.js +16 -20
  88. package/src/gateways/EventBasedGateway.js +2 -2
  89. package/src/gateways/ExclusiveGateway.js +2 -2
  90. package/src/gateways/InclusiveGateway.js +2 -2
  91. package/src/gateways/ParallelGateway.js +2 -2
  92. package/src/index.js +106 -0
  93. package/src/io/InputOutputSpecification.js +8 -10
  94. package/src/io/Properties.js +7 -9
  95. package/src/process/Process.js +39 -41
  96. package/src/process/ProcessExecution.js +42 -44
  97. package/src/tasks/CallActivity.js +7 -9
  98. package/src/tasks/LoopCharacteristics.js +2 -2
  99. package/src/tasks/ReceiveTask.js +215 -217
  100. package/src/tasks/ScriptTask.js +4 -4
  101. package/src/tasks/ServiceImplementation.js +1 -1
  102. package/src/tasks/ServiceTask.js +6 -8
  103. package/src/tasks/SignalTask.js +7 -9
  104. package/src/tasks/StandardLoopCharacteristics.js +1 -1
  105. package/src/tasks/SubProcess.js +17 -19
  106. package/src/tasks/Task.js +2 -2
  107. package/src/tasks/Transaction.js +1 -1
  108. package/types/index.d.ts +491 -0
  109. package/index.js +0 -106
  110. /package/dist/{src/ExtensionsMapper.js → ExtensionsMapper.js} +0 -0
  111. /package/dist/{src/Scripts.js → Scripts.js} +0 -0
  112. /package/dist/{src/Timers.js → Timers.js} +0 -0
  113. /package/dist/{src/activity → activity}/Escalation.js +0 -0
  114. /package/dist/{src/activity → activity}/Message.js +0 -0
  115. /package/dist/{src/activity → activity}/Signal.js +0 -0
  116. /package/dist/{src/error → error}/BpmnError.js +0 -0
  117. /package/dist/{src/getPropertyValue.js → getPropertyValue.js} +0 -0
  118. /package/dist/{src/io → io}/BpmnIO.js +0 -0
  119. /package/dist/{src/io → io}/EnvironmentDataObject.js +0 -0
  120. /package/dist/{src/io → io}/EnvironmentDataStore.js +0 -0
  121. /package/dist/{src/io → io}/EnvironmentDataStoreReference.js +0 -0
  122. /package/dist/{src/messageHelper.js → messageHelper.js} +0 -0
  123. /package/dist/{src/shared.js → shared.js} +0 -0
@@ -1,6 +1,7 @@
1
- import {brokerSafeId} from '../shared';
2
- import {cloneParent} from '../messageHelper';
3
- import {MessageFlowBroker} from '../EventBroker';
1
+ import {brokerSafeId} from '../shared.js';
2
+ import {cloneParent} from '../messageHelper.js';
3
+ import {MessageFlowBroker} from '../EventBroker.js';
4
+ import {Api} from '../Api.js';
4
5
 
5
6
  const kCounters = Symbol.for('counters');
6
7
  const kSourceElement = Symbol.for('sourceElement');
@@ -33,16 +34,14 @@ export default function MessageFlow(flowDef, context) {
33
34
  this.logger = context.environment.Logger(type.toLowerCase());
34
35
  }
35
36
 
36
- const proto = MessageFlow.prototype;
37
-
38
- Object.defineProperty(proto, 'counters', {
37
+ Object.defineProperty(MessageFlow.prototype, 'counters', {
39
38
  enumerable: true,
40
39
  get() {
41
40
  return {...this[kCounters]};
42
41
  },
43
42
  });
44
43
 
45
- proto.getState = function getState() {
44
+ MessageFlow.prototype.getState = function getState() {
46
45
  return {
47
46
  id: this.id,
48
47
  type: this.type,
@@ -50,37 +49,37 @@ proto.getState = function getState() {
50
49
  };
51
50
  };
52
51
 
53
- proto.recover = function recover(state) {
52
+ MessageFlow.prototype.recover = function recover(state) {
54
53
  Object.assign(this[kCounters], state.counters);
55
54
  };
56
55
 
57
- proto.getApi = function getApi() {
58
- return this;
56
+ MessageFlow.prototype.getApi = function getApi(message) {
57
+ return new Api('message', this.broker, message || {content: this._createMessageContent()});
59
58
  };
60
59
 
61
- proto.activate = function activate() {
60
+ MessageFlow.prototype.activate = function activate() {
62
61
  const sourceElement = this[kSourceElement];
63
62
  const safeId = brokerSafeId(this.id);
64
63
  sourceElement.on('message', this.deactivate.bind(this), {consumerTag: `_message-on-message-${safeId}`});
65
64
  sourceElement.on('end', this._onSourceEnd.bind(this), {consumerTag: `_message-on-end-${safeId}`});
66
65
  };
67
66
 
68
- proto.deactivate = function deactivate() {
67
+ MessageFlow.prototype.deactivate = function deactivate() {
69
68
  const sourceElement = this[kSourceElement];
70
69
  const safeId = brokerSafeId(this.id);
71
70
  sourceElement.broker.cancel(`_message-on-end-${safeId}`);
72
71
  sourceElement.broker.cancel(`_message-on-message-${safeId}`);
73
72
  };
74
73
 
75
- proto._onSourceEnd = function onSourceEnd({content}) {
74
+ MessageFlow.prototype._onSourceEnd = function onSourceEnd({content}) {
76
75
  ++this[kCounters].messages;
77
76
  const source = this.source;
78
77
  const target = this.target;
79
78
  this.logger.debug(`<${this.id}> sending message from <${source.processId}.${source.id}> to <${target.id ? `${target.processId}.${target.id}` : target.processId}>`);
80
- this.broker.publish('event', 'message.outbound', this._createMessage(content.message));
79
+ this.broker.publish('event', 'message.outbound', this._createMessageContent(content.message));
81
80
  };
82
81
 
83
- proto._createMessage = function createMessage(message) {
82
+ MessageFlow.prototype._createMessageContent = function createMessage(message) {
84
83
  return {
85
84
  id: this.id,
86
85
  type: this.type,
@@ -1,8 +1,8 @@
1
- import ExecutionScope from '../activity/ExecutionScope';
2
- import {cloneParent, cloneContent} from '../messageHelper';
3
- import {getUniqueId} from '../shared';
4
- import {EventBroker} from '../EventBroker';
5
- import {FlowApi} from '../Api';
1
+ import ExecutionScope from '../activity/ExecutionScope.js';
2
+ import {cloneParent, cloneContent} from '../messageHelper.js';
3
+ import {getUniqueId} from '../shared.js';
4
+ import {EventBroker} from '../EventBroker.js';
5
+ import {FlowApi} from '../Api.js';
6
6
 
7
7
  const kCounters = Symbol.for('counters');
8
8
 
@@ -40,18 +40,14 @@ function SequenceFlow(flowDef, {environment}) {
40
40
  logger.debug(`<${id}> init, <${sourceId}> -> <${targetId}>`);
41
41
  }
42
42
 
43
- const proto = SequenceFlow.prototype;
44
-
45
- Object.defineProperty(proto, 'counters', {
43
+ Object.defineProperty(SequenceFlow.prototype, 'counters', {
46
44
  enumerable: true,
47
45
  get() {
48
46
  return {...this[kCounters]};
49
47
  },
50
48
  });
51
49
 
52
- proto.take = function take(content = {}) {
53
- this.looped = undefined;
54
-
50
+ SequenceFlow.prototype.take = function take(content = {}) {
55
51
  const {sequenceId} = content;
56
52
 
57
53
  this.logger.debug(`<${sequenceId} (${this.id})> take, target <${this.targetId}>`);
@@ -62,7 +58,7 @@ proto.take = function take(content = {}) {
62
58
  return true;
63
59
  };
64
60
 
65
- proto.discard = function discard(content = {}) {
61
+ SequenceFlow.prototype.discard = function discard(content = {}) {
66
62
  const {sequenceId = getUniqueId(this.id)} = content;
67
63
  const discardSequence = content.discardSequence = (content.discardSequence || []).slice();
68
64
  if (discardSequence.indexOf(this.targetId) > -1) {
@@ -78,27 +74,27 @@ proto.discard = function discard(content = {}) {
78
74
  this._publishEvent('discard', content);
79
75
  };
80
76
 
81
- proto.getState = function getState() {
77
+ SequenceFlow.prototype.getState = function getState() {
82
78
  return this.createMessage({
83
79
  counters: this.counters,
84
80
  broker: this.broker.getState(true),
85
81
  });
86
82
  };
87
83
 
88
- proto.recover = function recover(state) {
84
+ SequenceFlow.prototype.recover = function recover(state) {
89
85
  Object.assign(this[kCounters], state.counters);
90
86
  this.broker.recover(state.broker);
91
87
  };
92
88
 
93
- proto.getApi = function getApi(message) {
89
+ SequenceFlow.prototype.getApi = function getApi(message) {
94
90
  return FlowApi(this.broker, message || {content: this.createMessage()});
95
91
  };
96
92
 
97
- proto.stop = function stop() {
93
+ SequenceFlow.prototype.stop = function stop() {
98
94
  this.broker.stop();
99
95
  };
100
96
 
101
- proto.shake = function shake(message) {
97
+ SequenceFlow.prototype.shake = function shake(message) {
102
98
  const content = cloneContent(message.content);
103
99
  content.sequence = content.sequence || [];
104
100
  content.sequence.push({id: this.id, type: this.type, isSequenceFlow: true, targetId: this.targetId});
@@ -112,7 +108,7 @@ proto.shake = function shake(message) {
112
108
  this.broker.publish('event', 'flow.shake', content, {persistent: false, type: 'shake'});
113
109
  };
114
110
 
115
- proto.getCondition = function getCondition() {
111
+ SequenceFlow.prototype.getCondition = function getCondition() {
116
112
  const conditionExpression = this.behaviour.conditionExpression;
117
113
  if (!conditionExpression) return null;
118
114
 
@@ -130,7 +126,7 @@ proto.getCondition = function getCondition() {
130
126
  return new ExpressionCondition(this, conditionExpression.body);
131
127
  };
132
128
 
133
- proto.createMessage = function createMessage(override) {
129
+ SequenceFlow.prototype.createMessage = function createMessage(override) {
134
130
  return {
135
131
  ...override,
136
132
  id: this.id,
@@ -144,7 +140,7 @@ proto.createMessage = function createMessage(override) {
144
140
  };
145
141
  };
146
142
 
147
- proto._publishEvent = function publishEvent(action, content) {
143
+ SequenceFlow.prototype._publishEvent = function publishEvent(action, content) {
148
144
  const eventContent = this.createMessage({
149
145
  action,
150
146
  ...content,
@@ -1,5 +1,5 @@
1
- import Activity from '../activity/Activity';
2
- import {cloneContent} from '../messageHelper';
1
+ import Activity from '../activity/Activity.js';
2
+ import {cloneContent} from '../messageHelper.js';
3
3
 
4
4
  const kCompleted = Symbol.for('completed');
5
5
  const kTargets = Symbol.for('targets');
@@ -1,5 +1,5 @@
1
- import Activity from '../activity/Activity';
2
- import {cloneContent} from '../messageHelper';
1
+ import Activity from '../activity/Activity.js';
2
+ import {cloneContent} from '../messageHelper.js';
3
3
 
4
4
  export default function ExclusiveGateway(activityDef, context) {
5
5
  return new Activity(ExclusiveGatewayBehaviour, activityDef, context);
@@ -1,5 +1,5 @@
1
- import Activity from '../activity/Activity';
2
- import {cloneContent} from '../messageHelper';
1
+ import Activity from '../activity/Activity.js';
2
+ import {cloneContent} from '../messageHelper.js';
3
3
 
4
4
  export default function InclusiveGateway(activityDef, context) {
5
5
  return new Activity(InclusiveGatewayBehaviour, activityDef, context);
@@ -1,5 +1,5 @@
1
- import Activity from '../activity/Activity';
2
- import {cloneContent} from '../messageHelper';
1
+ import Activity from '../activity/Activity.js';
2
+ import {cloneContent} from '../messageHelper.js';
3
3
 
4
4
  export default function ParallelGateway(activityDef, context) {
5
5
  return new Activity(ParallelGatewayBehaviour, {...activityDef, isParallelGateway: true}, context);
package/src/index.js ADDED
@@ -0,0 +1,106 @@
1
+ import Activity from './activity/Activity.js';
2
+ import Association from './flows/Association.js';
3
+ import BoundaryEvent from './events/BoundaryEvent.js';
4
+ import BpmnError from './error/BpmnError.js';
5
+ import CallActivity from './tasks/CallActivity.js';
6
+ import CancelEventDefinition from './eventDefinitions/CancelEventDefinition.js';
7
+ import CompensateEventDefinition from './eventDefinitions/CompensateEventDefinition.js';
8
+ import ConditionalEventDefinition from './eventDefinitions/ConditionalEventDefinition.js';
9
+ import Context from './Context.js';
10
+ import DataObject from './io/EnvironmentDataObject.js';
11
+ import DataStore from './io/EnvironmentDataStore.js';
12
+ import DataStoreReference from './io/EnvironmentDataStoreReference.js';
13
+ import Definition from './definition/Definition.js';
14
+ import Dummy from './activity/Dummy.js';
15
+ import EndEvent from './events/EndEvent.js';
16
+ import Environment from './Environment.js';
17
+ import ErrorEventDefinition from './eventDefinitions/ErrorEventDefinition.js';
18
+ import Escalation from './activity/Escalation.js';
19
+ import EscalationEventDefinition from './eventDefinitions/EscalationEventDefinition.js';
20
+ import EventBasedGateway from './gateways/EventBasedGateway.js';
21
+ import ExclusiveGateway from './gateways/ExclusiveGateway.js';
22
+ import InclusiveGateway from './gateways/InclusiveGateway.js';
23
+ import InputOutputSpecification from './io/InputOutputSpecification.js';
24
+ import IntermediateCatchEvent from './events/IntermediateCatchEvent.js';
25
+ import IntermediateThrowEvent from './events/IntermediateThrowEvent.js';
26
+ import LinkEventDefinition from './eventDefinitions/LinkEventDefinition.js';
27
+ import LoopCharacteristics from './tasks/LoopCharacteristics.js';
28
+ import Message from './activity/Message.js';
29
+ import MessageEventDefinition from './eventDefinitions/MessageEventDefinition.js';
30
+ import MessageFlow from './flows/MessageFlow.js';
31
+ import ParallelGateway from './gateways/ParallelGateway.js';
32
+ import Process from './process/Process.js';
33
+ import Properties from './io/Properties.js';
34
+ import ReceiveTask from './tasks/ReceiveTask.js';
35
+ import ScriptTask from './tasks/ScriptTask.js';
36
+ import SequenceFlow from './flows/SequenceFlow.js';
37
+ import ServiceImplementation from './tasks/ServiceImplementation.js';
38
+ import ServiceTask from './tasks/ServiceTask.js';
39
+ import Signal from './activity/Signal.js';
40
+ import SignalEventDefinition from './eventDefinitions/SignalEventDefinition.js';
41
+ import SignalTask from './tasks/SignalTask.js';
42
+ import StandardLoopCharacteristics from './tasks/StandardLoopCharacteristics.js';
43
+ import StartEvent from './events/StartEvent.js';
44
+ import SubProcess from './tasks/SubProcess.js';
45
+ import Task from './tasks/Task.js';
46
+ import TerminateEventDefinition from './eventDefinitions/TerminateEventDefinition.js';
47
+ import TimerEventDefinition from './eventDefinitions/TimerEventDefinition.js';
48
+ import Transaction from './tasks/Transaction.js';
49
+
50
+ export {
51
+ Association,
52
+ Activity,
53
+ BoundaryEvent,
54
+ BpmnError,
55
+ CallActivity,
56
+ CancelEventDefinition,
57
+ CompensateEventDefinition,
58
+ ConditionalEventDefinition,
59
+ Context,
60
+ DataObject,
61
+ DataStore,
62
+ DataStoreReference,
63
+ Definition,
64
+ Dummy,
65
+ Dummy as TextAnnotation,
66
+ Dummy as Group,
67
+ Dummy as Category,
68
+ EndEvent,
69
+ Environment,
70
+ ErrorEventDefinition,
71
+ Escalation,
72
+ EscalationEventDefinition,
73
+ EventBasedGateway,
74
+ ExclusiveGateway,
75
+ InclusiveGateway,
76
+ InputOutputSpecification,
77
+ IntermediateCatchEvent,
78
+ IntermediateThrowEvent,
79
+ LinkEventDefinition,
80
+ Message,
81
+ MessageEventDefinition,
82
+ MessageFlow,
83
+ LoopCharacteristics as MultiInstanceLoopCharacteristics,
84
+ ParallelGateway,
85
+ Process,
86
+ Properties,
87
+ ReceiveTask,
88
+ ScriptTask,
89
+ SequenceFlow,
90
+ ServiceImplementation,
91
+ ServiceTask as SendTask,
92
+ ServiceTask as BusinessRuleTask,
93
+ ServiceTask,
94
+ Signal,
95
+ SignalEventDefinition,
96
+ SignalTask as ManualTask,
97
+ SignalTask as UserTask,
98
+ SignalTask,
99
+ StandardLoopCharacteristics,
100
+ StartEvent,
101
+ SubProcess,
102
+ Task,
103
+ TerminateEventDefinition,
104
+ TimerEventDefinition,
105
+ Transaction,
106
+ };
@@ -1,5 +1,5 @@
1
- import getPropertyValue from '../getPropertyValue';
2
- import {brokerSafeId} from '../shared';
1
+ import getPropertyValue from '../getPropertyValue.js';
2
+ import {brokerSafeId} from '../shared.js';
3
3
 
4
4
  const kConsuming = Symbol.for('consuming');
5
5
 
@@ -13,9 +13,7 @@ export default function IoSpecification(activity, ioSpecificationDef, context) {
13
13
  this.context = context;
14
14
  }
15
15
 
16
- const proto = IoSpecification.prototype;
17
-
18
- proto.activate = function activate(message) {
16
+ IoSpecification.prototype.activate = function activate(message) {
19
17
  if (this[kConsuming]) return;
20
18
  if (message && message.fields.redelivered && message.fields.routingKey === 'run.start') {
21
19
  this._onFormatEnter();
@@ -26,11 +24,11 @@ proto.activate = function activate(message) {
26
24
  this[kConsuming] = this.broker.subscribeTmp('event', 'activity.#', this._onActivityEvent.bind(this), {noAck: true});
27
25
  };
28
26
 
29
- proto.deactivate = function deactivate() {
27
+ IoSpecification.prototype.deactivate = function deactivate() {
30
28
  if (this[kConsuming]) this[kConsuming] = this[kConsuming].cancel();
31
29
  };
32
30
 
33
- proto._onActivityEvent = function onActivityEvent(routingKey, message) {
31
+ IoSpecification.prototype._onActivityEvent = function onActivityEvent(routingKey, message) {
34
32
  const {dataInputs, dataOutputs} = this.behaviour;
35
33
  if ((dataInputs || dataOutputs) && routingKey === 'activity.enter') {
36
34
  return this._onFormatEnter();
@@ -41,7 +39,7 @@ proto._onActivityEvent = function onActivityEvent(routingKey, message) {
41
39
  }
42
40
  };
43
41
 
44
- proto._onFormatEnter = function onFormatOnEnter() {
42
+ IoSpecification.prototype._onFormatEnter = function onFormatOnEnter() {
45
43
  const safeType = brokerSafeId(this.type).toLowerCase();
46
44
  const startRoutingKey = `run.onstart.${safeType}`;
47
45
  const {dataInputs, dataOutputs} = this.behaviour;
@@ -105,7 +103,7 @@ proto._onFormatEnter = function onFormatOnEnter() {
105
103
  });
106
104
  };
107
105
 
108
- proto._onFormatComplete = function formatOnComplete(message) {
106
+ IoSpecification.prototype._onFormatComplete = function formatOnComplete(message) {
109
107
  const safeType = brokerSafeId(this.type).toLowerCase();
110
108
  const messageInputs = getPropertyValue(message, 'content.ioSpecification.dataInputs');
111
109
  const messageOutputs = getPropertyValue(message, 'content.output.ioSpecification.dataOutputs') || [];
@@ -173,7 +171,7 @@ proto._onFormatComplete = function formatOnComplete(message) {
173
171
  });
174
172
  };
175
173
 
176
- proto._getDataOutputs = function getDataOutputs(dataOutputs) {
174
+ IoSpecification.prototype._getDataOutputs = function getDataOutputs(dataOutputs) {
177
175
  if (!dataOutputs) return;
178
176
  return dataOutputs.map((dataOutput) => {
179
177
  return {
@@ -1,4 +1,4 @@
1
- import getPropertyValue from '../getPropertyValue';
1
+ import getPropertyValue from '../getPropertyValue.js';
2
2
 
3
3
  const kProperties = Symbol.for('properties');
4
4
  const kConsuming = Symbol.for('consuming');
@@ -57,9 +57,7 @@ export default function Properties(activity, propertiesDef, context) {
57
57
  }
58
58
  }
59
59
 
60
- const proto = Properties.prototype;
61
-
62
- proto.activate = function activate(message) {
60
+ Properties.prototype.activate = function activate(message) {
63
61
  if (this[kConsuming]) return;
64
62
  if (message.fields.redelivered && message.fields.routingKey === 'run.start') {
65
63
  this._onActivityEvent('activity.enter', message);
@@ -72,11 +70,11 @@ proto.activate = function activate(message) {
72
70
  this[kConsuming] = this.broker.subscribeTmp('event', 'activity.#', this._onActivityEvent.bind(this), {noAck: true});
73
71
  };
74
72
 
75
- proto.deactivate = function deactivate() {
73
+ Properties.prototype.deactivate = function deactivate() {
76
74
  if (this[kConsuming]) this[kConsuming] = this[kConsuming].cancel();
77
75
  };
78
76
 
79
- proto._onActivityEvent = function onActivityEvent(routingKey, message) {
77
+ Properties.prototype._onActivityEvent = function onActivityEvent(routingKey, message) {
80
78
  switch (routingKey) {
81
79
  case 'activity.enter':
82
80
  case 'activity.extension.resume':
@@ -86,7 +84,7 @@ proto._onActivityEvent = function onActivityEvent(routingKey, message) {
86
84
  }
87
85
  };
88
86
 
89
- proto._formatOnEnter = function formatOnEnter(message) {
87
+ Properties.prototype._formatOnEnter = function formatOnEnter(message) {
90
88
  const startRoutingKey = 'run.enter.bpmn-properties';
91
89
 
92
90
  const dataInputObjects = this[kProperties].dataInputObjects;
@@ -110,7 +108,7 @@ proto._formatOnEnter = function formatOnEnter(message) {
110
108
  });
111
109
  };
112
110
 
113
- proto._formatOnComplete = function formatOnComplete(message) {
111
+ Properties.prototype._formatOnComplete = function formatOnComplete(message) {
114
112
  const startRoutingKey = 'run.end.bpmn-properties';
115
113
 
116
114
  const messageOutput = getPropertyValue(message, 'content.output.properties') || {};
@@ -137,7 +135,7 @@ proto._formatOnComplete = function formatOnComplete(message) {
137
135
  });
138
136
  };
139
137
 
140
- proto._getProperties = function getProperties(message, values) {
138
+ Properties.prototype._getProperties = function getProperties(message, values) {
141
139
  let response = {};
142
140
 
143
141
  if (message.content.properties) {