lib/cpee/processtransformation/bpmn2.rb in cpee-1.3.160 vs lib/cpee/processtransformation/bpmn2.rb in cpee-1.3.161
- old
+ new
@@ -221,17 +221,23 @@
### at the output time it is decided wether this can be optimized
branch << Loop.new(node.id)
### duplicate because we need it later to remove all the shit from traces
lops = loops.dup
### remove the exclusive gateway because we no longer need it
- lops.add_breaks(self.object_id)
- lops.shift_all
+ unless traces.all_loops?
+ lops.add_breaks(self.object_id,node.type == :exclusiveGateway)
+ end
+ traces.remove(loops)
+ if node.type == :exclusiveGateway
+ lops.shift_all
+ traces.shift_all
+ else
+ lops.pop_all
+ end
### add the blank conditional to get a break
puts '--> down head_loop to ' + (down + 1).to_s if debug
build_ttree branch, lops, nil, debug, down + 1
puts '--> up head_loop from ' + (down + 1).to_s if debug
- traces.remove(loops)
- traces.shift_all
else
### throw away the loop traces, remove loop traces from front of all other traces
traces.segment_by_loops loops
puts '--> down tail_loop to ' + (down + 1).to_s if debug
build_ttree branch, loops.dup, nil, debug, down + 1