weel 1.99.36 → 1.99.37

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: e2af90ba047268e2a5317dc15e26dffca388d683
4
- data.tar.gz: 1f0bfae2da2dc2f4991b34805067f2c9b590419c
3
+ metadata.gz: 32e1005b0f41f52946b44912e80015f710b8c7c1
4
+ data.tar.gz: 55aba746487938da392df037239b3e9c67078c63
5
5
  SHA512:
6
- metadata.gz: 9143e9304fb52498936ffeb66792c449124b8274143cb0de61a8587a5bf26645f3f437d054c1d6124bf40d7c976fb8cbbdb05c460d4ac329ae9fe3c88024fe76
7
- data.tar.gz: 4f78372a234a78035c9602cfc56b8e1447a3168008bccb9ada4a624c0a96f25cad13984a91c8c770a5eb2b7de642961cbe3aca6a985c45fb06a6c4ad5efca7d6
6
+ metadata.gz: 8c2318a70fe3c7de7bc8c5c182877ce3ff53648c0c3bffc2d46104d3815f983c3eee5b06c8303ce4328209cb6a48f0d92734863cf593811f147005cc9884fa1e
7
+ data.tar.gz: 121d51d53524c67784417ab80ee5bf8154cceff2588bde7eccd8f9c3ff54ce00037c07af2fe866630c0582f393392134034ef444a337fced3269ef9dc37479ed
data/Changelog CHANGED
@@ -2,7 +2,7 @@
2
2
  -----
3
3
 
4
4
  * Ruby >= 1.9.3 only, use Queue instead of Threads and Mutexes of Weel::Continue
5
- * LGPL-3 to achive Aapache 2 compatibility
5
+ * LGPL-3 to achive Apache 2 compatibility
6
6
  * Raise Weel::Signal::Again in HandlerWrapper, to trigger Manipulation and then
7
7
  redo the activity. HandlerWrapper is not discarded inbetween, so it is possible
8
8
  to continue receiving multiple callbacks. Basically sequential multi instance
data/lib/weel.rb CHANGED
@@ -338,16 +338,17 @@ class WEEL
338
338
  yield
339
339
 
340
340
  Thread.current[:branch_wait_count] = (type.is_a?(Hash) && type.size == 1 && type[:wait] != nil && (type[:wait].is_a?(Integer) && type[:wait] > 0) ? type[:wait] : Thread.current[:branches].size)
341
+ 1.upto Thread.current[:branches].size do
342
+ Thread.current[:branch_event].wait
343
+ end
344
+
341
345
  Thread.current[:branches].each do |thread|
342
- while thread.status != 'sleep' && thread.alive?
343
- Thread.pass
344
- end
345
346
  # decide after executing block in parallel cause for coopis
346
347
  # it goes out of search mode while dynamically counting branches
347
348
  if Thread.current[:branch_search] == false
348
349
  thread[:branch_search] = false
349
350
  end
350
- thread.wakeup if thread.alive?
351
+ thread[:start_event].continue
351
352
  end
352
353
 
353
354
  Thread.current[:branch_event].wait
@@ -380,24 +381,23 @@ class WEEL
380
381
  end
381
382
 
382
383
  Thread.current[:branches] << Thread.new(*vars) do |*local|
383
- branch_parent[:mutex].synchronize do
384
- Thread.current.abort_on_exception = true
385
- Thread.current[:branch_status] = false
386
- Thread.current[:branch_parent] = branch_parent
384
+ Thread.current.abort_on_exception = true
385
+ Thread.current[:branch_status] = false
386
+ Thread.current[:branch_parent] = branch_parent
387
+ Thread.current[:start_event] = Continue.new
387
388
 
388
- if __weel_sim
389
- Thread.current[:branch_sim_pos] = @__weel_sim += 1
390
- end
391
-
392
- # parallel_branch could be possibly around an alternative. Thus thread has to inherit the alternative_executed
393
- # after branching, update it in the parent (TODO)
394
- if branch_parent[:alternative_executed] && branch_parent[:alternative_executed].length > 0
395
- Thread.current[:alternative_executed] = [branch_parent[:alternative_executed].last]
396
- Thread.current[:alternative_mode] = [branch_parent[:alternative_mode].last]
397
- end
389
+ if __weel_sim
390
+ Thread.current[:branch_sim_pos] = @__weel_sim += 1
398
391
  end
399
392
 
