bpmn 0.2.1 → 0.3.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.
- checksums.yaml +4 -4
- data/lib/bpmn/execution.rb +10 -6
- data/lib/bpmn/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4cfb944e0b2ea2265cca88da43d51ee0c907bec9728bef2ccc6bc5fc0b103fc
|
|
4
|
+
data.tar.gz: c2387d117eb9281ca77f2c0923ca051f5eda4973e3af4415aaf08aaa4865c45a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc2c400f4782668ec794abe11c4c28df8b370a97c410265e5b187fecbdfc686ddc0d2a933fb5973465e1422e40c1b57e892a01efa4366eae085a5d50f70dc74e
|
|
7
|
+
data.tar.gz: 4c598369d16174827c2e402f2c9a2ab6b85793d96114a09097a15320f37aeaa130a8547dc6e5d86ca6bc3222638b30828cdd39bdd318852fcb5eb82b739111a6
|
data/lib/bpmn/execution.rb
CHANGED
|
@@ -82,7 +82,7 @@ module BPMN
|
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
def execute_step(step, attached_to: nil, sequence_flow: nil)
|
|
85
|
-
child_execution = children.find { |child| child.step.id == step.id }
|
|
85
|
+
child_execution = children.find { |child| child.step.id == step.id && !child.ended? }
|
|
86
86
|
child_execution = Execution.new(context: context, step: step, parent: self, attached_to_id: attached_to&.id).tap { |ce| children.push ce } unless child_execution
|
|
87
87
|
child_execution.tokens_in += [sequence_flow.id] if sequence_flow
|
|
88
88
|
child_execution.start
|
|
@@ -95,7 +95,7 @@ module BPMN
|
|
|
95
95
|
def start
|
|
96
96
|
@status = "started"
|
|
97
97
|
@started_at = Time.zone.now
|
|
98
|
-
map_input_variables if step&.input_mappings
|
|
98
|
+
map_input_variables if step&.input_mappings.present?
|
|
99
99
|
context.notify_listener(:execution_started, execution: self)
|
|
100
100
|
step.attachments.each { |attachment| parent.execute_step(attachment, attached_to: self) } if step.is_a?(BPMN::Activity)
|
|
101
101
|
continue
|
|
@@ -117,7 +117,7 @@ module BPMN
|
|
|
117
117
|
|
|
118
118
|
def end(notify_parent = false)
|
|
119
119
|
@status = "completed" unless status == "terminated"
|
|
120
|
-
map_output_variables if step&.output_mappings
|
|
120
|
+
map_output_variables if step&.output_mappings.present?
|
|
121
121
|
parent.variables.merge!(variables) if parent && variables.present?
|
|
122
122
|
@ended_at = Time.zone.now
|
|
123
123
|
context.notify_listener(:execution_ended, execution: self)
|
|
@@ -211,7 +211,11 @@ module BPMN
|
|
|
211
211
|
end
|
|
212
212
|
|
|
213
213
|
def child_by_step_id(id)
|
|
214
|
-
children.find { |child| child.step.id == id }
|
|
214
|
+
children.reverse.find { |child| child.step.id == id }
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def children_by_step_id(id)
|
|
218
|
+
children.select { |child| child.step.id == id }
|
|
215
219
|
end
|
|
216
220
|
|
|
217
221
|
def waiting_children
|
|
@@ -281,14 +285,14 @@ module BPMN
|
|
|
281
285
|
private
|
|
282
286
|
|
|
283
287
|
def map_input_variables
|
|
284
|
-
return unless step&.input_mappings
|
|
288
|
+
return unless step&.input_mappings.present?
|
|
285
289
|
step.input_mappings.each do |parameter|
|
|
286
290
|
variables[parameter.target] = evaluate_expression(parameter.source)
|
|
287
291
|
end
|
|
288
292
|
end
|
|
289
293
|
|
|
290
294
|
def map_output_variables
|
|
291
|
-
return unless step&.output_mappings
|
|
295
|
+
return unless step&.output_mappings.present?
|
|
292
296
|
step.output_mappings.each do |parameter|
|
|
293
297
|
variables[parameter.target] = evaluate_expression(parameter.source)
|
|
294
298
|
end
|
data/lib/bpmn/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bpmn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Connected Bits
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-02-05 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: dmn
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.3.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.3.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: activemodel
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|