bpmn-elements 17.2.2 → 18.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 (155) hide show
  1. package/README.md +3 -1
  2. package/dist/Api.js +83 -0
  3. package/dist/Context.js +228 -22
  4. package/dist/Environment.js +111 -31
  5. package/dist/EventBroker.js +57 -1
  6. package/dist/Expressions.js +3 -4
  7. package/dist/MessageFormatter.js +29 -16
  8. package/dist/Timers.js +13 -9
  9. package/dist/Tracker.js +1 -0
  10. package/dist/activity/Activity.js +458 -254
  11. package/dist/activity/ActivityExecution.js +113 -40
  12. package/dist/activity/Dummy.js +6 -1
  13. package/dist/activity/Escalation.js +36 -24
  14. package/dist/activity/ExecutionScope.js +1 -1
  15. package/dist/activity/Message.js +36 -24
  16. package/dist/activity/Signal.js +36 -24
  17. package/dist/activity/outbound-evaluator.js +1 -1
  18. package/dist/condition.js +12 -6
  19. package/dist/constants.js +21 -0
  20. package/dist/definition/Definition.js +182 -64
  21. package/dist/definition/DefinitionExecution.js +195 -82
  22. package/dist/error/BpmnError.js +12 -1
  23. package/dist/error/Errors.js +50 -9
  24. package/dist/eventDefinitions/CancelEventDefinition.js +29 -11
  25. package/dist/eventDefinitions/CompensateEventDefinition.js +51 -31
  26. package/dist/eventDefinitions/ConditionalEventDefinition.js +21 -9
  27. package/dist/eventDefinitions/ErrorEventDefinition.js +46 -30
  28. package/dist/eventDefinitions/EscalationEventDefinition.js +44 -27
  29. package/dist/eventDefinitions/EventDefinitionExecution.js +30 -23
  30. package/dist/eventDefinitions/LinkEventDefinition.js +45 -120
  31. package/dist/eventDefinitions/MessageEventDefinition.js +44 -29
  32. package/dist/eventDefinitions/SignalEventDefinition.js +46 -31
  33. package/dist/eventDefinitions/TerminateEventDefinition.js +10 -1
  34. package/dist/eventDefinitions/TimerEventDefinition.js +57 -37
  35. package/dist/eventDefinitions/index.js +20 -21
  36. package/dist/events/BoundaryEvent.js +52 -40
  37. package/dist/events/EndEvent.js +22 -8
  38. package/dist/events/IntermediateCatchEvent.js +26 -8
  39. package/dist/events/IntermediateThrowEvent.js +24 -9
  40. package/dist/events/StartEvent.js +30 -14
  41. package/dist/events/index.js +10 -11
  42. package/dist/flows/Association.js +50 -7
  43. package/dist/flows/MessageFlow.js +49 -10
  44. package/dist/flows/SequenceFlow.js +93 -22
  45. package/dist/flows/index.js +6 -7
  46. package/dist/gateways/EventBasedGateway.js +29 -15
  47. package/dist/gateways/ExclusiveGateway.js +20 -5
  48. package/dist/gateways/InclusiveGateway.js +21 -5
  49. package/dist/gateways/ParallelGateway.js +253 -15
  50. package/dist/gateways/index.js +8 -9
  51. package/dist/getPropertyValue.js +2 -2
  52. package/dist/index.js +42 -43
  53. package/dist/io/BpmnIO.js +15 -1
  54. package/dist/io/EnvironmentDataObject.js +29 -1
  55. package/dist/io/EnvironmentDataStore.js +24 -1
  56. package/dist/io/EnvironmentDataStoreReference.js +24 -1
  57. package/dist/io/InputOutputSpecification.js +21 -11
  58. package/dist/io/Properties.js +28 -17
  59. package/dist/messageHelper.js +41 -4
  60. package/dist/process/Lane.js +15 -4
  61. package/dist/process/Process.js +174 -76
  62. package/dist/process/ProcessExecution.js +362 -177
  63. package/dist/shared.js +2 -0
  64. package/dist/tasks/CallActivity.js +19 -4
  65. package/dist/tasks/LoopCharacteristics.js +94 -9
  66. package/dist/tasks/ReceiveTask.js +36 -21
  67. package/dist/tasks/ScriptTask.js +22 -6
  68. package/dist/tasks/ServiceImplementation.js +7 -4
  69. package/dist/tasks/ServiceTask.js +19 -4
  70. package/dist/tasks/SignalTask.js +19 -4
  71. package/dist/tasks/StandardLoopCharacteristics.js +8 -4
  72. package/dist/tasks/SubProcess.js +44 -29
  73. package/dist/tasks/Task.js +19 -4
  74. package/dist/tasks/Transaction.js +8 -4
  75. package/dist/tasks/index.js +16 -18
  76. package/package.json +31 -13
  77. package/src/Api.js +70 -0
  78. package/src/Context.js +200 -19
  79. package/src/Environment.js +99 -30
  80. package/src/EventBroker.js +46 -1
  81. package/src/Expressions.js +2 -3
  82. package/src/MessageFormatter.js +24 -16
  83. package/src/Timers.js +12 -9
  84. package/src/Tracker.js +1 -0
  85. package/src/activity/Activity.js +388 -231
  86. package/src/activity/ActivityExecution.js +93 -42
  87. package/src/activity/Dummy.js +6 -1
  88. package/src/activity/Escalation.js +25 -18
  89. package/src/activity/ExecutionScope.js +1 -1
  90. package/src/activity/Message.js +25 -18
  91. package/src/activity/Signal.js +25 -18
  92. package/src/activity/outbound-evaluator.js +1 -1
  93. package/src/condition.js +11 -5
  94. package/src/constants.js +15 -0
  95. package/src/definition/Definition.js +157 -62
  96. package/src/definition/DefinitionExecution.js +161 -83
  97. package/src/error/BpmnError.js +11 -1
  98. package/src/error/Errors.js +44 -5
  99. package/src/eventDefinitions/CancelEventDefinition.js +27 -13
  100. package/src/eventDefinitions/CompensateEventDefinition.js +48 -32
  101. package/src/eventDefinitions/ConditionalEventDefinition.js +20 -10
  102. package/src/eventDefinitions/ErrorEventDefinition.js +44 -33
  103. package/src/eventDefinitions/EscalationEventDefinition.js +39 -26
  104. package/src/eventDefinitions/EventDefinitionExecution.js +30 -24
  105. package/src/eventDefinitions/LinkEventDefinition.js +34 -120
  106. package/src/eventDefinitions/MessageEventDefinition.js +42 -31
  107. package/src/eventDefinitions/SignalEventDefinition.js +43 -32
  108. package/src/eventDefinitions/TerminateEventDefinition.js +9 -1
  109. package/src/eventDefinitions/TimerEventDefinition.js +53 -35
  110. package/src/eventDefinitions/index.js +10 -23
  111. package/src/events/BoundaryEvent.js +50 -39
  112. package/src/events/EndEvent.js +19 -7
  113. package/src/events/IntermediateCatchEvent.js +24 -8
  114. package/src/events/IntermediateThrowEvent.js +24 -8
  115. package/src/events/StartEvent.js +25 -14
  116. package/src/events/index.js +5 -18
  117. package/src/flows/Association.js +43 -9
  118. package/src/flows/MessageFlow.js +41 -10
  119. package/src/flows/SequenceFlow.js +82 -19
  120. package/src/flows/index.js +3 -4
  121. package/src/gateways/EventBasedGateway.js +27 -15
  122. package/src/gateways/ExclusiveGateway.js +16 -3
  123. package/src/gateways/InclusiveGateway.js +16 -3
  124. package/src/gateways/ParallelGateway.js +301 -10
  125. package/src/gateways/index.js +4 -4
  126. package/src/getPropertyValue.js +2 -2
  127. package/src/index.js +19 -19
  128. package/src/io/BpmnIO.js +13 -1
  129. package/src/io/EnvironmentDataObject.js +26 -1
  130. package/src/io/EnvironmentDataStore.js +22 -1
  131. package/src/io/EnvironmentDataStoreReference.js +22 -1
  132. package/src/io/InputOutputSpecification.js +17 -8
  133. package/src/io/Properties.js +23 -13
  134. package/src/messageHelper.js +36 -4
  135. package/src/process/Lane.js +14 -4
  136. package/src/process/Process.js +154 -72
  137. package/src/process/ProcessExecution.js +326 -175
  138. package/src/shared.js +1 -0
  139. package/src/tasks/CallActivity.js +16 -2
  140. package/src/tasks/LoopCharacteristics.js +77 -11
  141. package/src/tasks/ReceiveTask.js +33 -22
  142. package/src/tasks/ScriptTask.js +17 -3
  143. package/src/tasks/ServiceImplementation.js +6 -3
  144. package/src/tasks/ServiceTask.js +16 -2
  145. package/src/tasks/SignalTask.js +16 -2
  146. package/src/tasks/StandardLoopCharacteristics.js +7 -3
  147. package/src/tasks/SubProcess.js +37 -23
  148. package/src/tasks/Task.js +16 -2
  149. package/src/tasks/Transaction.js +7 -3
  150. package/src/tasks/index.js +8 -9
  151. package/types/bundle-errors.d.ts +1 -0
  152. package/types/bundle.d.ts +97 -0
  153. package/types/index.d.ts +2614 -84
  154. package/types/interfaces.d.ts +636 -0
  155. package/types/types.d.ts +0 -765
