cpee 1.3.141 → 1.3.142

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9f727646483f63c20bd683be909a4f005c25527
4
- data.tar.gz: 9c1ed21ea4c416c441ab704c3c258e33d1d404ac
3
+ metadata.gz: f729bc55e4293f383cc4b93627e0cfd32ce32659
4
+ data.tar.gz: 299679f674e22fd2957f4f4490a1365c6f709638
5
5
  SHA512:
6
- metadata.gz: cf4a477d3d1ed014480e06ec6640f6dc054727e9ae64633a49bb0d33d921be3469dff058d02eae9f00e405a629a925f363db416227fe3f3b7d74387aaa8a1921
7
- data.tar.gz: f924f355af613ea2b75910e9e091f712df7c446eacfa019313b75bb28fae9b7d18955488a2f646471d1b9e1c4f760c8dfd79adeacd26a81c2385a45671c30de1
6
+ metadata.gz: 21dc89b170d17f11cfd38ff838965416589970780949a67e465a37c2e59cd7d6e97930fb65f391d542b100e439f5eeb293b825a5725a5d744a71ee5a73c9e7bc
7
+ data.tar.gz: b2caf50ad1372911e2da106ca3c0719d22b2230ff96c9e4238cc70e02dd5bfc12a5c9da65aeb77d0e0910bcf9310ef7982042b979a94fec7b9ee1d231231ef7f
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.141"
3
+ s.version = "1.3.142"
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"
@@ -180,6 +180,7 @@ module CPEE
180
180
  ### has identical branches with different conditions, we are fucked
181
181
  ### but how are the odds? right? right?
182
182
  traces.uniq!
183
+ puts '--> now on ' + down.to_s if debug
183
184
  debug_print debug, traces
184
185
  if node = traces.same_first
185
186
  if branch.condition? && branch.empty?
@@ -211,7 +212,9 @@ module CPEE
211
212
  else
212
213
  traces.shift_all
213
214
  end
215
+ puts '--> down to ' + (down + 1).to_s if debug
214
216
  loops.remove_empty
217
+ puts '--> up from ' + down.to_s if debug
215
218
  build_ttree branch.last, loops.dup, nil, debug, down + 1
216
219
  else
217
220
  ### dont remove it, treat it as a normal conditional
@@ -221,7 +224,9 @@ module CPEE
221
224
  ### add the blank conditional to get a break
222
225
  len = loops.length
223
226
  loops.add_breaks
227
+ puts '--> down to ' + (down + 1).to_s if debug
224
228
  build_ttree branch.last, loops.dup, nil, debug, down + 1
229
+ puts '--> up from ' + down.to_s if debug
225
230
  ### set outgoing to number of loops (without the break) so that it can be ignored (should be 1 all the time)
226
231
  node.outgoing -= len
227
232
  end
@@ -229,7 +234,9 @@ module CPEE
229
234
  node.incoming -= loops.length
230
235
  ### throw away the loop traces, remove loop traces from front of all other traces
231
236
  traces.segment_by_loops loops
237
+ puts '--> down to ' + (down + 1).to_s if debug
232
238
  build_ttree branch, loops.dup, nil, debug, down + 1
239
+ puts '--> up from ' + down.to_s if debug
233
240
  end
234
241
  traces.remove(loops)
235
242
  traces.remove_empty
@@ -240,12 +247,17 @@ module CPEE
240
247
  tracesgroup.each do |trcs|
241
248
  nb = branch.last.new_branch
242
249
  if trcs.finished?
250
+ puts '--> down to ' + (down + 1).to_s if debug
243
251
  build_ttree nb, Traces.new([[Break.new(1)]]), endnode, debug, down + 1
252
+ puts '--> up from ' + down.to_s if debug
244
253
  else
254
+ puts '--> down to ' + (down + 1).to_s if debug
245
255
  build_ttree nb, trcs, endnode, debug, down + 1
256
+ puts '--> up from ' + down.to_s if debug
246
257
  end
247
258
  endnode.incoming -= 1 unless endnode.nil?
248
259
  end
260
+ traces.empty! if endnode.nil?
249
261
  ### all before is reduced to one incoming arrow
250
262
  ### if now there is still more than one incoming we have a loop situation
251
263
  ### where the end of a branching statement is also the starting/endpoint
@@ -264,6 +264,10 @@ module CPEE
264
264
  end
265
265
  end
266
266
 
267
+ def empty!
268
+ self.delete_if{true}
269
+ end
270
+
267
271
  def remove_empty
268
272
  self.delete_if{|t| t.empty? }
269
273
  end
@@ -414,12 +418,14 @@ module CPEE
414
418
 
415
419
  # find common node (except loops)
416
420
  enode = nil
417
- trcs.first.each do |n|
418
- if trcs.include_in_all?(n)
419
- enode = n
420
- break
421
- end
422
- end
421
+ unless trcs.empty?
422
+ trcs.first.each do |n|
423
+ if trcs.include_in_all?(n)
424
+ enode = n
425
+ break
426
+ end
427
+ end
428
+ end
423
429
  enode
424
430
  end
425
431
 
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.141
4
+ version: 1.3.142
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-07 00:00:00.000000000 Z
13
+ date: 2014-08-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl