weel 1.2.2.1 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/weel.rb CHANGED
@@ -32,7 +32,6 @@ end #}}}
32
32
 
33
33
  class WEEL
34
34
  def initialize(*args)# {{{
35
- @wfsource = nil
36
35
  @dslr = DSLRealization.new
37
36
  @dslr.__weel_handlerwrapper_args = args
38
37
 
@@ -242,7 +241,7 @@ class WEEL
242
241
  def self::control(flow, &block)# {{{
243
242
  @@__weel_control_block = block
244
243
  define_method :initialize_control do
245
- self.description(&(@@__weel_control_block))
244
+ self.description = @@__weel_control_block
246
245
  end
247
246
  end # }}}
248
247
  def self::flow #{{{
@@ -787,44 +786,40 @@ public
787
786
  end # }}}
788
787
 
789
788
  # get/set workflow description
790
- def description(code = nil,&blk) # {{{
791
- bgiven = block_given?
792
- if code.nil? && !bgiven
793
- @wfsource
794
- else
795
- @wfsource = code unless bgiven
796
- (class << self; self; end).class_eval do
797
- define_method :__weel_control_flow do |state,final_state=:finished|
798
- @dslr.__weel_positions.clear
799
- @dslr.__weel_state = state
800
- begin
801
- if bgiven
802
- @dslr.instance_eval(&blk)
803
- else
804
- @dslr.instance_eval(code)
805
- end
806
- rescue Exception => err
807
- @dslr.__weel_state = :stopping
808
- handlerwrapper = @dslr.__weel_handlerwrapper.new @dslr.__weel_handlerwrapper_args
809
- handlerwrapper.inform_syntax_error(err,code)
810
- end
811
- if @dslr.__weel_state == :running
812
- @dslr.__weel_state = :finished
813
- ipc = { :unmark => [] }
814
- @dslr.__weel_positions.each{|wp| ipc[:unmark] << wp.position}
815
- @dslr.__weel_positions.clear
816
- handlerwrapper = @dslr.__weel_handlerwrapper.new @dslr.__weel_handlerwrapper_args
817
- handlerwrapper.inform_position_change(ipc)
818
- end
819
- if @dslr.__weel_state == :simulating
820
- @dslr.__weel_state = final_state
789
+ def description(&blk)
790
+ self.description=(blk)
791
+ end
792
+ def description=(code) # {{{
793
+ (class << self; self; end).class_eval do
794
+ define_method :__weel_control_flow do |state,final_state=:finished|
795
+ @dslr.__weel_positions.clear
796
+ @dslr.__weel_state = state
797
+ begin
798
+ if code.is_a? Proc
799
+ @dslr.instance_eval(&code)
800
+ else
801
+ @dslr.instance_eval(code)
821
802
  end
822
- if @dslr.__weel_state == :stopping
823
- @dslr.__weel_finalize
824
- end
803
+ rescue Exception => err
804
+ @dslr.__weel_state = :stopping
805
+ handlerwrapper = @dslr.__weel_handlerwrapper.new @dslr.__weel_handlerwrapper_args
806
+ handlerwrapper.inform_syntax_error(err,code)
807
+ end
808
+ if @dslr.__weel_state == :running
809
+ @dslr.__weel_state = :finished
810
+ ipc = { :unmark => [] }
811
+ @dslr.__weel_positions.each{|wp| ipc[:unmark] << wp.position}
812
+ @dslr.__weel_positions.clear
813
+ handlerwrapper = @dslr.__weel_handlerwrapper.new @dslr.__weel_handlerwrapper_args
814
+ handlerwrapper.inform_position_change(ipc)
815
+ end
816
+ if @dslr.__weel_state == :simulating
817
+ @dslr.__weel_state = final_state
818
+ end
819
+ if @dslr.__weel_state == :stopping
820
+ @dslr.__weel_finalize
825
821
  end
826
822
  end
827
- bgiven ? blk : code
828
823
  end
829
824
  end # }}}
830
825
 
@@ -33,6 +33,7 @@ class TestParallel < Test::Unit::TestCase
33
33
  parallel :wait do
34
34
  parallel_branch do
35
35
  activity :a_1, :call, :endpoint1
36
+ Thread.pass
36
37
  end
37
38
  parallel_branch do
38
39
  activity :a_2, :call, :endpoint1, :call => Proc.new{ sleep 0.5 }
@@ -51,6 +52,7 @@ class TestParallel < Test::Unit::TestCase
51
52
  parallel :wait => 1 do
52
53
  parallel_branch do
53
54
  activity :a_1, :call, :endpoint1
