cpee 1.3.144 → 1.3.145

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7cffac3d4e0607675b23907910c211c76a29b1ae
4
- data.tar.gz: 9e949dc935780024c373dfc883e6e80c8d6ce5a9
3
+ metadata.gz: c0dc2529d07f9ef3df654dfae91aef2117c31ae8
4
+ data.tar.gz: bc9b63fe537ecdffc405bef7110a03abbe594f79
5
5
  SHA512:
6
- metadata.gz: 8b818353394a20d689bdf8e90d797998ed4b18182c27e848d99b07cf3f925420660046a8a951355e5fd6cb8a9ce21d6c6603580d1ebaeaf9b9b4e520794a5e48
7
- data.tar.gz: adf6f532ee81e10f3258b153a0a4c8d56b6f70fe5410582ae62ea9a05cc3c844213c5c57587a82d6b4d1777e1d00af5684b3186674d8e447b9478ae07c8c76fc
6
+ metadata.gz: 687d6010942222aa7379df176ba8cbc7c38b3e3cd96f9b5b278508d72a04d0ed2dcab526dd096b1e89788f07b2577fec15d392cb89141f1dbaf0c2baf0e2144d
7
+ data.tar.gz: cd4a7c0a21011d36afe6d4b1b45904453cc24e04a4d69272ba5acb9e339366f5bd30f763ed44bc808c9d8af3c5f51ed045f72ff388b03c4d08f9d7367fc4b213
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.144"
3
+ s.version = "1.3.145"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
@@ -184,10 +184,16 @@ module CPEE
184
184
  debug_print debug, traces
185
185
  if node = traces.same_first
186
186
  if branch.condition? && branch.empty?
187
- li = @graph.link(branch.id,traces.first_node.id)
187
+ li = if (branch.id == traces.first_node.id)
188
+ ### for tail controlled loops
189
+ @graph.link(branch.id,traces.second_nodes.first.id)
190
+ else
191
+ @graph.link(branch.id,traces.first_node.id)
192
+ end
188
193
  unless li.nil?
189
194
  branch.condition << li.condition unless li.condition.nil?
190
195
  branch.condition_type = "text/javascript"
196
+ branch.attributes.merge!(li.attributes)
191
197
  end
192
198
  end
193
199
  if node == enode
@@ -205,18 +211,18 @@ module CPEE
205
211
  if node.incoming == 2
206
212
  node.incoming = 1
207
213
  branch << Loop.new(node.id)
208
- ### remove the gateway itself, as for a single loop it is no longer used.
209
- ### the condition will the loop condition
210
214
  if traces.all_loops?
215
+ ### if all loops, tail loop thus remove the loopback
211
216
  loops.pop_all
212
217
  else
218
+ ### remove the gateway itself, as for a single loop it is no longer used.
213
219
  traces.shift_all
214
220
  end
215
221
  puts '--> down to ' + (down + 1).to_s if debug
216
222
  loops.remove_empty
217
223
  puts '--> up from ' + down.to_s if debug
218
224
  build_ttree branch.last, loops.dup, nil, debug, down + 1
219
- else
225
+ else
220
226
  ### dont remove it, treat it as a normal conditional
221
227
  ### an infinite loop that can only be left by break is created
222
228
  node.incoming = 1
@@ -243,17 +249,18 @@ module CPEE
243
249
  end
244
250
  else
245
251
  endnode = traces.find_endnode || enode
252
+ puts "--> endnode #{endnode.nil? ? 'nil' : endnode.niceid}" if debug
246
253
  tracesgroup, endnode = traces.segment_by endnode
247
254
  tracesgroup.each do |trcs|
248
255
  nb = branch.last.new_branch
249
256
  if trcs.finished?
250
- puts '--> down to ' + (down + 1).to_s if debug
257
+ puts '--> branch down to ' + (down + 1).to_s if debug
251
258
  build_ttree nb, Traces.new([[Break.new(1)]]), endnode, debug, down + 1
252
- puts '--> up from ' + down.to_s if debug
259
+ puts '--> branch up from ' + down.to_s if debug
253
260
  else
254
- puts '--> down to ' + (down + 1).to_s if debug
261
+ puts '--> branch down to ' + (down + 1).to_s if debug
255
262
  build_ttree nb, trcs, endnode, debug, down + 1
256
- puts '--> up from ' + down.to_s if debug
263
+ puts '--> branch up from ' + down.to_s if debug
257
264
  end
258
265
  endnode.incoming -= 1 unless endnode.nil?
259
266
  end
@@ -54,6 +54,9 @@ module CPEE
54
54
  def print_Loop_default(node,res)
55
55
  s1 = res.add('loop', 'pre_test' => node.condition.empty? ? 'true' : node.condition.join(' && '))
56
56
  s1.attributes['language'] = node.condition_type unless node.condition_type.nil?
57
+ node.attributes.each do |k,v|
58
+ s1.attributes[k] = v
59
+ end
57
60
  generate_for_list(node,s1)
58
61
  s1
59
62
  end
@@ -109,6 +112,9 @@ module CPEE
109
112
  else
110
113
  s1.add('d:otherwise')
111
114
  end
115
+ branch.attributes.each do |k,v|
116
+ s2.attributes[k] = v
117
+ end
112
118
  generate_for_list(branch,s2)
113
119
  end
114
120
  if (x = s1.find('d:otherwise')).any?
@@ -81,13 +81,14 @@ module CPEE
81
81
  class Alternative < Array #{{{
82
82
  include Container
83
83
  attr_accessor :condition, :condition_type
84
- attr_reader :id
84
+ attr_reader :id, :attributes
85
85
  def condition?; true; end
86
86
  def initialize(id)
87
87
  @container = true
88
88
  @id = id
89
89
  @condition = []
90
90
  @condition_type = nil
91
+ @attributes = {}
91
92
  end
92
93
  end #}}}
93
94
  class Branch < Array #{{{
@@ -414,7 +415,7 @@ module CPEE
414
415
  def find_endnode
415
416
  # supress loops
416
417
  trcs = self.dup
417
- trcs.delete_if { |t| t.uniq.length < t.length }
418
+ # trcs.delete_if { |t| t.uniq.length < t.length }
418
419
 
419
420
  # find common node (except loops)
420
421
  enode = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.144
4
+ version: 1.3.145
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-22 00:00:00.000000000 Z
13
+ date: 2014-08-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl