weel 1.99.38 → 1.99.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weel.rb +4 -5
- data/test/TestHandlerWrapper.rb +6 -4
- data/test/basic/tc_parallel.rb +14 -14
- data/test/basic/tc_wf_control.rb +2 -2
- data/test/exec/tc_again.rb +5 -3
- data/test/wfp_adv_branching/tc_generalsynchronizingmerge.rb +4 -4
- data/test/wfp_adv_branching/tc_localsynchronizingmerge.rb +3 -3
- data/test/wfp_adv_branching/tc_multichoice_structuredsynchronizingmerge.rb +1 -1
- data/test/wfp_adv_branching/tc_structured_discriminator.rb +2 -2
- data/test/wfp_adv_branching/tc_structured_partial_join.rb +3 -3
- data/test/wfp_state_based/tc_deferredchoice.rb +2 -2
- data/weel.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 310427c12d9c134331d19fbdcee723e9afd7c11f
|
4
|
+
data.tar.gz: 34c0de3873cf65e306e8c936c4c4b5948ade64a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef770455e9a0648051cfbabeb1489d5b5a1e9a27ffd29b6dac4eab3b32421bb7193ecc96d6e85eff75a65e3e3fba13665c518852586fcab698054ed81330ab4e
|
7
|
+
data.tar.gz: b821a029edf59749c2a5f76459e838cb43af9fc311b4a093fdd9d603a8666b40bf1de77170e81b8d830f7148ff5825eceb3109463e5d8c51560c0deba337c2b6
|
data/lib/weel.rb
CHANGED
@@ -315,11 +315,11 @@ class WEEL
|
|
315
315
|
# position: a unique identifier within the wf-description (may be used by the search to identify a starting point)
|
316
316
|
# endpoint: (only with :call) ep of the service
|
317
317
|
# parameters: (only with :call) service parameters
|
318
|
-
def call(position, endpoint, parameters
|
318
|
+
def call(position, endpoint, parameters: {}, finalize: nil, update: nil, &finalizeblk)
|
319
319
|
__weel_activity(position,:call,endpoint,parameters,finalize||finalizeblk,update)
|
320
320
|
end
|
321
|
-
def manipulate(position,
|
322
|
-
__weel_activity(position,:manipulate,nil,{},
|
321
|
+
def manipulate(position, script=nil, &scriptblk)
|
322
|
+
__weel_activity(position,:manipulate,nil,{},script||scriptblk)
|
323
323
|
end
|
324
324
|
|
325
325
|
# Parallel DSL-Construct
|
@@ -435,7 +435,6 @@ class WEEL
|
|
435
435
|
end
|
436
436
|
end
|
437
437
|
end
|
438
|
-
Thread.pass
|
439
438
|
end # }}}
|
440
439
|
|
441
440
|
# Choose DSL-Construct
|
@@ -669,7 +668,7 @@ class WEEL
|
|
669
668
|
when 1; mr.instance_exec(handlerwrapper.activity_result_value,&code)
|
670
669
|
when 2; mr.instance_exec(handlerwrapper.activity_result_value,(status.is_a?(Status)?status:nil),&code)
|
671
670
|
else
|
672
|
-
mr.
|
671
|
+
mr.instance_exec(&code)
|
673
672
|
end
|
674
673
|
elsif code.is_a?(String)
|
675
674
|
mr = ManipulateStructure.new(@__weel_data,@__weel_endpoints,@__weel_status)
|
data/test/TestHandlerWrapper.rb
CHANGED
@@ -18,11 +18,13 @@ class TestHandlerWrapper < WEEL::HandlerWrapperBase
|
|
18
18
|
end
|
19
19
|
if @__myhandler_endpoint == 'again'
|
20
20
|
@__myhandler_returnValue = parameters.has_key?(:result) ? parameters[:result] : 'Handler_Dummy_Result'
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
Thread.new do
|
22
|
+
while parameters[:again].call
|
23
|
+
@__myhandler_continue.continue WEEL::Signal::Again
|
24
|
+
sleep 1
|
25
|
+
end
|
24
26
|
@__myhandler_continue.continue
|
25
|
-
end
|
27
|
+
end
|
26
28
|
return
|
27
29
|
end
|
28
30
|
if parameters[:call]
|
data/test/basic/tc_parallel.rb
CHANGED
@@ -8,13 +8,13 @@ class TestParallel < Test::Unit::TestCase
|
|
8
8
|
@wf.description do
|
9
9
|
parallel do
|
10
10
|
parallel_branch do
|
11
|
-
call :a_1, :endpoint1, :call => Proc.new{ sleep 0.5 }
|
11
|
+
call :a_1, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
|
12
12
|
end
|
13
13
|
parallel_branch do
|
14
|
-
call :a_2, :endpoint1, :call => Proc.new{ sleep 0.5 }
|
14
|
+
call :a_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
|
15
15
|
end
|
16
16
|
parallel_branch do
|
17
|
-
call :a_3, :endpoint1, :call => Proc.new{ sleep 0.5 }
|
17
|
+
call :a_3, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -32,10 +32,10 @@ class TestParallel < Test::Unit::TestCase
|
|
32
32
|
@wf.description do
|
33
33
|
parallel :wait do
|
34
34
|
parallel_branch do
|
35
|
-
call :a_1, :endpoint1, :call => Proc.new{ sleep 0.2 }
|
35
|
+
call :a_1, :endpoint1, parameters: { :call => Proc.new{ sleep 0.2 } }
|
36
36
|
end
|
37
37
|
parallel_branch do
|
38
|
-
call :a_2, :endpoint1, :call => Proc.new{ sleep 0.5 }
|
38
|
+
call :a_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
|
39
39
|
end
|
40
40
|
end
|
41
41
|
call :a_3, :endpoint1
|
@@ -50,11 +50,11 @@ class TestParallel < Test::Unit::TestCase
|
|
50
50
|
@wf.description do
|
51
51
|
parallel :wait => 1 do
|
52
52
|
parallel_branch do
|
53
|
+
sleep 0.5
|
53
54
|
call :a_1, :endpoint1
|
54
|
-
Thread.pass
|
55
55
|
end
|
56
56
|
parallel_branch do
|
57
|
-
call :a_2, :endpoint1, :call => Proc.new{ sleep 8.5 }
|
57
|
+
call :a_2, :endpoint1, parameters: { :call => Proc.new{ sleep 8.5 } }
|
58
58
|
end
|
59
59
|
end
|
60
60
|
call :a_3, :endpoint1
|
@@ -68,10 +68,10 @@ class TestParallel < Test::Unit::TestCase
|
|
68
68
|
@wf.description do
|
69
69
|
parallel :wait => 1 do
|
70
70
|
parallel_branch do
|
71
|
-
call :a_1, :endpoint1, :call => Proc.new{ sleep 0.2 }
|
71
|
+
call :a_1, :endpoint1, parameters: { :call => Proc.new{ sleep 0.2 } }
|
72
72
|
end
|
73
73
|
parallel_branch do
|
74
|
-
call :a_2, :endpoint1, :call => Proc.new{ sleep 0.5 }
|
74
|
+
call :a_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
|
75
75
|
call :a_2_2, :endpoint1
|
76
76
|
end
|
77
77
|
end
|
@@ -97,13 +97,13 @@ class TestParallel < Test::Unit::TestCase
|
|
97
97
|
parallel :wait do
|
98
98
|
parallel_branch do
|
99
99
|
parallel :wait do
|
100
|
-
parallel_branch do call :a_2_1_1, :endpoint1, :call => Proc.new {sleep 0.2} end
|
101
|
-
parallel_branch do call :a_2_1_2, :endpoint1, :call => Proc.new {sleep 0.4}
|
100
|
+
parallel_branch do call :a_2_1_1, :endpoint1, parameters: { :call => Proc.new {sleep 0.2} } end
|
101
|
+
parallel_branch do call :a_2_1_2, :endpoint1, parameters: { :call => Proc.new {sleep 0.4} } end
|
102
102
|
end
|
103
|
-
call :a_2_1_3, :endpoint1, :call => Proc.new {sleep 0.8}
|
103
|
+
call :a_2_1_3, :endpoint1, parameters: { :call => Proc.new {sleep 0.8} }
|
104
104
|
end
|
105
|
-
parallel_branch do call :a_2_2, :endpoint1, :call => Proc.new {sleep 0.8}
|
106
|
-
parallel_branch do call :a_2_3, :endpoint1, :call => Proc.new {sleep 1.0}
|
105
|
+
parallel_branch do call :a_2_2, :endpoint1, parameters: { :call => Proc.new {sleep 0.8} } end
|
106
|
+
parallel_branch do call :a_2_3, :endpoint1, parameters: { :call => Proc.new {sleep 1.0} } end
|
107
107
|
end
|
108
108
|
end
|
109
109
|
end
|
data/test/basic/tc_wf_control.rb
CHANGED
@@ -21,7 +21,7 @@ class TestWorkflowControl < Test::Unit::TestCase
|
|
21
21
|
def test_stop
|
22
22
|
@wf.description do
|
23
23
|
call :a_test_1_1, :endpoint1
|
24
|
-
call :a_test_1_2, :endpoint1, { :call => Proc.new{ sleep 0.5 } }
|
24
|
+
call :a_test_1_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
|
25
25
|
call :a_test_1_3, :endpoint1
|
26
26
|
end
|
27
27
|
@wf.search WEEL::Position.new(:a_test_1_1, :at)
|
@@ -41,7 +41,7 @@ class TestWorkflowControl < Test::Unit::TestCase
|
|
41
41
|
def test_continue
|
42
42
|
@wf.description do
|
43
43
|
call :a_test_1_1, :endpoint1
|
44
|
-
call :a_test_1_2, :endpoint1, :call => Proc.new{ sleep 0.5 }
|
44
|
+
call :a_test_1_2, :endpoint1, parameters: { :call => Proc.new{ sleep 0.5 } }
|
45
45
|
call :a_test_1_3, :endpoint1
|
46
46
|
end
|
47
47
|
@wf.start
|
data/test/exec/tc_again.rb
CHANGED
@@ -1,19 +1,21 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
require File.expand_path(::File.dirname(__FILE__) + '/../TestWorkflow')
|
3
3
|
|
4
|
-
class
|
4
|
+
class TestAgain < Test::Unit::TestCase
|
5
5
|
include TestMixin
|
6
6
|
|
7
7
|
def test_again
|
8
8
|
@wf.data[:a] = 0
|
9
9
|
@wf.description do
|
10
|
-
call :a_1, :again, :
|
10
|
+
call :a_1, :again, parameters: { :again => Proc.new{data.a < 2} }, update: -> do
|
11
|
+
data.a += 1
|
12
|
+
end, finalize: -> do
|
11
13
|
data.a += 1
|
12
14
|
end
|
13
15
|
end
|
14
16
|
@wf.start.join
|
15
17
|
wf_assert("CALL a_1")
|
16
|
-
wf_sassert("|running|
|
18
|
+
wf_sassert("|running|Ca_1Ma_1Ma_1Ma_1Da_1|finished|")
|
17
19
|
assert(@wf.data[:a] == 3)
|
18
20
|
end
|
19
21
|
|
@@ -9,10 +9,10 @@ class TestWFPGeneralSynchronizingMerge < Test::Unit::TestCase
|
|
9
9
|
@wf.description do
|
10
10
|
parallel do
|
11
11
|
parallel_branch do
|
12
|
-
call :a1_1, :endpoint1, :call => Proc.new{sleep 0.2}
|
12
|
+
call :a1_1, :endpoint1, parameters: { :call => Proc.new{sleep 0.2} }
|
13
13
|
end
|
14
14
|
parallel_branch do
|
15
|
-
call :a1_2, :endpoint1, :call => Proc.new{sleep 0.4}
|
15
|
+
call :a1_2, :endpoint1, parameters: { :call => Proc.new{sleep 0.4} }
|
16
16
|
end
|
17
17
|
choose do
|
18
18
|
alternative(true) do
|
@@ -20,13 +20,13 @@ class TestWFPGeneralSynchronizingMerge < Test::Unit::TestCase
|
|
20
20
|
parallel_branch do
|
21
21
|
call :a2_1, :endpoint1
|
22
22
|
end
|
23
|
-
call(:a2_decide, :endpoint1, :result => false) do |e|
|
23
|
+
call(:a2_decide, :endpoint1, parameters: { :result => false}) do |e|
|
24
24
|
data.break = e
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
28
|
otherwise do
|
29
|
-
call :a2_2, :endpoint1, :call => Proc.new{sleep 0.1}
|
29
|
+
call :a2_2, :endpoint1, parameters: { :call => Proc.new{sleep 0.1} }
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -8,10 +8,10 @@ class TestWFPLocalSynchronizingMerge < Test::Unit::TestCase
|
|
8
8
|
@wf.description do
|
9
9
|
parallel do
|
10
10
|
parallel_branch do
|
11
|
-
call :a1_1, :endpoint1, :call => Proc.new{sleep 0.2}
|
11
|
+
call :a1_1, :endpoint1, parameters: { :call => Proc.new{sleep 0.2} }
|
12
12
|
end
|
13
13
|
parallel_branch do
|
14
|
-
call :a1_2, :endpoint1, :call => Proc.new{sleep 0.4}
|
14
|
+
call :a1_2, :endpoint1, parameters: { :call => Proc.new{sleep 0.4} }
|
15
15
|
end
|
16
16
|
choose do
|
17
17
|
alternative(false) do
|
@@ -20,7 +20,7 @@ class TestWFPLocalSynchronizingMerge < Test::Unit::TestCase
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
otherwise do
|
23
|
-
call :a2_2, :endpoint1, :call => Proc.new{sleep 0.1}
|
23
|
+
call :a2_2, :endpoint1, parameters: { :call => Proc.new{sleep 0.1} }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -9,11 +9,11 @@ class TestWFPStructuredDiscriminator < Test::Unit::TestCase
|
|
9
9
|
@wf.description do
|
10
10
|
parallel :wait => 1 do
|
11
11
|
parallel_branch do
|
12
|
+
sleep 0.5
|
12
13
|
call :a_1_1, :endpoint1
|
13
|
-
Thread.pass
|
14
14
|
end
|
15
15
|
parallel_branch do
|
16
|
-
call :a_1_2, :endpoint1, :call => Proc.new{sleep
|
16
|
+
call :a_1_2, :endpoint1, parameters: { :call => Proc.new{sleep 8.2} }
|
17
17
|
end
|
18
18
|
end
|
19
19
|
call :a_2, :endpoint1
|
@@ -12,19 +12,19 @@ class TestWFPCancellingStructuredPartialJoin < Test::Unit::TestCase
|
|
12
12
|
call :a_1, :endpoint1
|
13
13
|
end
|
14
14
|
parallel_branch do
|
15
|
-
call :a_2, :endpoint1, :call => Proc.new{sleep 0.2}
|
15
|
+
call :a_2, :endpoint1, parameters: { :call => Proc.new{sleep 0.2} }
|
16
16
|
end
|
17
17
|
parallel_branch do
|
18
18
|
call :a_3, :endpoint1
|
19
19
|
end
|
20
20
|
parallel_branch do
|
21
|
-
call :a_4, :endpoint1, :call => Proc.new{sleep 0.6}
|
21
|
+
call :a_4, :endpoint1, parameters: { :call => Proc.new{sleep 0.6} }
|
22
22
|
end
|
23
23
|
parallel_branch do
|
24
24
|
call :a_5, :endpoint1
|
25
25
|
end
|
26
26
|
end
|
27
|
-
call :a_6, :endpoint1, :call => Proc.new{sleep 0.2}
|
27
|
+
call :a_6, :endpoint1, parameters: { :call => Proc.new{sleep 0.2} }
|
28
28
|
end
|
29
29
|
t = @wf.start.join
|
30
30
|
wf_assert("CALL a_1:")
|
@@ -9,13 +9,13 @@ class TestWFPDeferredChoice < Test::Unit::TestCase
|
|
9
9
|
@wf.description do
|
10
10
|
parallel :wait=>1 do
|
11
11
|
parallel_branch do
|
12
|
-
call :a1_1, :endpoint1, :call => Proc.new{sleep 0.5} do
|
12
|
+
call :a1_1, :endpoint1, parameters: { :call => Proc.new{sleep 0.5} } do
|
13
13
|
data.choice = 1
|
14
14
|
end
|
15
15
|
Thread.pass
|
16
16
|
end
|
17
17
|
parallel_branch do
|
18
|
-
call
|
18
|
+
call :a1_2, :endpoint1, parameters: { :call => Proc.new{sleep 1.0} } do
|
19
19
|
data.choice = 2
|
20
20
|
end
|
21
21
|
end
|
data/weel.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "weel"
|
3
|
-
s.version = "1.99.
|
3
|
+
s.version = "1.99.39"
|
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)"
|
7
7
|
|
8
8
|
s.description = "see http://cpee.org"
|
9
9
|
|
10
|
-
s.required_ruby_version = '>=
|
10
|
+
s.required_ruby_version = '>=2.0.0'
|
11
11
|
|
12
12
|
s.files = Dir['{example/**/*,lib/weel.rb}'] + %w(COPYING Changelog FEATURES INSTALL Rakefile weel.gemspec README AUTHORS)
|
13
13
|
s.require_path = 'lib'
|
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.
|
4
|
+
version: 1.99.39
|
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: 2015-02
|
12
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 2.0.0
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
99
|
- - ">="
|