lib/cpee/processtransformation/bpmn2.rb in cpee-1.3.138 vs lib/cpee/processtransformation/bpmn2.rb in cpee-1.3.139
- old
+ new
@@ -180,11 +180,11 @@
### has identical branches with different conditions, we are fucked
### but how are the odds? right? right?
traces.uniq!
debug_print debug, traces
if node = traces.same_first
- if branch.condition?
+ if branch.condition? && branch.empty?
li = @graph.link(branch.id,traces.first_node.id)
unless li.nil?
branch.condition << li.condition unless li.condition.nil?
branch.condition_type = "text/javascript"
end
@@ -236,13 +236,14 @@
end
else
endnode = traces.find_endnode || enode
tracesgroup, endnode = traces.segment_by endnode
tracesgroup.each do |trcs|
+ nb = branch.last.new_branch
if trcs.finished?
- build_ttree branch.last.new_branch, Traces.new([[Break.new(1)]]), endnode, debug
+ build_ttree nb, Traces.new([[Break.new(1)]]), endnode, debug
else
- build_ttree branch.last.new_branch, trcs, endnode, debug
+ build_ttree nb, trcs, endnode, debug
end
endnode.incoming -= 1 unless endnode.nil?
end
### all before is reduced to one incoming arrow
### if now there is still more than one incoming we have a loop situation