openwferu 0.9.16 → 0.9.17
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/about_state.rb +81 -0
- data/examples/engine_template.rb +7 -0
- data/lib/openwfe/contextual.rb +2 -2
- data/lib/openwfe/def.rb +2 -3
- data/lib/openwfe/{util/schedulers.rb → engine.rb} +3 -39
- data/lib/openwfe/engine/engine.rb +202 -251
- data/lib/openwfe/engine/process_status.rb +359 -0
- data/lib/openwfe/expool/errorjournal.rb +6 -6
- data/lib/openwfe/expool/expressionpool.rb +161 -239
- data/lib/openwfe/expool/expstorage.rb +185 -55
- data/lib/openwfe/expool/journal.rb +1 -2
- data/lib/openwfe/expool/parser.rb +233 -0
- data/lib/openwfe/expool/threadedexpstorage.rb +6 -18
- data/lib/openwfe/expool/wfidgen.rb +25 -7
- data/lib/openwfe/expool/yamlexpstorage.rb +60 -37
- data/lib/openwfe/expressions/condition.rb +49 -12
- data/lib/openwfe/expressions/environment.rb +45 -15
- data/lib/openwfe/expressions/expressionmap.rb +39 -19
- data/lib/openwfe/expressions/fe_concurrence.rb +24 -13
- data/lib/openwfe/expressions/fe_cron.rb +19 -18
- data/lib/openwfe/expressions/fe_cursor.rb +69 -28
- data/lib/openwfe/expressions/fe_define.rb +4 -1
- data/lib/openwfe/expressions/fe_do.rb +1 -3
- data/lib/openwfe/expressions/fe_equals.rb +131 -20
- data/lib/openwfe/expressions/fe_fqv.rb +27 -3
- data/lib/openwfe/expressions/fe_iterator.rb +14 -7
- data/lib/openwfe/expressions/fe_listen.rb +7 -2
- data/lib/openwfe/expressions/fe_misc.rb +187 -20
- data/lib/openwfe/expressions/fe_participant.rb +8 -7
- data/lib/openwfe/expressions/fe_reserve.rb +105 -33
- data/lib/openwfe/expressions/fe_save.rb +55 -5
- data/lib/openwfe/expressions/{fe_value.rb → fe_set.rb} +6 -82
- data/lib/openwfe/expressions/fe_sleep.rb +25 -15
- data/lib/openwfe/expressions/fe_subprocess.rb +2 -2
- data/lib/openwfe/expressions/fe_wait.rb +3 -2
- data/lib/openwfe/expressions/fe_when.rb +7 -15
- data/lib/openwfe/expressions/flowexpression.rb +90 -49
- data/lib/openwfe/expressions/merge.rb +7 -1
- data/lib/openwfe/expressions/raw.rb +261 -63
- data/lib/openwfe/expressions/{raw_prog.rb → rprocdef.rb} +94 -179
- data/lib/openwfe/expressions/time.rb +36 -12
- data/lib/openwfe/expressions/timeout.rb +9 -7
- data/lib/openwfe/expressions/value.rb +126 -0
- data/lib/openwfe/flowexpressionid.rb +52 -22
- data/lib/openwfe/listeners/listeners.rb +3 -3
- data/lib/openwfe/listeners/socketlisteners.rb +8 -5
- data/lib/openwfe/logging.rb +6 -3
- data/lib/openwfe/omixins.rb +8 -6
- data/lib/openwfe/orest/xmlcodec.rb +16 -12
- data/lib/openwfe/participants.rb +38 -0
- data/lib/openwfe/participants/participant.rb +1 -1
- data/lib/openwfe/participants/participantmap.rb +24 -10
- data/lib/openwfe/participants/participants.rb +4 -3
- data/lib/openwfe/participants/soapparticipants.rb +1 -1
- data/lib/openwfe/participants/socketparticipants.rb +1 -1
- data/lib/openwfe/rudefinitions.rb +7 -5
- data/lib/openwfe/storage/yamlcustom.rb +10 -10
- data/lib/openwfe/storage/yamlfilestorage.rb +12 -12
- data/lib/openwfe/tools/flowtracer.rb +6 -5
- data/lib/openwfe/util/dollar.rb +42 -85
- data/lib/openwfe/util/ometa.rb +1 -3
- data/lib/openwfe/util/workqueue.rb +1 -1
- data/lib/openwfe/utils.rb +33 -11
- data/lib/openwfe/version.rb +2 -2
- data/lib/openwfe/workitem.rb +76 -14
- data/lib/openwfe/worklist/storelocks.rb +9 -4
- data/lib/openwfe/worklist/storeparticipant.rb +1 -1
- data/test/back_0916_test.rb +101 -0
- data/test/bm/ft_26_load.rb +1 -1
- data/test/bm/ft_26b_load.rb +1 -1
- data/test/bm/ft_26c_load.rb +3 -2
- data/test/bm/ft_26d_load.rb +97 -0
- data/test/bm/ft_recu.rb +71 -0
- data/test/concurrence_test.rb +1 -1
- data/test/condition_test.rb +152 -0
- data/test/description_test.rb +12 -7
- data/test/eno_test.rb +1 -1
- data/test/expool_20031219_0916.tgz +0 -0
- data/test/fe_lookup_att_test.rb +1 -1
- data/test/fei_test.rb +16 -0
- data/test/file_persistence_test.rb +8 -12
- data/test/filep_cancel_test.rb +116 -0
- data/test/flowtestbase.rb +47 -25
- data/test/ft_0.rb +1 -1
- data/test/ft_10_loop.rb +29 -14
- data/test/{ft_10b_loop2.rb → ft_10b_loop.rb} +2 -11
- data/test/ft_11_ppd.rb +6 -17
- data/test/ft_11b_ppd.rb +1 -4
- data/test/ft_12_blockparticipant.rb +1 -1
- data/test/ft_13_eno.rb +1 -1
- data/test/ft_15_iterator.rb +1 -1
- data/test/ft_15b_iterator.rb +1 -1
- data/test/ft_17_condition.rb +6 -6
- data/test/ft_18_pname.rb +1 -1
- data/test/ft_20_cron.rb +1 -1
- data/test/ft_21_cron.rb +6 -4
- data/test/ft_22_history.rb +1 -1
- data/test/ft_23_when.rb +1 -1
- data/test/ft_23b_when.rb +18 -6
- data/test/ft_23c_wait.rb +8 -6
- data/test/ft_25_cancel.rb +7 -5
- data/test/ft_27_getflowpos.rb +22 -17
- data/test/ft_28_fileparticipant.rb +1 -2
- data/test/ft_2_concurrence.rb +1 -1
- data/test/ft_2b_concurrence.rb +25 -20
- data/test/ft_30_socketlistener.rb +0 -3
- data/test/ft_34_cancelwfid.rb +9 -9
- data/test/ft_35_localdefs.rb +0 -1
- data/test/ft_36_subprocids.rb +6 -6
- data/test/ft_38_tag.rb +3 -2
- data/test/ft_38b_tag.rb +229 -0
- data/test/ft_39_reserve.rb +3 -18
- data/test/ft_39b_reserve.rb +34 -5
- data/test/ft_3b_lookup_vf.rb +83 -0
- data/test/ft_40_defined.rb +2 -11
- data/test/ft_42_environments.rb +4 -6
- data/test/ft_44b_restore.rb +88 -22
- data/test/ft_45_citerator.rb +57 -11
- data/test/ft_49_condition.rb +4 -2
- data/test/ft_4_misc.rb +24 -3
- data/test/ft_50_xml_attribute.rb +17 -20
- data/test/ft_54_listen.rb +1 -1
- data/test/ft_54b_listen.rb +2 -2
- data/test/ft_56_timeout.rb +8 -1
- data/test/ft_57_a.rb +10 -10
- data/test/ft_59_ps.rb +49 -16
- data/test/ft_60_ecancel.rb +52 -10
- data/test/ft_63_pause.rb +8 -8
- data/test/ft_65_stringlaunch.rb +4 -6
- data/test/ft_67_schedlaunch.rb +4 -4
- data/test/ft_69_cancelmissing.rb +4 -2
- data/test/ft_70_lookupvar.rb +2 -2
- data/test/ft_72_lookup_processes.rb +2 -2
- data/test/ft_73_cancel_sub.rb +8 -8
- data/test/ft_77_segments.rb +38 -0
- data/test/ft_78_eval.rb +154 -0
- data/test/ft_79_tticket.rb +185 -0
- data/test/ft_80_spname.rb +95 -0
- data/test/ft_81_exp.rb +64 -0
- data/test/ft_82_trecu.rb +48 -0
- data/test/ft_83_badpause.rb +62 -0
- data/test/ft_84_updateexp.rb +125 -0
- data/test/ft_9b_cursor.rb +105 -0
- data/test/ft_tests.rb +14 -1
- data/test/hash_test.rb +7 -7
- data/test/hparticipant_test.rb +4 -4
- data/test/lookup_vf_test.rb +94 -0
- data/test/misc_test.rb +5 -3
- data/test/orest_test.rb +4 -3
- data/test/param_test.rb +12 -16
- data/test/participant_test.rb +36 -0
- data/test/pending.rb +10 -10
- data/test/rake_ltest.rb +1 -10
- data/test/rake_qtest.rb +7 -6
- data/test/raw_prog_test.rb +89 -121
- data/test/restart_cron_test.rb +84 -36
- data/test/restart_paused_test.rb +100 -0
- data/test/restart_sleep_test.rb +1 -1
- data/test/restart_tests.rb +1 -0
- data/test/restart_when_test.rb +33 -22
- data/test/ruby_procdef_test.rb +19 -18
- data/test/sec_test.rb +74 -35
- data/test/storage_test.rb +44 -0
- data/test/test.rb +3 -0
- data/test/timeout_test.rb +7 -18
- data/test/wfid_test.rb +2 -1
- data/test/wi_test.rb +29 -18
- metadata +121 -57
- data/lib/openwfe/expressions/raw_xml.rb +0 -176
- data/lib/openwfe/expressions/simplerep.rb +0 -266
- data/lib/openwfe/util/kotoba.rb +0 -236
- data/lib/openwfe/util/lru.rb +0 -171
- data/lib/openwfe/util/otime.rb +0 -246
- data/lib/openwfe/util/safe.rb +0 -160
- data/lib/openwfe/util/scheduler.rb +0 -1158
- data/test/cron_test.rb +0 -113
- data/test/cronline_test.rb +0 -60
- data/test/dollar_test.rb +0 -90
- data/test/kotoba_test.rb +0 -72
- data/test/lru_test.rb +0 -79
- data/test/safely_test.rb +0 -84
- data/test/scheduler_1_test.rb +0 -88
- data/test/scheduler_test.rb +0 -363
- data/test/time_test.rb +0 -84
data/test/ft_39_reserve.rb
CHANGED
@@ -37,26 +37,11 @@ class FlowTest39 < Test::Unit::TestCase
|
|
37
37
|
dotest TestReserve39a0, "ok", true
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
40
|
#
|
42
41
|
# Test 1
|
43
42
|
#
|
44
|
-
|
45
|
-
|
46
|
-
sequence do
|
47
|
-
reserve :mutex => :toto do
|
48
|
-
_print "${r:'${toto}' != ''}"
|
49
|
-
end
|
50
|
-
_print "${r:'${toto}' == ''}"
|
51
|
-
_print "over."
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_1
|
56
|
-
|
57
|
-
dotest TestReserve39a1, "true\ntrue\nover.", true
|
58
|
-
end
|
59
|
-
|
43
|
+
|
44
|
+
# became obsolete
|
60
45
|
|
61
46
|
#
|
62
47
|
# Test 2
|
@@ -74,7 +59,7 @@ class FlowTest39 < Test::Unit::TestCase
|
|
74
59
|
end
|
75
60
|
|
76
61
|
def test_3
|
77
|
-
dotest
|
62
|
+
dotest TestReserve39a3, "", true
|
78
63
|
end
|
79
64
|
|
80
65
|
end
|
data/test/ft_39b_reserve.rb
CHANGED
@@ -30,13 +30,13 @@ class FlowTest39b < Test::Unit::TestCase
|
|
30
30
|
# doesn't prove it enough though...
|
31
31
|
#
|
32
32
|
concurrence do
|
33
|
-
reserve :mutex => :toto
|
33
|
+
reserve :mutex => :toto do
|
34
34
|
sequence do
|
35
35
|
test_alpha
|
36
36
|
test_bravo
|
37
37
|
end
|
38
38
|
end
|
39
|
-
reserve :mutex => :toto
|
39
|
+
reserve :mutex => :toto do
|
40
40
|
sequence do
|
41
41
|
test_charly
|
42
42
|
test_delta
|
@@ -45,7 +45,9 @@ class FlowTest39b < Test::Unit::TestCase
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
48
|
+
def test_0
|
49
|
+
|
50
|
+
#log_level_to_debug
|
49
51
|
|
50
52
|
dotest(
|
51
53
|
TestReserve39b0,
|
@@ -62,8 +64,35 @@ test-bravo
|
|
62
64
|
test-charly
|
63
65
|
test-delta
|
64
66
|
""".strip
|
65
|
-
]
|
66
|
-
|
67
|
+
])
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# Test 1
|
72
|
+
#
|
73
|
+
|
74
|
+
class TestReserve39b1 < ProcessDefinition
|
75
|
+
concurrence do
|
76
|
+
reserve :mutex => :toto do
|
77
|
+
test_b
|
78
|
+
end
|
79
|
+
sequence do
|
80
|
+
reserve :mutex => :toto do
|
81
|
+
test_c
|
82
|
+
end
|
83
|
+
reserve :mutex => :toto do
|
84
|
+
test_d
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def test_1
|
91
|
+
|
92
|
+
dotest TestReserve39b1, "test-b\ntest-c\ntest-d"
|
93
|
+
#
|
94
|
+
# currently the only combination produced, could change
|
95
|
+
# with later versions of Ruby...
|
67
96
|
end
|
68
97
|
|
69
98
|
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Wed Jan 9 22:52:06 JST 2008
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'flowtestbase'
|
11
|
+
|
12
|
+
|
13
|
+
class FlowTest3b < Test::Unit::TestCase
|
14
|
+
include FlowTestBase
|
15
|
+
|
16
|
+
#def setup
|
17
|
+
#end
|
18
|
+
|
19
|
+
#def teardown
|
20
|
+
#end
|
21
|
+
|
22
|
+
class Def0 < OpenWFE::ProcessDefinition
|
23
|
+
sequence do
|
24
|
+
|
25
|
+
# variable
|
26
|
+
|
27
|
+
set :v => "v0", :val => "val0"
|
28
|
+
|
29
|
+
equals :variable => "v0", :other_value => "val0"
|
30
|
+
_print "${f:__result__}"
|
31
|
+
|
32
|
+
equals :variable_value => "v0", :other_value => "val0"
|
33
|
+
_print "${f:__result__}"
|
34
|
+
|
35
|
+
equals :var_value => "v0", :other_value => "val0"
|
36
|
+
_print "${f:__result__}"
|
37
|
+
|
38
|
+
equals :v_value => "v0", :other_value => "val0"
|
39
|
+
_print "${f:__result__}"
|
40
|
+
|
41
|
+
equals :var => "v0", :other_value => "val0"
|
42
|
+
_print "${f:__result__}"
|
43
|
+
|
44
|
+
equals :v => "v0", :other_value => "val0"
|
45
|
+
_print "${f:__result__}"
|
46
|
+
|
47
|
+
equals :v => "v0", :other_val => "val0"
|
48
|
+
_print "${f:__result__}"
|
49
|
+
|
50
|
+
equals :val => "val0", :other_val => "val0"
|
51
|
+
_print "${f:__result__}"
|
52
|
+
|
53
|
+
# field
|
54
|
+
|
55
|
+
set :f => "f0", :val => "f_val0"
|
56
|
+
|
57
|
+
equals :field_value => "f0", :other_value => "f_val0"
|
58
|
+
_print "${f:__result__}"
|
59
|
+
|
60
|
+
equals :f_value => "f0", :other_value => "f_val0"
|
61
|
+
_print "${f:__result__}"
|
62
|
+
|
63
|
+
equals :field => "f0", :other_value => "f_val0"
|
64
|
+
_print "${f:__result__}"
|
65
|
+
|
66
|
+
equals :field => "f0", :value => "f_val0"
|
67
|
+
_print "${f:__result__}"
|
68
|
+
|
69
|
+
equals :f => "f0", :other_value => "f_val0"
|
70
|
+
_print "${f:__result__}"
|
71
|
+
|
72
|
+
# damn, I could use a Rufus subprocess... but it's 11pm...
|
73
|
+
# copy, paste is just fine for a test...
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_0
|
78
|
+
|
79
|
+
dotest Def0, ([ "true" ] * 13).join("\n")
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
data/test/ft_40_defined.rb
CHANGED
@@ -54,19 +54,10 @@ class FlowTest40 < Test::Unit::TestCase
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def test_0
|
57
|
+
|
57
58
|
dotest(
|
58
59
|
TestDefined40a0,
|
59
|
-
""
|
60
|
-
false
|
61
|
-
true
|
62
|
-
true
|
63
|
-
true
|
64
|
-
false
|
65
|
-
true
|
66
|
-
false
|
67
|
-
true
|
68
|
-
""".strip,
|
69
|
-
true)
|
60
|
+
%w{ false true true true false true false true }.join("\n"))
|
70
61
|
end
|
71
62
|
|
72
63
|
end
|
data/test/ft_42_environments.rb
CHANGED
@@ -39,11 +39,9 @@ class FlowTest42 < Test::Unit::TestCase
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
#def xxxx_0
|
43
42
|
def test_0
|
44
|
-
|
45
|
-
|
46
|
-
[ "v:b", "v:c" ])
|
43
|
+
|
44
|
+
dotest TestCase42a0, [ "v:b", "v:c" ]
|
47
45
|
end
|
48
46
|
|
49
47
|
|
@@ -67,8 +65,8 @@ class FlowTest42 < Test::Unit::TestCase
|
|
67
65
|
end
|
68
66
|
end
|
69
67
|
|
70
|
-
def
|
71
|
-
|
68
|
+
def _test_1
|
69
|
+
|
72
70
|
dotest(
|
73
71
|
TestCase42a1,
|
74
72
|
"v:d",
|
data/test/ft_44b_restore.rb
CHANGED
@@ -37,7 +37,6 @@ class FlowTest44b < Test::Unit::TestCase
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
#def xxxx_0
|
41
40
|
def test_0
|
42
41
|
dotest(
|
43
42
|
TestCase44b0,
|
@@ -65,14 +64,9 @@ v
|
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
68
|
-
#def xxxx_1
|
69
67
|
def test_1
|
70
|
-
|
71
|
-
|
72
|
-
"""
|
73
|
-
field_value_x
|
74
|
-
field_value
|
75
|
-
""".strip)
|
68
|
+
|
69
|
+
dotest TestCase44b1, "field_value_x\nfield_value"
|
76
70
|
end
|
77
71
|
|
78
72
|
|
@@ -113,14 +107,9 @@ field_value
|
|
113
107
|
end
|
114
108
|
end
|
115
109
|
|
116
|
-
#def xxxx_3
|
117
110
|
def test_3
|
118
|
-
|
119
|
-
|
120
|
-
"""
|
121
|
-
value_aa
|
122
|
-
value_b
|
123
|
-
""".strip)
|
111
|
+
|
112
|
+
dotest TestCase44b3, "value_aa\nvalue_b"
|
124
113
|
end
|
125
114
|
|
126
115
|
|
@@ -141,14 +130,91 @@ value_b
|
|
141
130
|
end
|
142
131
|
end
|
143
132
|
|
144
|
-
#def xxxx_4
|
145
133
|
def test_4
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
134
|
+
|
135
|
+
dotest TestCase44b4, "value_a\nvalue_b"
|
136
|
+
end
|
137
|
+
|
138
|
+
# tests about set_fields...
|
139
|
+
|
140
|
+
#
|
141
|
+
# Test 5
|
142
|
+
#
|
143
|
+
|
144
|
+
class Test44b5 < ProcessDefinition
|
145
|
+
sequence do
|
146
|
+
set_fields :value => {
|
147
|
+
"customer" => { "name" => "Zigue", "age" => 34 },
|
148
|
+
"approved" => false }
|
149
|
+
_print "${f:customer.name} (${f:customer.age}) ${f:approved}"
|
150
|
+
#pp_fields
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def test_5
|
155
|
+
|
156
|
+
dotest Test44b5, "Zigue (34) false"
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
# Test 6
|
161
|
+
#
|
162
|
+
|
163
|
+
class Test44b6 < ProcessDefinition
|
164
|
+
set_fields :value => {
|
165
|
+
"customer" => { "name" => "Zigue", "age" => 34 },
|
166
|
+
"approved" => false }
|
167
|
+
sequence do
|
168
|
+
_print "${f:customer.name} (${f:customer.age}) ${f:approved}"
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
def test_6
|
173
|
+
|
174
|
+
dotest Test44b6, "Zigue (34) false"
|
175
|
+
end
|
176
|
+
|
177
|
+
#
|
178
|
+
# Test 7
|
179
|
+
#
|
180
|
+
|
181
|
+
# not yet
|
182
|
+
|
183
|
+
class Test44b7 < ProcessDefinition
|
184
|
+
set_fields do
|
185
|
+
{
|
186
|
+
"customer" => { "name" => "Zigue", "age" => 34 },
|
187
|
+
"approved" => false
|
188
|
+
}
|
189
|
+
end
|
190
|
+
sequence do
|
191
|
+
_print "${f:customer.name} (${f:customer.age}) ${f:approved}"
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
def _test_7
|
196
|
+
|
197
|
+
dotest Test44b7, "Zigue (34) false"
|
198
|
+
end
|
199
|
+
|
200
|
+
#
|
201
|
+
# Test 8
|
202
|
+
#
|
203
|
+
|
204
|
+
class Test44b8 < ProcessDefinition
|
205
|
+
set_fields :value => {
|
206
|
+
"customer" => { "name" => "Zigue", "age" => 34 },
|
207
|
+
"approved" => false }, :merge_lead => :current
|
208
|
+
sequence do
|
209
|
+
_print "${f:customer.name} (${f:customer.age}) ${f:approved}"
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
def test_8
|
214
|
+
|
215
|
+
li = LaunchItem.new Test44b8
|
216
|
+
li.approved = true
|
217
|
+
dotest li, "Zigue (34) true"
|
152
218
|
end
|
153
219
|
|
154
220
|
end
|
data/test/ft_45_citerator.rb
CHANGED
@@ -34,7 +34,6 @@ class FlowTest45 < Test::Unit::TestCase
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
#def xxxx_0
|
38
37
|
def test_0
|
39
38
|
dotest(
|
40
39
|
TestCase45a0,
|
@@ -65,7 +64,6 @@ done.
|
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
68
|
-
#def xxxx_1
|
69
67
|
def test_1
|
70
68
|
dotest(
|
71
69
|
TestCase45a1,
|
@@ -101,8 +99,7 @@ done.
|
|
101
99
|
|
102
100
|
# test 'parked' for now
|
103
101
|
|
104
|
-
def
|
105
|
-
#def test_2
|
102
|
+
def _test_2
|
106
103
|
dotest(
|
107
104
|
TestCase45a2,
|
108
105
|
"""
|
@@ -126,15 +123,64 @@ done.
|
|
126
123
|
end
|
127
124
|
end
|
128
125
|
|
129
|
-
# test 'parked' for now
|
130
|
-
|
131
|
-
#def xxxx_3
|
132
126
|
def test_3
|
127
|
+
dotest TestCase45a3, "done."
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
#
|
132
|
+
# Test 4
|
133
|
+
#
|
134
|
+
|
135
|
+
class TestCase45a4 < ProcessDefinition
|
136
|
+
sequence do
|
137
|
+
concurrent_iterator :on => "a, b, c", :to_field => "f" do
|
138
|
+
_print "${f:f}"
|
139
|
+
end
|
140
|
+
set :var => "v", :value => "1, 2"
|
141
|
+
concurrent_iterator :on_variable_value => "v", :to_field => "f" do
|
142
|
+
_print "${f:f}"
|
143
|
+
end
|
144
|
+
concurrent_iterator :on_var_value => "v", :to_field => "f" do
|
145
|
+
_print "${f:f}"
|
146
|
+
end
|
147
|
+
concurrent_iterator :on_var => "v", :to_field => "f" do
|
148
|
+
_print "${f:f}"
|
149
|
+
end
|
150
|
+
_print "done."
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def test_4
|
155
|
+
|
133
156
|
dotest(
|
134
|
-
|
135
|
-
"""
|
136
|
-
|
137
|
-
|
157
|
+
TestCase45a4,
|
158
|
+
%w{ a b c 1 2 1 2 1 2 }.join("\n") + "\ndone.")
|
159
|
+
end
|
160
|
+
|
161
|
+
|
162
|
+
#
|
163
|
+
# Test 5
|
164
|
+
#
|
165
|
+
|
166
|
+
class TestCase45a5 < ProcessDefinition
|
167
|
+
sequence do
|
168
|
+
set :f => "f0", :value => "1, 2"
|
169
|
+
concurrent_iterator :on_f => "f0", :to_field => "f" do
|
170
|
+
_print "${f:f}"
|
171
|
+
end
|
172
|
+
concurrent_iterator :on_f => :f0, :to_field => "f" do
|
173
|
+
_print "${f:f}"
|
174
|
+
end
|
175
|
+
_print "done."
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
def test_5
|
180
|
+
|
181
|
+
dotest(
|
182
|
+
TestCase45a5,
|
183
|
+
%w{ 1 2 1 2 }.join("\n") + "\ndone.")
|
138
184
|
end
|
139
185
|
|
140
186
|
end
|