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_49_condition.rb
CHANGED
@@ -33,9 +33,11 @@ class FlowTest49 < Test::Unit::TestCase
|
|
33
33
|
_print "1 ${f:__result__}"
|
34
34
|
_if :test => "false; true"
|
35
35
|
_print "2 ${f:__result__}"
|
36
|
-
_if :test => "print ''; true"
|
36
|
+
#_if :test => "print ''; true"
|
37
|
+
_if :test => "''; true"
|
37
38
|
_print "3 ${f:__result__}"
|
38
|
-
_if :test => "begin print ''; end; true"
|
39
|
+
#_if :test => "begin print ''; end; true"
|
40
|
+
_if :test => "begin ''; end; true"
|
39
41
|
_print "4 ${f:__result__}"
|
40
42
|
|
41
43
|
unset :field => "__result__"
|
data/test/ft_4_misc.rb
CHANGED
@@ -100,7 +100,7 @@ class FlowTest4 < Test::Unit::TestCase
|
|
100
100
|
"""
|
101
101
|
end
|
102
102
|
def test_reval_4
|
103
|
-
dotest Reval4, [ "hello\
|
103
|
+
dotest Reval4, [ "hello\n2", "hello\n1" ]
|
104
104
|
end
|
105
105
|
|
106
106
|
class Reval5 < OpenWFE::ProcessDefinition
|
@@ -109,13 +109,34 @@ class FlowTest4 < Test::Unit::TestCase
|
|
109
109
|
wi.customer_name = 'dubious'
|
110
110
|
'surf'
|
111
111
|
"""
|
112
|
-
_print "${f:customer_name}"
|
113
112
|
_print "${f:__result__}"
|
113
|
+
_print "${f:customer_name}"
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
117
|
def test_reval_5
|
118
|
-
dotest Reval5, "
|
118
|
+
dotest Reval5, "surf\ndubious"
|
119
|
+
end
|
120
|
+
|
121
|
+
class Reval6 < OpenWFE::ProcessDefinition
|
122
|
+
sequence do
|
123
|
+
set :field => "f0", :value => "3 + 2 + 2"
|
124
|
+
set :field => "f1" do
|
125
|
+
reval :field_code => "f0"
|
126
|
+
end
|
127
|
+
_print "${f:f1}"
|
128
|
+
|
129
|
+
set :variable => "v0", :value => "5 - 5"
|
130
|
+
set :variable => "v1" do
|
131
|
+
reval :variable_code => "v0"
|
132
|
+
end
|
133
|
+
_print "${v1}"
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
def test_reval_6
|
138
|
+
#log_level_to_debug
|
139
|
+
dotest Reval6, "7\n0"
|
119
140
|
end
|
120
141
|
|
121
142
|
#
|
data/test/ft_50_xml_attribute.rb
CHANGED
@@ -56,7 +56,6 @@ END
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
#def xxxx_0
|
60
59
|
def test_0
|
61
60
|
|
62
61
|
doc0 = nil
|
@@ -91,24 +90,19 @@ END
|
|
91
90
|
#
|
92
91
|
# Against bug #10150
|
93
92
|
#
|
94
|
-
def test_2
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
#puts workitem.to_s
|
108
|
-
#puts w.to_s
|
109
|
-
|
110
|
-
assert_equal workitem.to_s, w.to_s
|
111
|
-
end
|
93
|
+
#def test_2
|
94
|
+
# workitem = OpenWFE::InFlowWorkItem.new
|
95
|
+
# workitem.fei = new_fei
|
96
|
+
# workitem.result = REXML::Document.new PAT_XML
|
97
|
+
# s = OpenWFE::XmlCodec::encode workitem
|
98
|
+
# #puts s
|
99
|
+
# w = OpenWFE::XmlCodec::decode s
|
100
|
+
# w.attributes.delete '___map_type'
|
101
|
+
# #puts workitem.to_s
|
102
|
+
# #puts
|
103
|
+
# #puts w.to_s
|
104
|
+
# assert_equal workitem.to_s, w.to_s
|
105
|
+
#end
|
112
106
|
|
113
107
|
def test_3
|
114
108
|
|
@@ -125,14 +119,17 @@ END
|
|
125
119
|
#puts s
|
126
120
|
|
127
121
|
w = OpenWFE::XmlCodec::decode s
|
122
|
+
w.attributes.delete '___map_type'
|
123
|
+
|
124
|
+
workitem.attributes.delete '___map_type'
|
128
125
|
|
129
126
|
#puts workitem.to_s
|
127
|
+
#puts
|
130
128
|
#puts w.to_s
|
131
129
|
|
132
130
|
assert_equal workitem.to_s, w.to_s
|
133
131
|
end
|
134
132
|
|
135
|
-
#def xxxx_4
|
136
133
|
def test_4
|
137
134
|
|
138
135
|
doc0 = nil
|
data/test/ft_54_listen.rb
CHANGED
data/test/ft_54b_listen.rb
CHANGED
@@ -39,7 +39,7 @@ class FlowTest54b < Test::Unit::TestCase
|
|
39
39
|
|
40
40
|
@engine.launch Test0
|
41
41
|
|
42
|
-
sleep 0.
|
42
|
+
sleep 0.350
|
43
43
|
|
44
44
|
assert_equal @tracer.to_s, ""
|
45
45
|
|
@@ -49,7 +49,7 @@ class FlowTest54b < Test::Unit::TestCase
|
|
49
49
|
r = @engine.reply wi
|
50
50
|
assert r
|
51
51
|
|
52
|
-
sleep 0.
|
52
|
+
sleep 0.350
|
53
53
|
|
54
54
|
#
|
55
55
|
# "post test", checking that engine replies 'false' when
|
data/test/ft_56_timeout.rb
CHANGED
@@ -41,13 +41,20 @@ class FlowTest56 < Test::Unit::TestCase
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
#def xxxx_0
|
45
44
|
def test_0
|
46
45
|
|
47
46
|
assert_no_jobs_left
|
48
47
|
|
49
48
|
dotest Test0, "ok\ndone"
|
50
49
|
|
50
|
+
sleep 0.350 # skip one scheduler beat
|
51
|
+
|
52
|
+
#s = @engine.get_scheduler
|
53
|
+
#class << s
|
54
|
+
# attr_reader :pending_jobs
|
55
|
+
#end
|
56
|
+
#p s.pending_jobs.collect { |j| [ j.job_id, j.class.name ] }
|
57
|
+
|
51
58
|
assert_no_jobs_left
|
52
59
|
end
|
53
60
|
|
data/test/ft_57_a.rb
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
require 'flowtestbase'
|
9
9
|
require 'pending'
|
10
10
|
require 'openwfe/def'
|
11
|
-
#require 'openwfe/participants/participants'
|
12
11
|
|
13
12
|
include OpenWFE
|
14
13
|
|
@@ -52,8 +51,8 @@ class FlowTest57 < Test::Unit::TestCase
|
|
52
51
|
end
|
53
52
|
end
|
54
53
|
|
55
|
-
#def xxxx_0
|
56
54
|
def test_0
|
55
|
+
|
57
56
|
dotest(
|
58
57
|
Test0,
|
59
58
|
"""
|
@@ -63,11 +62,11 @@ a|b|3
|
|
63
62
|
""".strip)
|
64
63
|
end
|
65
64
|
|
66
|
-
#def xxxx_1
|
67
65
|
def test_1
|
66
|
+
|
68
67
|
dotest(
|
69
68
|
"""
|
70
|
-
<process-definition name='
|
69
|
+
<process-definition name='57_b' revision='1'>
|
71
70
|
<sequence>
|
72
71
|
<set field='list'>
|
73
72
|
<a>
|
@@ -80,15 +79,15 @@ a|b|3
|
|
80
79
|
<print>${r:wi.list.join('|')}</print>
|
81
80
|
</sequence>
|
82
81
|
</process-definition>
|
83
|
-
"""
|
82
|
+
""",
|
84
83
|
"c|d|e")
|
85
84
|
end
|
86
85
|
|
87
|
-
#def xxxx_2
|
88
86
|
def test_2
|
87
|
+
|
89
88
|
dotest(
|
90
89
|
"""
|
91
|
-
<process-definition name='
|
90
|
+
<process-definition name='57_c' revision='2'>
|
92
91
|
<sequence>
|
93
92
|
<set field='list'>
|
94
93
|
<a>
|
@@ -99,10 +98,10 @@ a|b|3
|
|
99
98
|
</list>
|
100
99
|
</a>
|
101
100
|
</set>
|
102
|
-
<print>${r:wi.list.join('|')}</print>
|
101
|
+
<print>${r:wi.list.join('|').strip}</print>
|
103
102
|
</sequence>
|
104
103
|
</process-definition>
|
105
|
-
"""
|
104
|
+
""",
|
106
105
|
"a|2|c")
|
107
106
|
end
|
108
107
|
|
@@ -120,7 +119,8 @@ a|b|3
|
|
120
119
|
end
|
121
120
|
|
122
121
|
def test_3
|
123
|
-
|
122
|
+
|
123
|
+
dotest Test3, "77"
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
data/test/ft_59_ps.rb
CHANGED
@@ -32,7 +32,6 @@ class FlowTest59 < Test::Unit::TestCase
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
#def xxxx_0
|
36
35
|
def test_0
|
37
36
|
|
38
37
|
sa = @engine.register_participant("store_a", OpenWFE::HashParticipant)
|
@@ -40,13 +39,13 @@ class FlowTest59 < Test::Unit::TestCase
|
|
40
39
|
|
41
40
|
fei = @engine.launch Def59
|
42
41
|
|
43
|
-
sleep 0.
|
42
|
+
sleep 0.350
|
44
43
|
|
45
|
-
ps = @engine.
|
44
|
+
ps = @engine.process_statuses
|
46
45
|
#puts ps
|
47
46
|
|
48
|
-
assert_equal ps[fei.wfid].expressions.size
|
49
|
-
assert_equal ps[fei.wfid].errors.size
|
47
|
+
assert_equal 2, ps[fei.wfid].expressions.size
|
48
|
+
assert_equal 0, ps[fei.wfid].errors.size
|
50
49
|
|
51
50
|
@engine.cancel_process fei
|
52
51
|
end
|
@@ -61,21 +60,20 @@ class FlowTest59 < Test::Unit::TestCase
|
|
61
60
|
end
|
62
61
|
end
|
63
62
|
|
64
|
-
#def xxxx_0b
|
65
63
|
def test_0b
|
66
64
|
|
67
|
-
a = @engine.register_participant
|
68
|
-
b = @engine.register_participant
|
65
|
+
a = @engine.register_participant :alpha, OpenWFE::HashParticipant
|
66
|
+
b = @engine.register_participant :bravo, OpenWFE::HashParticipant
|
69
67
|
|
70
68
|
fei = @engine.launch Def59b
|
71
69
|
|
72
|
-
sleep 0.
|
70
|
+
sleep 0.350
|
73
71
|
|
74
|
-
ps = @engine.
|
72
|
+
ps = @engine.process_statuses
|
75
73
|
#puts ps
|
76
74
|
|
77
|
-
assert_equal ps[fei.wfid].expressions.size
|
78
|
-
assert_equal ps[fei.wfid].errors.size
|
75
|
+
assert_equal 1, ps[fei.wfid].expressions.size
|
76
|
+
assert_equal 0, ps[fei.wfid].errors.size
|
79
77
|
|
80
78
|
@engine.cancel_process fei
|
81
79
|
end
|
@@ -98,14 +96,15 @@ class FlowTest59 < Test::Unit::TestCase
|
|
98
96
|
|
99
97
|
fei = @engine.launch Def59_1
|
100
98
|
|
101
|
-
sleep 0.
|
99
|
+
sleep 0.350
|
102
100
|
|
103
|
-
ps = @engine.
|
101
|
+
ps = @engine.process_statuses
|
104
102
|
#puts ps
|
105
103
|
#puts ps[fei.wfid].errors
|
106
104
|
|
107
|
-
assert_equal ps[fei.wfid].expressions.size
|
108
|
-
assert_equal ps[fei.wfid].
|
105
|
+
assert_equal 1, ps[fei.wfid].expressions.size
|
106
|
+
assert_equal 1, ps[fei.wfid].branches
|
107
|
+
assert_equal 1, ps[fei.wfid].errors.size
|
109
108
|
|
110
109
|
#puts
|
111
110
|
#puts ps.to_s
|
@@ -113,5 +112,39 @@ class FlowTest59 < Test::Unit::TestCase
|
|
113
112
|
@engine.cancel_process fei.wfid
|
114
113
|
end
|
115
114
|
|
115
|
+
#
|
116
|
+
# TEST 2
|
117
|
+
|
118
|
+
class Def59c < ProcessDefinition
|
119
|
+
sequence do
|
120
|
+
bravo
|
121
|
+
alpha
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def test_2
|
126
|
+
|
127
|
+
a = @engine.register_participant :alpha, OpenWFE::HashParticipant
|
128
|
+
b = @engine.register_participant :bravo, OpenWFE::HashParticipant
|
129
|
+
|
130
|
+
feis = []
|
131
|
+
feis << @engine.launch(Def59b)
|
132
|
+
feis << @engine.launch(Def59b)
|
133
|
+
feis << @engine.launch(Def59c)
|
134
|
+
|
135
|
+
sleep 0.350
|
136
|
+
|
137
|
+
assert_equal 3, @engine.list_processes(:wfname => "Def").size
|
138
|
+
assert_equal 2, @engine.list_processes(:wfrevision => "59b").size
|
139
|
+
assert_equal 1, @engine.list_processes(:wfrevision => "59c").size
|
140
|
+
assert_equal 2, @engine.list_processes(:wfname => "Def", :wfrevision => "59b").size
|
141
|
+
|
142
|
+
feis.each do |fei|
|
143
|
+
@engine.cancel_process fei
|
144
|
+
end
|
145
|
+
|
146
|
+
sleep 0.350
|
147
|
+
end
|
148
|
+
|
116
149
|
end
|
117
150
|
|
data/test/ft_60_ecancel.rb
CHANGED
@@ -14,10 +14,11 @@ require 'flowtestbase'
|
|
14
14
|
class FlowTest60 < Test::Unit::TestCase
|
15
15
|
include FlowTestBase
|
16
16
|
|
17
|
-
#def
|
17
|
+
#def setup
|
18
18
|
#end
|
19
19
|
|
20
|
-
#def
|
20
|
+
#def teardown
|
21
|
+
# $OWFE_LOG.level = Logger::INFO # done in FlowTestBase !
|
21
22
|
#end
|
22
23
|
|
23
24
|
#
|
@@ -41,7 +42,7 @@ class FlowTest60 < Test::Unit::TestCase
|
|
41
42
|
|
42
43
|
fei = @engine.launch TestDefinition0
|
43
44
|
|
44
|
-
sleep 0.
|
45
|
+
sleep 0.350
|
45
46
|
|
46
47
|
#puts
|
47
48
|
#puts @engine.get_process_stack fei.wfid
|
@@ -51,13 +52,12 @@ class FlowTest60 < Test::Unit::TestCase
|
|
51
52
|
fei.expression_name = "sequence"
|
52
53
|
@engine.cancel_expression fei
|
53
54
|
|
54
|
-
sleep 0.
|
55
|
+
sleep 0.350
|
55
56
|
|
56
57
|
assert_equal "a\nb.0\nc", @tracer.to_s
|
57
58
|
|
58
|
-
assert_equal 0, @engine.
|
59
|
-
|
60
|
-
#$OWFE_LOG.level = Logger::INFO
|
59
|
+
assert_equal 0, @engine.process_stack(fei.wfid).size
|
60
|
+
assert_equal 1, @engine.get_expression_storage.size
|
61
61
|
end
|
62
62
|
|
63
63
|
def test_1
|
@@ -66,7 +66,7 @@ class FlowTest60 < Test::Unit::TestCase
|
|
66
66
|
|
67
67
|
fei = @engine.launch TestDefinition0
|
68
68
|
|
69
|
-
sleep 0.
|
69
|
+
sleep 0.350
|
70
70
|
|
71
71
|
fei.expression_id = "0.0.1.2"
|
72
72
|
fei.expression_name = "print"
|
@@ -76,9 +76,51 @@ class FlowTest60 < Test::Unit::TestCase
|
|
76
76
|
|
77
77
|
assert_equal "a\nb.0\nc", @tracer.to_s
|
78
78
|
|
79
|
-
assert_equal 0, @engine.
|
79
|
+
assert_equal 0, @engine.process_stack(fei.wfid).size
|
80
|
+
assert_equal 1, @engine.get_expression_storage.size
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_2
|
84
|
+
|
85
|
+
#$OWFE_LOG.level = Logger::DEBUG
|
86
|
+
|
87
|
+
fei = @engine.launch TestDefinition0
|
88
|
+
|
89
|
+
sleep 0.350
|
90
|
+
|
91
|
+
fei.expression_id = "0"
|
92
|
+
fei.expression_name = "process-definition"
|
93
|
+
@engine.cancel_expression fei
|
94
|
+
|
95
|
+
sleep 0.350
|
96
|
+
#puts @engine.get_error_journal.get_error_log(fei.wfid).to_s
|
97
|
+
|
98
|
+
assert_equal "a\nb.0", @tracer.to_s
|
99
|
+
|
100
|
+
assert_equal 0, @engine.process_stack(fei.wfid).size
|
101
|
+
assert_equal 1, @engine.get_expression_storage.size
|
102
|
+
end
|
103
|
+
|
104
|
+
def test_3
|
105
|
+
|
106
|
+
#$OWFE_LOG.level = Logger::DEBUG
|
107
|
+
|
108
|
+
fei = @engine.launch TestDefinition0
|
109
|
+
|
110
|
+
sleep 0.350
|
111
|
+
|
112
|
+
fei.expression_id = "0.0"
|
113
|
+
fei.expression_name = "sequence"
|
114
|
+
@engine.cancel_expression fei
|
115
|
+
|
116
|
+
@engine.wait_for(fei.wfid)
|
117
|
+
#sleep 0.350
|
118
|
+
#puts @engine.get_error_journal.get_error_log(fei.wfid).to_s
|
119
|
+
|
120
|
+
assert_equal "a\nb.0", @tracer.to_s
|
80
121
|
|
81
|
-
|
122
|
+
assert_equal 0, @engine.process_stack(fei.wfid).size
|
123
|
+
assert_equal 1, @engine.get_expression_storage.size
|
82
124
|
end
|
83
125
|
|
84
126
|
end
|