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_11b_ppd.rb
CHANGED
data/test/ft_13_eno.rb
CHANGED
data/test/ft_15_iterator.rb
CHANGED
data/test/ft_15b_iterator.rb
CHANGED
data/test/ft_17_condition.rb
CHANGED
@@ -20,7 +20,7 @@ class FlowTest17 < Test::Unit::TestCase
|
|
20
20
|
#end
|
21
21
|
|
22
22
|
def test_condition_0
|
23
|
-
dotest(
|
23
|
+
dotest(
|
24
24
|
'''<process-definition name="con" revision="0">
|
25
25
|
<if test="a == a">
|
26
26
|
<print>ok</print>
|
@@ -29,7 +29,7 @@ class FlowTest17 < Test::Unit::TestCase
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def test_condition_1
|
32
|
-
dotest(
|
32
|
+
dotest(
|
33
33
|
'''<process-definition name="con" revision="0">
|
34
34
|
<if test="a == b">
|
35
35
|
<print>ok</print>
|
@@ -38,7 +38,7 @@ class FlowTest17 < Test::Unit::TestCase
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def test_condition_2
|
41
|
-
dotest(
|
41
|
+
dotest(
|
42
42
|
'''<process-definition name="con" revision="0">
|
43
43
|
<sequence>
|
44
44
|
<set field="toto" value="nada" />
|
@@ -50,7 +50,7 @@ class FlowTest17 < Test::Unit::TestCase
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def test_condition_3
|
53
|
-
dotest(
|
53
|
+
dotest(
|
54
54
|
'''<process-definition name="con" revision="0">
|
55
55
|
<sequence>
|
56
56
|
<set field="toto" value="true" />
|
@@ -62,7 +62,7 @@ class FlowTest17 < Test::Unit::TestCase
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def test_condition_4
|
65
|
-
dotest(
|
65
|
+
dotest(
|
66
66
|
'''<process-definition name="con" revision="0">
|
67
67
|
<if rtest="1+2 == 3">
|
68
68
|
<print>ok</print>
|
@@ -71,7 +71,7 @@ class FlowTest17 < Test::Unit::TestCase
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def test_condition_5
|
74
|
-
dotest(
|
74
|
+
dotest(
|
75
75
|
'''<process-definition name="con" revision="0">
|
76
76
|
<if test="1+2 == 3">
|
77
77
|
<print>ok</print>
|
data/test/ft_18_pname.rb
CHANGED
data/test/ft_20_cron.rb
CHANGED
data/test/ft_21_cron.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'flowtestbase'
|
9
|
-
require 'openwfe/
|
9
|
+
require 'openwfe/def'
|
10
10
|
|
11
11
|
include OpenWFE
|
12
12
|
|
@@ -37,13 +37,15 @@ class FlowTest21 < Test::Unit::TestCase
|
|
37
37
|
#
|
38
38
|
def test_0
|
39
39
|
|
40
|
-
|
40
|
+
log_level_to_debug
|
41
41
|
|
42
42
|
@engine.register_participant(:cron_event) do
|
43
|
+
puts "cron_event at #{Time.now.to_s}"
|
43
44
|
@tracer << "cron_event"
|
44
45
|
end
|
45
46
|
|
46
|
-
|
47
|
+
#puts "start at #{Time.now.to_s}"
|
48
|
+
dotest TestDefinition0, "", 62
|
47
49
|
end
|
48
50
|
|
49
51
|
#
|
@@ -67,7 +69,7 @@ class FlowTest21 < Test::Unit::TestCase
|
|
67
69
|
@tracer << "."
|
68
70
|
end
|
69
71
|
|
70
|
-
dotest
|
72
|
+
dotest TestDefinition1, [ "....", "....." ]
|
71
73
|
end
|
72
74
|
|
73
75
|
end
|
data/test/ft_22_history.rb
CHANGED
data/test/ft_23_when.rb
CHANGED
data/test/ft_23b_when.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
#
|
7
7
|
|
8
8
|
require 'flowtestbase'
|
9
|
-
require 'openwfe/
|
9
|
+
require 'openwfe/def'
|
10
10
|
|
11
11
|
include OpenWFE
|
12
12
|
|
@@ -25,11 +25,11 @@ class FlowTest23b < Test::Unit::TestCase
|
|
25
25
|
# Test 0
|
26
26
|
#
|
27
27
|
|
28
|
-
class
|
28
|
+
class TestWhen23b0 < ProcessDefinition
|
29
29
|
def make
|
30
30
|
process_definition :name => "23b_when0", :revision => "0" do
|
31
31
|
concurrence do
|
32
|
-
_when :test => "false == true", :timeout => "
|
32
|
+
_when :test => "false == true", :timeout => "1s500" do
|
33
33
|
_print "la vaca vuela"
|
34
34
|
end
|
35
35
|
_print "ok"
|
@@ -38,8 +38,14 @@ class FlowTest23b < Test::Unit::TestCase
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
#
|
42
|
+
# Testing if the conditional _when got correctly unscheduled.
|
43
|
+
#
|
41
44
|
def test_0
|
42
|
-
|
45
|
+
|
46
|
+
log_level_to_debug
|
47
|
+
|
48
|
+
dotest TestWhen23b0, "ok"
|
43
49
|
end
|
44
50
|
|
45
51
|
|
@@ -47,7 +53,7 @@ class FlowTest23b < Test::Unit::TestCase
|
|
47
53
|
# Test 1
|
48
54
|
#
|
49
55
|
|
50
|
-
class
|
56
|
+
class TestWhen23b1 < ProcessDefinition
|
51
57
|
concurrence do
|
52
58
|
_when :test => "true == true" do
|
53
59
|
end
|
@@ -55,8 +61,14 @@ class FlowTest23b < Test::Unit::TestCase
|
|
55
61
|
end
|
56
62
|
end
|
57
63
|
|
64
|
+
#
|
65
|
+
# Testing an empty _when
|
66
|
+
#
|
58
67
|
def test_1
|
59
|
-
|
68
|
+
|
69
|
+
log_level_to_debug
|
70
|
+
|
71
|
+
dotest TestWhen23b1, "ok"
|
60
72
|
end
|
61
73
|
|
62
74
|
end
|
data/test/ft_23c_wait.rb
CHANGED
@@ -29,11 +29,11 @@ class FlowTest23c < Test::Unit::TestCase
|
|
29
29
|
sequence do
|
30
30
|
concurrence do
|
31
31
|
sequence do
|
32
|
-
wait :until => "${done} == true", :frequency => "
|
32
|
+
wait :until => "${done} == true", :frequency => "500"
|
33
33
|
_print "after wait"
|
34
34
|
end
|
35
35
|
sequence do
|
36
|
-
_sleep "
|
36
|
+
_sleep "200"
|
37
37
|
_print "before done"
|
38
38
|
_set :variable => "done", :value => "true"
|
39
39
|
end
|
@@ -44,6 +44,8 @@ class FlowTest23c < Test::Unit::TestCase
|
|
44
44
|
|
45
45
|
def test_0
|
46
46
|
|
47
|
+
#log_level_to_debug
|
48
|
+
|
47
49
|
dotest(
|
48
50
|
Wait0c,
|
49
51
|
"""
|
@@ -51,7 +53,6 @@ before done
|
|
51
53
|
after wait
|
52
54
|
over
|
53
55
|
""".strip)
|
54
|
-
#3)
|
55
56
|
end
|
56
57
|
|
57
58
|
#
|
@@ -62,13 +63,13 @@ over
|
|
62
63
|
sequence do
|
63
64
|
concurrence do
|
64
65
|
sequence do
|
65
|
-
wait :frequency => "
|
66
|
+
wait :frequency => "500" do
|
66
67
|
equals :variable_value => "done", :other_value => "true"
|
67
68
|
end
|
68
69
|
_print "after when"
|
69
70
|
end
|
70
71
|
sequence do
|
71
|
-
_sleep "
|
72
|
+
_sleep "200"
|
72
73
|
_print "before done"
|
73
74
|
_set :variable => "done", :value => "true"
|
74
75
|
end
|
@@ -79,6 +80,8 @@ over
|
|
79
80
|
|
80
81
|
def test_1
|
81
82
|
|
83
|
+
#log_level_to_debug
|
84
|
+
|
82
85
|
dotest(
|
83
86
|
Wait1c,
|
84
87
|
"""
|
@@ -86,7 +89,6 @@ before done
|
|
86
89
|
after when
|
87
90
|
over
|
88
91
|
""".strip)
|
89
|
-
#4)
|
90
92
|
end
|
91
93
|
|
92
94
|
end
|
data/test/ft_25_cancel.rb
CHANGED
@@ -25,6 +25,8 @@ class FlowTest25 < Test::Unit::TestCase
|
|
25
25
|
|
26
26
|
def test_cancel_0
|
27
27
|
|
28
|
+
#log_level_to_debug
|
29
|
+
|
28
30
|
dotest(
|
29
31
|
'''
|
30
32
|
<process-definition name="25_cancel" revision="0">
|
@@ -36,7 +38,7 @@ class FlowTest25 < Test::Unit::TestCase
|
|
36
38
|
</process-definition>
|
37
39
|
'''.strip,
|
38
40
|
"before",
|
39
|
-
0.
|
41
|
+
0.400)
|
40
42
|
end
|
41
43
|
|
42
44
|
|
@@ -55,12 +57,12 @@ class FlowTest25 < Test::Unit::TestCase
|
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
58
|
-
def
|
60
|
+
def test_1
|
59
61
|
|
60
62
|
dotest(
|
61
63
|
TestDefinition1,
|
62
64
|
"before",
|
63
|
-
0.
|
65
|
+
0.500)
|
64
66
|
end
|
65
67
|
|
66
68
|
|
@@ -79,8 +81,8 @@ class FlowTest25 < Test::Unit::TestCase
|
|
79
81
|
end
|
80
82
|
end
|
81
83
|
|
82
|
-
def
|
83
|
-
dotest
|
84
|
+
def test_2
|
85
|
+
dotest TestDefinition2, "before\nafter"
|
84
86
|
end
|
85
87
|
|
86
88
|
end
|
data/test/ft_27_getflowpos.rb
CHANGED
@@ -35,7 +35,6 @@ class FlowTest27 < Test::Unit::TestCase
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
#def xxxx_gfp_0
|
39
38
|
def test_gfp_0
|
40
39
|
|
41
40
|
#sp = @engine.register_participant("store_p", OpenWFE::YamlParticipant)
|
@@ -43,30 +42,29 @@ class FlowTest27 < Test::Unit::TestCase
|
|
43
42
|
|
44
43
|
fei = @engine.launch(TestDefinition0)
|
45
44
|
|
46
|
-
sleep 0.
|
45
|
+
sleep 0.350
|
47
46
|
|
48
|
-
l = @engine.
|
47
|
+
l = @engine.process_stack fei.wfid
|
49
48
|
|
50
49
|
#print_exp_list l
|
51
50
|
|
52
|
-
assert_equal
|
53
|
-
3, l.size, "get_process_stack() returned #{l.size} elements"
|
51
|
+
assert_equal 3, l.size
|
54
52
|
|
55
53
|
ps = @engine.list_process_status
|
56
54
|
#puts
|
57
55
|
#puts ps[fei.parent_wfid].to_s
|
58
56
|
#puts
|
59
57
|
|
60
|
-
assert_equal ps[fei.parent_wfid].errors.size
|
61
|
-
assert_equal ps[fei.parent_wfid].expressions.size
|
58
|
+
assert_equal 0, ps[fei.parent_wfid].errors.size
|
59
|
+
assert_equal 1, ps[fei.parent_wfid].expressions.size
|
62
60
|
assert_kind_of ParticipantExpression, ps[fei.parent_wfid].expressions[0]
|
63
61
|
|
64
62
|
assert_not_nil ps[fei.parent_wfid].launch_time
|
65
63
|
|
66
64
|
ps = @engine.list_process_status fei.wfid[0, 4]
|
67
65
|
|
68
|
-
assert_equal ps[fei.parent_wfid].errors.size
|
69
|
-
assert_equal ps[fei.parent_wfid].expressions.size
|
66
|
+
assert_equal 0, ps[fei.parent_wfid].errors.size
|
67
|
+
assert_equal 1, ps[fei.parent_wfid].expressions.size
|
70
68
|
assert_kind_of ParticipantExpression, ps[fei.parent_wfid].expressions[0]
|
71
69
|
|
72
70
|
#
|
@@ -78,7 +76,7 @@ class FlowTest27 < Test::Unit::TestCase
|
|
78
76
|
|
79
77
|
@engine.wait_for fei
|
80
78
|
|
81
|
-
assert_equal sp.size
|
79
|
+
assert_equal 0, sp.size
|
82
80
|
end
|
83
81
|
|
84
82
|
|
@@ -88,6 +86,7 @@ class FlowTest27 < Test::Unit::TestCase
|
|
88
86
|
class Gfp27b < ProcessDefinition
|
89
87
|
sequence do
|
90
88
|
store_p
|
89
|
+
_print "pass"
|
91
90
|
end
|
92
91
|
end
|
93
92
|
|
@@ -100,10 +99,10 @@ class FlowTest27 < Test::Unit::TestCase
|
|
100
99
|
#fei = @engine.launch TestDefinition0
|
101
100
|
fei = @engine.launch Gfp27b
|
102
101
|
|
103
|
-
sleep 0.
|
102
|
+
sleep 0.350
|
104
103
|
|
105
104
|
#l = @engine.get_process_stack(fei.wfid)
|
106
|
-
l = @engine.
|
105
|
+
l = @engine.process_stack fei
|
107
106
|
#
|
108
107
|
# shortcut version
|
109
108
|
|
@@ -111,23 +110,29 @@ class FlowTest27 < Test::Unit::TestCase
|
|
111
110
|
|
112
111
|
assert_equal 3, l.size
|
113
112
|
|
114
|
-
l = @engine.list_processes
|
113
|
+
l = @engine.list_processes
|
115
114
|
assert_equal 1, l.size
|
116
115
|
|
117
|
-
l = @engine.list_processes(
|
116
|
+
l = @engine.list_processes(
|
117
|
+
:consider_subprocesses => false, :wfid_prefix => "nada")
|
118
118
|
assert_equal 0, l.size
|
119
119
|
|
120
|
-
l = @engine.list_workflows(
|
120
|
+
l = @engine.list_workflows(
|
121
|
+
:consider_subprocesses => false, :wfid_prefix => fei.wfid[0, 3])
|
121
122
|
assert_equal 1, l.size
|
122
123
|
|
124
|
+
l = @engine.process_stack fei, true # unapplied exps as well
|
125
|
+
#print_exp_list l
|
126
|
+
assert_equal 5, l.size
|
127
|
+
|
123
128
|
#
|
124
129
|
# resume flow and terminate it
|
125
130
|
|
126
131
|
wi = sp.first_workitem
|
127
132
|
|
128
|
-
|
133
|
+
assert_not_nil wi
|
129
134
|
|
130
|
-
sp.forward
|
135
|
+
sp.forward wi
|
131
136
|
|
132
137
|
@engine.wait_for fei
|
133
138
|
|