@@ -1,13 +1,27 @@
1
- export default function EnvironmentDataStore(dataStoreDef, { environment }) {
1
+ /**
2
+ * Builtin data store. Reads from / writes to `environment.variables._data`.
3
+ * @param {import('moddle-context-serializer').DataStore} dataStoreDef
4
+ * @param {import('#types').ContextInstance} context
5
+ * @satisfies {import('#types').IIOData}
6
+ */
7
+ export function EnvironmentDataStore(dataStoreDef, { environment }) {
2
8
  const { id, type, name, behaviour, parent } = dataStoreDef;
3
9
  this.id = id;
4
10
  this.type = type;
5
11
  this.name = name;
12
+ /** @type {Record<string, any>} */
6
13
  this.behaviour = behaviour;
14
+ /** @type {import('moddle-context-serializer').Parent | undefined} */
7
15
  this.parent = parent;
8
16
  this.environment = environment;
9
17
  }
10
18
 
19
+ /**
20
+ * @param {import('smqp').Broker} broker
21
+ * @param {string} exchange
22
+ * @param {string} routingKeyPrefix
23
+ * @param {Record<string, any>} [messageProperties]
24
+ */
11
25
  EnvironmentDataStore.prototype.read = function read(broker, exchange, routingKeyPrefix, messageProperties) {
12
26
  const environment = this.environment;
13
27
  const value = environment.variables._data?.[this.id];
@@ -15,6 +29,13 @@ EnvironmentDataStore.prototype.read = function read(broker, exchange, routingKey
15
29
  return broker.publish(exchange, `${routingKeyPrefix}response`, content, messageProperties);
16
30
  };
17
31
 
32
+ /**
33
+ * @param {import('smqp').Broker} broker
34
+ * @param {string} exchange
35
+ * @param {string} routingKeyPrefix
36
+ * @param {any} value
37
+ * @param {Record<string, any>} [messageProperties]
38
+ */
18
39
  EnvironmentDataStore.prototype.write = function write(broker, exchange, routingKeyPrefix, value, messageProperties) {
19
40
  const environment = this.environment;
20
41
  environment.variables._data = environment.variables._data || {};
@@ -1,13 +1,27 @@
1
- export default function EnvironmentDataStoreReference(dataObjectDef, { environment }) {
1
+ /**
2
+ * Builtin data store reference. Reads from / writes to `environment.variables._data`.
3
+ * @param {import('moddle-context-serializer').DataStore} dataObjectDef
4
+ * @param {import('#types').ContextInstance} context
5
+ * @satisfies {import('#types').IIOData}
6
+ */
7
+ export function EnvironmentDataStoreReference(dataObjectDef, { environment }) {
2
8
  const { id, type, name, behaviour, parent } = dataObjectDef;
3
9
  this.id = id;
4
10
  this.type = type;
5
11
  this.name = name;
12
+ /** @type {Record<string, any>} */
6
13
  this.behaviour = behaviour;
14
+ /** @type {import('moddle-context-serializer').Parent | undefined} */
7
15
  this.parent = parent;
8
16
  this.environment = environment;
9
17
  }
10
18
 
19
+ /**
20
+ * @param {import('smqp').Broker} broker
21
+ * @param {string} exchange
22
+ * @param {string} routingKeyPrefix
23
+ * @param {Record<string, any>} [messageProperties]
24
+ */
11
25
  EnvironmentDataStoreReference.prototype.read = function read(broker, exchange, routingKeyPrefix, messageProperties) {
12
26
  const environment = this.environment;
13
27
  const value = environment.variables._data?.[this.id];
@@ -15,6 +29,13 @@ EnvironmentDataStoreReference.prototype.read = function read(broker, exchange, r
15
29
  return broker.publish(exchange, `${routingKeyPrefix}response`, content, messageProperties);
16
30
  };
17
31
 
32
+ /**
33
+ * @param {import('smqp').Broker} broker
34
+ * @param {string} exchange
35
+ * @param {string} routingKeyPrefix
36
+ * @param {any} value
37
+ * @param {Record<string, any>} [messageProperties]
38
+ */
18
39
  EnvironmentDataStoreReference.prototype.write = function write(broker, exchange, routingKeyPrefix, value, messageProperties) {
19
40
  const environment = this.environment;
20
41
  environment.variables._data = environment.variables._data || {};
@@ -1,9 +1,15 @@
1
- import getPropertyValue from '../getPropertyValue.js';
1
+ import { getPropertyValue } from '../getPropertyValue.js';
2
2
  import { brokerSafeId } from '../shared.js';
3
-
4
- const kConsuming = Symbol.for('consuming');
5
-
6
- export default function IoSpecification(activity, ioSpecificationDef, context) {
3
+ import { K_CONSUMING } from '../constants.js';
4
+
5
+ /**
6
+ * Activity ioSpecification behaviour. Reads bound data objects on enter and writes them on completion.
7
+ * @param {import('#types').Activity} activity
8
+ * @param {import('moddle-context-serializer').IoSpecification} ioSpecificationDef
9
+ * @param {import('#types').ContextInstance} context
10
+ * @satisfies {import('#types').IExtension}
11
+ */
12
+ export function IoSpecification(activity, ioSpecificationDef, context) {
7
13
  const { id, type = 'iospecification', behaviour = {} } = ioSpecificationDef;
8
14
  this.id = id;
9
15
  this.type = type;
@@ -13,19 +19,22 @@ export default function IoSpecification(activity, ioSpecificationDef, context) {
13
19
  this.context = context;
14
20
  }
15
21
 
22
+ /**
23
+ * @param {import('#types').ElementBrokerMessage} [message]
24
+ */
16
25
  IoSpecification.prototype.activate = function activate(message) {
17
- if (this[kConsuming]) return;
26
+ if (this[K_CONSUMING]) return;
18
27
  if (message?.fields.redelivered && message.fields.routingKey === 'run.start') {
19
28
  this._onFormatEnter();
20
29
  }
21
30
  if (message?.fields.redelivered && message.fields.routingKey === 'run.end') {
22
31
  this._onFormatComplete(message);
23
32
  }
24
- this[kConsuming] = this.broker.subscribeTmp('event', 'activity.#', this._onActivityEvent.bind(this), { noAck: true });
33
+ this[K_CONSUMING] = this.broker.subscribeTmp('event', 'activity.#', this._onActivityEvent.bind(this), { noAck: true });
25
34
  };
26
35
 
27
36
  IoSpecification.prototype.deactivate = function deactivate() {
28
- if (this[kConsuming]) this[kConsuming] = this[kConsuming].cancel();
37
+ if (this[K_CONSUMING]) this[K_CONSUMING] = this[K_CONSUMING].cancel();
29
38
  };
30
39
 
31
40
  IoSpecification.prototype._onActivityEvent = function onActivityEvent(routingKey, message) {
@@ -1,13 +1,20 @@
1
- import getPropertyValue from '../getPropertyValue.js';
2
-
3
- const kProperties = Symbol.for('properties');
4
- const kConsuming = Symbol.for('consuming');
5
-
6
- export default function Properties(activity, propertiesDef, context) {
1
+ import { getPropertyValue } from '../getPropertyValue.js';
2
+ import { K_CONSUMING } from '../constants.js';
3
+
4
+ const K_PROPERTIES = Symbol.for('properties');
5
+
6
+ /**
7
+ * Activity properties behaviour. Resolves bound data input/output references during the run.
8
+ * @param {import('#types').Activity} activity
9
+ * @param {{ type: 'properties', values: import('moddle-context-serializer').IElement[] }} propertiesDef
10
+ * @param {import('#types').ContextInstance} context
11
+ * @satisfies {import('#types').IExtension}
12
+ */
13
+ export function Properties(activity, propertiesDef, context) {
7
14
  this.activity = activity;
8
15
  this.broker = activity.broker;
9
16
 
10
- const props = (this[kProperties] = {
17
+ const props = (this[K_PROPERTIES] = {
11
18
  properties: new Set(),
12
19
  dataInputObjects: new Set(),
13
20
  dataOutputObjects: new Set(),
@@ -57,8 +64,11 @@ export default function Properties(activity, propertiesDef, context) {
57
64
  }
58
65
  }
59
66
 
67
+ /**
68
+ * @param {import('#types').ElementBrokerMessage} message
69
+ */
60
70
  Properties.prototype.activate = function activate(message) {
61
- if (this[kConsuming]) return;
71
+ if (this[K_CONSUMING]) return;
62
72
  if (message.fields.redelivered && message.fields.routingKey === 'run.start') {
63
73
  this._onActivityEvent('activity.enter', message);
64
74
  }
@@ -67,11 +77,11 @@ Properties.prototype.activate = function activate(message) {
67
77
  this._onActivityEvent('activity.extension.resume', message);
68
78
  }
69
79
 
70
- this[kConsuming] = this.broker.subscribeTmp('event', 'activity.#', this._onActivityEvent.bind(this), { noAck: true });
80
+ this[K_CONSUMING] = this.broker.subscribeTmp('event', 'activity.#', this._onActivityEvent.bind(this), { noAck: true });
71
81
  };
72
82
 
73
83
  Properties.prototype.deactivate = function deactivate() {
74
- if (this[kConsuming]) this[kConsuming] = this[kConsuming].cancel();
84
+ if (this[K_CONSUMING]) this[K_CONSUMING] = this[K_CONSUMING].cancel();
75
85
  };
76
86
 
77
87
  Properties.prototype._onActivityEvent = function onActivityEvent(routingKey, message) {
@@ -87,7 +97,7 @@ Properties.prototype._onActivityEvent = function onActivityEvent(routingKey, mes
87
97
  Properties.prototype._formatOnEnter = function formatOnEnter(message) {
88
98
  const startRoutingKey = 'run.enter.bpmn-properties';
89
99
 
90
- const dataInputObjects = this[kProperties].dataInputObjects;
100
+ const dataInputObjects = this[K_PROPERTIES].dataInputObjects;
91
101
  const broker = this.broker;
92
102
  if (!dataInputObjects.size) {
93
103
  return broker.getQueue('format-run-q').queueMessage(
@@ -120,7 +130,7 @@ Properties.prototype._formatOnComplete = function formatOnComplete(message) {
120
130
  const messageOutput = getPropertyValue(message, 'content.output.properties') || {};
121
131
  const outputProperties = this._getProperties(message, messageOutput);
122
132
 
123
- const dataOutputObjects = this[kProperties].dataOutputObjects;
133
+ const dataOutputObjects = this[K_PROPERTIES].dataOutputObjects;
124
134
  const broker = this.broker;
125
135
  if (!dataOutputObjects.size) {
126
136
  return broker.getQueue('format-run-q').queueMessage(
@@ -154,7 +164,7 @@ Properties.prototype._getProperties = function getProperties(message, values) {
154
164
  response = { ...message.content.properties };
155
165
  }
156
166
 
157
- for (const { id, type, name } of this[kProperties].properties) {
167
+ for (const { id, type, name } of this[K_PROPERTIES].properties) {
158
168
  if (!(id in response)) {
159
169
  response[id] = { id, type, name };
160
170
  }
@@ -1,6 +1,13 @@
1
+ /**
2
+ * Clone message content
3
+ * @param {import('#types').ElementMessageContent} content
4
+ * @param {Record<string, any>} [extend]
5
+ * @returns cloned content
6
+ */
1
7
  export function cloneContent(content, extend) {
2
- const { discardSequence, inbound, outbound, parent, sequence } = content;
8
+ const { inbound, outbound, parent, sequence } = content;
3
9
 
10
+ /** @type {import('#types').ElementMessageContent} */
4
11
  const clone = {
5
12
  ...content,
6
13
  ...extend,
@@ -9,9 +16,6 @@ export function cloneContent(content, extend) {
9
16
  if (parent) {
10
17
  clone.parent = cloneParent(parent);
11
18
  }
12
- if (discardSequence) {
13
- clone.discardSequence = discardSequence.slice();
14
- }
15
19
  if (inbound) {
16
20
  clone.inbound = inbound.map((c) => cloneContent(c));
17
21
  }
@@ -25,6 +29,12 @@ export function cloneContent(content, extend) {
25
29
  return clone;
26
30
  }
27
31
 
32
+ /**
33
+ * Clone message
34
+ * @param {import('#types').ElementBrokerMessage} message
35
+ * @param {Record<string, any>} [overrideContent]
36
+ * @returns {Pick<ElementBrokerMessage, 'fields' | 'content', 'properties'>}
37
+ */
28
38
  export function cloneMessage(message, overrideContent) {
29
39
  return {
30
40
  fields: { ...message.fields },
@@ -33,6 +43,11 @@ export function cloneMessage(message, overrideContent) {
33
43
  };
34
44
  }
35
45
 
46
+ /**
47
+ * Clone parent
48
+ * @param {import('#types').ElementParent} parent
49
+ * @returns {import('#types').ElementParent} cloned parent
50
+ */
36
51
  export function cloneParent(parent) {
37
52
  const { path } = parent;
38
53
  const clone = { ...parent };
@@ -45,6 +60,12 @@ export function cloneParent(parent) {
45
60
  return clone;
46
61
  }
47
62
 
63
+ /**
64
+ * Add parent to top of path
65
+ * @param {import('#types').ElementParent} parent
66
+ * @param {import('#types').ElementMessageContent} adoptingParent
67
+ * @returns {import('#types').ElementParent}
68
+ */
48
69
  export function unshiftParent(parent, adoptingParent) {
49
70
  const { id, type, executionId } = adoptingParent;
50
71
  if (!parent) {
@@ -67,6 +88,11 @@ export function unshiftParent(parent, adoptingParent) {
67
88
  return clone;
68
89
  }
69
90
 
91
+ /**
92
+ * Remove top parent from path
93
+ * @param {import('#types').ElementParent} parent
94
+ * @returns {import('#types').ElementParent}
95
+ */
70
96
  export function shiftParent(parent) {
71
97
  if (!parent) return;
72
98
  if (!parent.path || !parent.path.length) return;
@@ -80,6 +106,12 @@ export function shiftParent(parent) {
80
106
  return clone;
81
107
  }
82
108
 
109
+ /**
110
+ * Add ancestor parent at end
111
+ * @param {import('#types').ElementParent} parent
112
+ * @param {import('#types').ElementMessageContent} ancestor
113
+ * @returns {import('#types').ElementParent}
114
+ */
83
115
  export function pushParent(parent, ancestor) {
84
116
  const { id, type, executionId } = ancestor;
85
117
  if (!parent) return { id, type, executionId };
@@ -1,18 +1,27 @@
1
- const kProcess = Symbol.for('process');
1
+ const K_PROCESS = Symbol.for('process');
2
2
 
3
- export default function Lane(process, laneDefinition) {
3
+ /**
4
+ * Process lane. Wraps a `<bpmn:lane>` definition and points back to its owning process;
5
+ * activities reference their lane through `Activity.lane`.
6
+ * @param {import('#types').Process} process
7
+ * @param {import('moddle-context-serializer').SerializableElement} laneDefinition
8
+ */
9
+ export function Lane(process, laneDefinition) {
4
10
  const { broker, environment } = process;
5
11
  const { id, type, behaviour } = laneDefinition;
6
12
 
7
- this[kProcess] = process;
13
+ this[K_PROCESS] = process;
8
14
 
9
15
  this.id = id;
10
16
  this.type = type;
17
+ /** @type {string} */
11
18
  this.name = behaviour.name;
19
+ /** @type {import('moddle-context-serializer').Parent} */
12
20
  this.parent = {
13
21
  id: process.id,
14
22
  type: process.type,
15
23
  };
24
+ /** @type {Record<string, any>} */
16
25
  this.behaviour = { ...behaviour };
17
26
  this.environment = environment;
18
27
  this.broker = broker;
@@ -21,7 +30,8 @@ export default function Lane(process, laneDefinition) {
21
30
  }
22
31
 
23
32
  Object.defineProperty(Lane.prototype, 'process', {
33
+ /** @returns {import('#types').Process} */
24
34
  get() {
25
- return this[kProcess];
35
+ return this[K_PROCESS];
26
36
  },
27
37
  });