55
+ Thread.pass
54
56
  end
55
57
  parallel_branch do
56
58
  activity :a_2, :call, :endpoint1, :call => Proc.new{ sleep 8.5 }
@@ -67,8 +69,7 @@ class TestParallel < Test::Unit::TestCase
67
69
  @wf.description do
68
70
  parallel :wait => 1 do
69
71
  parallel_branch do
70
- activity :a_1, :call, :endpoint1
71
- Thread.pass
72
+ activity :a_1, :call, :endpoint1, :call => Proc.new{ sleep 0.2 }
72
73
  end
73
74
  parallel_branch do
74
75
  activity :a_2, :call, :endpoint1, :call => Proc.new{ sleep 0.5 }
@@ -9,7 +9,7 @@ class TestWFPDeferredChoice < Test::Unit::TestCase
9
9
  @wf.description do
10
10
  parallel :wait=>1 do
11
11
  parallel_branch do
12
- activity :a1_1, :call, :endpoint1 do
12
+ activity :a1_1, :call, :endpoint1, :call => Proc.new{sleep 0.5} do
13
13
  data.choice = 1
14
14
  end
15
15
  Thread.pass
data/weel.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "weel"
3
- s.version = "1.2.2.1"
3
+ s.version = "1.2.3"
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,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2.1
4
+ version: 1.2.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Juergen eTM Mangler
@@ -9,7 +10,7 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-06-24 00:00:00.000000000 Z
13
+ date: 2013-06-25 00:00:00.000000000 Z
13
14
  dependencies: []
14
15
  description: Workflow Execution Engine Library (WEEL)
15
16
  email: juergen.mangler@gmail.com
@@ -33,89 +34,88 @@ files:
33
34
  - test/SimHandlerWrapper.rb
34
35
  - test/TestHandlerWrapper.rb
35
36
  - test/ContinueTest.rb
36
- - test/TestMixin.rb
37
- - test/simulation_v0.0.1.tgz
38
37
  - test/TestWorkflow.rb
39
- - test/wfp_state_based/tc_interleavedparallelrouting.rb
38
+ - test/TestMixin.rb
39
+ - test/wfp_basic/tc_exclusivechoice_simplemerge.rb
40
+ - test/wfp_basic/tc_parallelsplit_synchronization.rb
41
+ - test/wfp_basic/tc_sequence.rb
40
42
  - test/wfp_state_based/tc_deferredchoice.rb
43
+ - test/wfp_state_based/tc_interleavedparallelrouting.rb
41
44
  - test/wfp_iteration/tc_structuredloop.rb
42
- - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
43
- - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
44
- - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
45
- - test/wfp_adv_branching/tc_threadmerge.rb
46
- - test/wfp_adv_branching/tc_generalizedjoin.rb
47
- - test/wfp_adv_branching/tc_threadsplit.rb
48
- - test/wfp_adv_branching/tc_multimerge.rb
49
- - test/wfp_adv_branching/tc_structured_discriminator.rb
50
- - test/wfp_adv_branching/tc_structured_partial_join.rb
45
+ - test/basic/tc_choose.rb
46
+ - test/basic/tc_wf_control.rb
47
+ - test/basic/tc_endpoint.rb
48
+ - test/basic/tc_parallel.rb
51
49
  - test/basic/tc_codereplace.rb
52
50
  - test/basic/tc_data.rb
53
- - test/basic/tc_handler.rb
54
- - test/basic/tc_parallel.rb
55
51
  - test/basic/tc_search.rb
56
- - test/basic/tc_endpoint.rb
57
- - test/basic/tc_wf_control.rb
58
- - test/basic/tc_choose.rb
59
52
  - test/basic/tc_state.rb
60
- - test/complex/tc_parallel_stop.rb
53
+ - test/basic/tc_handler.rb
54
+ - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
55
+ - test/wfp_adv_branching/tc_threadsplit.rb
56
+ - test/wfp_adv_branching/tc_multimerge.rb
57
+ - test/wfp_adv_branching/tc_threadmerge.rb
58
+ - test/wfp_adv_branching/tc_structured_partial_join.rb
59
+ - test/wfp_adv_branching/tc_generalizedjoin.rb
60
+ - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
61
+ - test/wfp_adv_branching/tc_structured_discriminator.rb
62
+ - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
61
63
  - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
62
- - test/wfp_basic/tc_exclusivechoice_simplemerge.rb
63
- - test/wfp_basic/tc_sequence.rb
64
- - test/wfp_basic/tc_parallelsplit_synchronization.rb
64
+ - test/complex/tc_parallel_stop.rb
65
65
  homepage: http://cpee.org