400
- Thread.stop
393
+ # parallel_branch could be possibly around an alternative. Thus thread has to inherit the alternative_executed
394
+ # after branching, update it in the parent (TODO)
395
+ if branch_parent[:alternative_executed] && branch_parent[:alternative_executed].length > 0
396
+ Thread.current[:alternative_executed] = [branch_parent[:alternative_executed].last]
397
+ Thread.current[:alternative_mode] = [branch_parent[:alternative_mode].last]
398
+ end
399
+ branch_parent[:branch_event].continue
400
+ Thread.current[:start_event].wait
401
401
 
402
402
  if __weel_sim
403
403
  handlerwrapper = @__weel_handlerwrapper.new @__weel_handlerwrapper_args
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require File.expand_path(::File.dirname(__FILE__) + '/../TestWorkflow')
3
+
4
+ class TestAdventureSearch < Test::Unit::TestCase
5
+ include TestMixin
6
+
7
+ def test_search_adventure
8
+ @wf.data[:oee] = 0.25
9
+ @wf.description = File.read(::File.dirname(__FILE__) + '/dsl1')
10
+ @wf.search [WEEL::Position.new(:a2, :at), WEEL::Position.new(:a13, :at)]
11
+ @wf.start.join
12
+
13
+ wf_assert("DONE a2",true)
14
+ wf_assert("DONE a13",true)
15
+ end
16
+ end
data/weel.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "weel"
3
- s.version = "1.99.36"
3
+ s.version = "1.99.37"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "Preliminary release of the Workflow Execution Engine Library (WEEL)"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.99.36
4
+ version: 1.99.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-29 00:00:00.000000000 Z
12
+ date: 2014-10-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: see http://cpee.org
15
15
  email: juergen.mangler@gmail.com
@@ -18,52 +18,53 @@ extensions: []
18
18
  extra_rdoc_files:
19
19
  - README
20
20
  files:
21
- - example/SimpleHandlerWrapper.rb
22
- - example/SimpleWorkflow.rb
23
- - example/runme.rb
24
- - lib/weel.rb
21
+ - AUTHORS
25
22
  - COPYING
26
23
  - Changelog
27
24
  - FEATURES
28
25
  - INSTALL
29
- - Rakefile
30
- - weel.gemspec
31
26
  - README
32
- - AUTHORS
33
- - test/SimHandlerWrapper.rb
34
- - test/TestMixin.rb
35
- - test/TestHandlerWrapper.rb
27
+ - Rakefile
28
+ - example/SimpleHandlerWrapper.rb
29
+ - example/SimpleWorkflow.rb
30
+ - example/runme.rb
31
+ - lib/weel.rb
36
32
  - test/ContinueTest.rb
37
33
  - test/README
34
+ - test/SimHandlerWrapper.rb
35
+ - test/TestHandlerWrapper.rb
36
+ - test/TestMixin.rb
38
37
  - test/TestWorkflow.rb
39
- - test/wfp_adv_branching/tc_threadsplit.rb
40
- - test/wfp_adv_branching/tc_structured_discriminator.rb
41
- - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
42
- - test/wfp_adv_branching/tc_multimerge.rb
43
- - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
44
- - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
45
- - test/wfp_adv_branching/tc_generalizedjoin.rb
46
- - test/wfp_adv_branching/tc_threadmerge.rb
47
- - test/wfp_adv_branching/tc_structured_partial_join.rb
48
- - test/wfp_iteration/tc_structuredloop.rb
38
+ - test/basic/tc_choose.rb
49
39
  - test/basic/tc_codereplace.rb
40
+ - test/basic/tc_data.rb
50
41
  - test/basic/tc_endpoint.rb
51
42
  - test/basic/tc_handler.rb
52
43
  - test/basic/tc_parallel.rb
53
44
  - test/basic/tc_search.rb
54
45
  - test/basic/tc_state.rb
55
- - test/basic/tc_choose.rb
56
- - test/basic/tc_data.rb
57
46
  - test/basic/tc_wf_control.rb
58
- - test/exec/tc_exec.rb
47
+ - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
48
+ - test/complex/tc_parallel_stop.rb
49
+ - test/complexsearch/tc_search.rb
59
50
  - test/exec/tc_again.rb
60
- - test/wfp_basic/tc_sequence.rb
61
- - test/wfp_basic/tc_parallelsplit_synchronization.rb
51
+ - test/exec/tc_exec.rb
52
+ - test/wfp_adv_branching/tc_generalizedjoin.rb
53
+ - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
54
+ - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
55
+ - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
56
+ - test/wfp_adv_branching/tc_multimerge.rb
57
+ - test/wfp_adv_branching/tc_structured_discriminator.rb
58
+ - test/wfp_adv_branching/tc_structured_partial_join.rb
59
+ - test/wfp_adv_branching/tc_threadmerge.rb
60
+ - test/wfp_adv_branching/tc_threadsplit.rb
62
61
  - test/wfp_basic/tc_exclusivechoice_simplemerge.rb