66
66
  licenses:
67
67
  - LGPL-3
68
- metadata: {}
69
68
  post_install_message:
70
69
  rdoc_options: []
71
70
  require_paths:
72
71
  - lib
73
72
  required_ruby_version: !ruby/object:Gem::Requirement
73
+ none: false
74
74
  requirements:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: 1.9.3
78
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
+ none: false
79
80
  requirements:
80
81
  - - ! '>='
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  requirements: []
84
85
  rubyforge_project:
85
- rubygems_version: 2.0.3
86
+ rubygems_version: 1.8.23
86
87
  signing_key:
87
- specification_version: 4
88
+ specification_version: 3
88
89
  summary: Preliminary release of the Workflow Execution Engine Library (WEEL)
89
90
  test_files:
90
91
  - test/SimHandlerWrapper.rb
91
92
  - test/TestHandlerWrapper.rb
92
93
  - test/ContinueTest.rb
93
- - test/TestMixin.rb
94
- - test/simulation_v0.0.1.tgz
95
94
  - test/TestWorkflow.rb
96
- - test/wfp_state_based/tc_interleavedparallelrouting.rb
95
+ - test/TestMixin.rb
96
+ - test/wfp_basic/tc_exclusivechoice_simplemerge.rb
97
+ - test/wfp_basic/tc_parallelsplit_synchronization.rb
98
+ - test/wfp_basic/tc_sequence.rb
97
99
  - test/wfp_state_based/tc_deferredchoice.rb
100
+ - test/wfp_state_based/tc_interleavedparallelrouting.rb
98
101
  - test/wfp_iteration/tc_structuredloop.rb
99
- - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
100
- - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
101
- - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
102
- - test/wfp_adv_branching/tc_threadmerge.rb
103
- - test/wfp_adv_branching/tc_generalizedjoin.rb
104
- - test/wfp_adv_branching/tc_threadsplit.rb
105
- - test/wfp_adv_branching/tc_multimerge.rb
106
- - test/wfp_adv_branching/tc_structured_discriminator.rb
107
- - test/wfp_adv_branching/tc_structured_partial_join.rb
102
+ - test/basic/tc_choose.rb
103
+ - test/basic/tc_wf_control.rb
104
+ - test/basic/tc_endpoint.rb
105
+ - test/basic/tc_parallel.rb
108
106
  - test/basic/tc_codereplace.rb
109
107
  - test/basic/tc_data.rb
110
- - test/basic/tc_handler.rb
111
- - test/basic/tc_parallel.rb
112
108
  - test/basic/tc_search.rb
113
- - test/basic/tc_endpoint.rb
114
- - test/basic/tc_wf_control.rb
115
- - test/basic/tc_choose.rb
116
109
  - test/basic/tc_state.rb
117
- - test/complex/tc_parallel_stop.rb
110
+ - test/basic/tc_handler.rb
111
+ - test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb
112
+ - test/wfp_adv_branching/tc_threadsplit.rb
113
+ - test/wfp_adv_branching/tc_multimerge.rb
114
+ - test/wfp_adv_branching/tc_threadmerge.rb
115
+ - test/wfp_adv_branching/tc_structured_partial_join.rb
116
+ - test/wfp_adv_branching/tc_generalizedjoin.rb
117
+ - test/wfp_adv_branching/tc_generalsynchronizingmerge.rb
118
+ - test/wfp_adv_branching/tc_structured_discriminator.rb
119
+ - test/wfp_adv_branching/tc_localsynchronizingmerge.rb
118
120
  - test/complex/tc_generalsynchonizingmerge_loopsearch.rb
119
- - test/wfp_basic/tc_exclusivechoice_simplemerge.rb
120
- - test/wfp_basic/tc_sequence.rb
121
- - test/wfp_basic/tc_parallelsplit_synchronization.rb
121
+ - test/complex/tc_parallel_stop.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 0afac7e70b100b14f6dcc5767504b4369fa10d77
4
- data.tar.gz: 2934fe54b8ec839199fb5be441d07b2b94d9ff66
5
- SHA512:
6
- metadata.gz: 0c986c2fb9799c77b762456e8f1b042bc7325be909ea6b6102750c84fb24f3c2b63510310f3ff4333661a51304359195851b1094413956c2efddf463296bb5f1
7
- data.tar.gz: a676145e30b041e188f3c3bbd8810762d9e56f1b17c22f424b552da510bdcf8c93ec45f82229fcd2f2a318c42ffbfc3a6443cc02fd7e5e2bd64d426436506145
Binary file