63
- - test/wfp_state_based/tc_interleavedparallelrouting.rb
62
+ - test/wfp_basic/tc_parallelsplit_synchronization.rb
63
+ - test/wfp_basic/tc_sequence.rb
64
+ - test/wfp_iteration/tc_structuredloop.rb
64
65
  - test/wfp_state_based/tc_deferredchoice.rb
65
- - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
66
- - test/complex/tc_parallel_stop.rb
66
+ - test/wfp_state_based/tc_interleavedparallelrouting.rb
67
+ - weel.gemspec
67
68
  homepage: http://cpee.org/
68
69
  licenses:
69
70
  - LGPL-3
@@ -84,42 +85,43 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
85
  version: '0'
85
86
  requirements: []
86
87
  rubyforge_project:
87
- rubygems_version: 2.0.14
88
+ rubygems_version: 2.2.2
88
89
  signing_key:
89
90
  specification_version: 4
90
91
  summary: Preliminary release of the Workflow Execution Engine Library (WEEL)
91
92
  test_files:
92
- - test/SimHandlerWrapper.rb
93
- - test/TestMixin.rb
94
93
  - test/TestHandlerWrapper.rb
94
+ - test/SimHandlerWrapper.rb
95
95
  - test/ContinueTest.rb
96
+ - test/TestMixin.rb
96
97
  - test/README
97
98
  - test/TestWorkflow.rb
98
- - test/wfp_adv_branching/tc_threadsplit.rb
99
- - test/wfp_adv_branching/tc_structured_discriminator.rb
100
- - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
101
- - test/wfp_adv_branching/tc_multimerge.rb
102
- - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
103
- - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
104
- - test/wfp_adv_branching/tc_generalizedjoin.rb
105
- - test/wfp_adv_branching/tc_threadmerge.rb
106
- - test/wfp_adv_branching/tc_structured_partial_join.rb
107
- - test/wfp_iteration/tc_structuredloop.rb
99
+ - test/complex/tc_parallel_stop.rb
100
+ - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
101
+ - test/wfp_state_based/tc_interleavedparallelrouting.rb
102
+ - test/wfp_state_based/tc_deferredchoice.rb
103
+ - test/wfp_basic/tc_parallelsplit_synchronization.rb
104
+ - test/wfp_basic/tc_sequence.rb
105
+ - test/wfp_basic/tc_exclusivechoice_simplemerge.rb
106
+ - test/basic/tc_data.rb
108
107
  - test/basic/tc_codereplace.rb
109
- - test/basic/tc_endpoint.rb
110
- - test/basic/tc_handler.rb
111
- - test/basic/tc_parallel.rb
112
- - test/basic/tc_search.rb
113
108
  - test/basic/tc_state.rb
114
- - test/basic/tc_choose.rb
115
- - test/basic/tc_data.rb
116
109
  - test/basic/tc_wf_control.rb
110
+ - test/basic/tc_choose.rb
111
+ - test/basic/tc_search.rb
112
+ - test/basic/tc_handler.rb
113
+ - test/basic/tc_endpoint.rb
114
+ - test/basic/tc_parallel.rb
115
+ - test/wfp_iteration/tc_structuredloop.rb
116
+ - test/complexsearch/tc_search.rb
117
117
  - test/exec/tc_exec.rb
118
118
  - test/exec/tc_again.rb
119
- - test/wfp_basic/tc_sequence.rb
120
- - test/wfp_basic/tc_parallelsplit_synchronization.rb
121
- - test/wfp_basic/tc_exclusivechoice_simplemerge.rb
122
- - test/wfp_state_based/tc_interleavedparallelrouting.rb
123
- - test/wfp_state_based/tc_deferredchoice.rb
124
- - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
125
- - test/complex/tc_parallel_stop.rb
119
+ - test/wfp_adv_branching/tc_threadsplit.rb
120
+ - test/wfp_adv_branching/tc_generalizedjoin.rb
121
+ - test/wfp_adv_branching/tc_structured_partial_join.rb
122
+ - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
123
+ - test/wfp_adv_branching/tc_threadmerge.rb
124
+ - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
125
+ - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
126
+ - test/wfp_adv_branching/tc_structured_discriminator.rb
127
+ - test/wfp_adv_branching/tc_multimerge.rb