openwferu 0.9.16 → 0.9.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. data/examples/about_state.rb +81 -0
  2. data/examples/engine_template.rb +7 -0
  3. data/lib/openwfe/contextual.rb +2 -2
  4. data/lib/openwfe/def.rb +2 -3
  5. data/lib/openwfe/{util/schedulers.rb → engine.rb} +3 -39
  6. data/lib/openwfe/engine/engine.rb +202 -251
  7. data/lib/openwfe/engine/process_status.rb +359 -0
  8. data/lib/openwfe/expool/errorjournal.rb +6 -6
  9. data/lib/openwfe/expool/expressionpool.rb +161 -239
  10. data/lib/openwfe/expool/expstorage.rb +185 -55
  11. data/lib/openwfe/expool/journal.rb +1 -2
  12. data/lib/openwfe/expool/parser.rb +233 -0
  13. data/lib/openwfe/expool/threadedexpstorage.rb +6 -18
  14. data/lib/openwfe/expool/wfidgen.rb +25 -7
  15. data/lib/openwfe/expool/yamlexpstorage.rb +60 -37
  16. data/lib/openwfe/expressions/condition.rb +49 -12
  17. data/lib/openwfe/expressions/environment.rb +45 -15
  18. data/lib/openwfe/expressions/expressionmap.rb +39 -19
  19. data/lib/openwfe/expressions/fe_concurrence.rb +24 -13
  20. data/lib/openwfe/expressions/fe_cron.rb +19 -18
  21. data/lib/openwfe/expressions/fe_cursor.rb +69 -28
  22. data/lib/openwfe/expressions/fe_define.rb +4 -1
  23. data/lib/openwfe/expressions/fe_do.rb +1 -3
  24. data/lib/openwfe/expressions/fe_equals.rb +131 -20
  25. data/lib/openwfe/expressions/fe_fqv.rb +27 -3
  26. data/lib/openwfe/expressions/fe_iterator.rb +14 -7
  27. data/lib/openwfe/expressions/fe_listen.rb +7 -2
  28. data/lib/openwfe/expressions/fe_misc.rb +187 -20
  29. data/lib/openwfe/expressions/fe_participant.rb +8 -7
  30. data/lib/openwfe/expressions/fe_reserve.rb +105 -33
  31. data/lib/openwfe/expressions/fe_save.rb +55 -5
  32. data/lib/openwfe/expressions/{fe_value.rb → fe_set.rb} +6 -82
  33. data/lib/openwfe/expressions/fe_sleep.rb +25 -15
  34. data/lib/openwfe/expressions/fe_subprocess.rb +2 -2
  35. data/lib/openwfe/expressions/fe_wait.rb +3 -2
  36. data/lib/openwfe/expressions/fe_when.rb +7 -15
  37. data/lib/openwfe/expressions/flowexpression.rb +90 -49
  38. data/lib/openwfe/expressions/merge.rb +7 -1
  39. data/lib/openwfe/expressions/raw.rb +261 -63
  40. data/lib/openwfe/expressions/{raw_prog.rb → rprocdef.rb} +94 -179
  41. data/lib/openwfe/expressions/time.rb +36 -12
  42. data/lib/openwfe/expressions/timeout.rb +9 -7
  43. data/lib/openwfe/expressions/value.rb +126 -0
  44. data/lib/openwfe/flowexpressionid.rb +52 -22
  45. data/lib/openwfe/listeners/listeners.rb +3 -3
  46. data/lib/openwfe/listeners/socketlisteners.rb +8 -5
  47. data/lib/openwfe/logging.rb +6 -3
  48. data/lib/openwfe/omixins.rb +8 -6
  49. data/lib/openwfe/orest/xmlcodec.rb +16 -12
  50. data/lib/openwfe/participants.rb +38 -0
  51. data/lib/openwfe/participants/participant.rb +1 -1
  52. data/lib/openwfe/participants/participantmap.rb +24 -10
  53. data/lib/openwfe/participants/participants.rb +4 -3
  54. data/lib/openwfe/participants/soapparticipants.rb +1 -1
  55. data/lib/openwfe/participants/socketparticipants.rb +1 -1
  56. data/lib/openwfe/rudefinitions.rb +7 -5
  57. data/lib/openwfe/storage/yamlcustom.rb +10 -10
  58. data/lib/openwfe/storage/yamlfilestorage.rb +12 -12
  59. data/lib/openwfe/tools/flowtracer.rb +6 -5
  60. data/lib/openwfe/util/dollar.rb +42 -85
  61. data/lib/openwfe/util/ometa.rb +1 -3
  62. data/lib/openwfe/util/workqueue.rb +1 -1
  63. data/lib/openwfe/utils.rb +33 -11
  64. data/lib/openwfe/version.rb +2 -2
  65. data/lib/openwfe/workitem.rb +76 -14
  66. data/lib/openwfe/worklist/storelocks.rb +9 -4
  67. data/lib/openwfe/worklist/storeparticipant.rb +1 -1
  68. data/test/back_0916_test.rb +101 -0
  69. data/test/bm/ft_26_load.rb +1 -1
  70. data/test/bm/ft_26b_load.rb +1 -1
  71. data/test/bm/ft_26c_load.rb +3 -2
  72. data/test/bm/ft_26d_load.rb +97 -0
  73. data/test/bm/ft_recu.rb +71 -0
  74. data/test/concurrence_test.rb +1 -1
  75. data/test/condition_test.rb +152 -0
  76. data/test/description_test.rb +12 -7
  77. data/test/eno_test.rb +1 -1
  78. data/test/expool_20031219_0916.tgz +0 -0
  79. data/test/fe_lookup_att_test.rb +1 -1
  80. data/test/fei_test.rb +16 -0
  81. data/test/file_persistence_test.rb +8 -12
  82. data/test/filep_cancel_test.rb +116 -0
  83. data/test/flowtestbase.rb +47 -25
  84. data/test/ft_0.rb +1 -1
  85. data/test/ft_10_loop.rb +29 -14
  86. data/test/{ft_10b_loop2.rb → ft_10b_loop.rb} +2 -11
  87. data/test/ft_11_ppd.rb +6 -17
  88. data/test/ft_11b_ppd.rb +1 -4
  89. data/test/ft_12_blockparticipant.rb +1 -1
  90. data/test/ft_13_eno.rb +1 -1
  91. data/test/ft_15_iterator.rb +1 -1
  92. data/test/ft_15b_iterator.rb +1 -1
  93. data/test/ft_17_condition.rb +6 -6
  94. data/test/ft_18_pname.rb +1 -1
  95. data/test/ft_20_cron.rb +1 -1
  96. data/test/ft_21_cron.rb +6 -4
  97. data/test/ft_22_history.rb +1 -1
  98. data/test/ft_23_when.rb +1 -1
  99. data/test/ft_23b_when.rb +18 -6
  100. data/test/ft_23c_wait.rb +8 -6
  101. data/test/ft_25_cancel.rb +7 -5
  102. data/test/ft_27_getflowpos.rb +22 -17
  103. data/test/ft_28_fileparticipant.rb +1 -2
  104. data/test/ft_2_concurrence.rb +1 -1
  105. data/test/ft_2b_concurrence.rb +25 -20
  106. data/test/ft_30_socketlistener.rb +0 -3
  107. data/test/ft_34_cancelwfid.rb +9 -9
  108. data/test/ft_35_localdefs.rb +0 -1
  109. data/test/ft_36_subprocids.rb +6 -6
  110. data/test/ft_38_tag.rb +3 -2
  111. data/test/ft_38b_tag.rb +229 -0
  112. data/test/ft_39_reserve.rb +3 -18
  113. data/test/ft_39b_reserve.rb +34 -5
  114. data/test/ft_3b_lookup_vf.rb +83 -0
  115. data/test/ft_40_defined.rb +2 -11
  116. data/test/ft_42_environments.rb +4 -6
  117. data/test/ft_44b_restore.rb +88 -22
  118. data/test/ft_45_citerator.rb +57 -11
  119. data/test/ft_49_condition.rb +4 -2
  120. data/test/ft_4_misc.rb +24 -3
  121. data/test/ft_50_xml_attribute.rb +17 -20
  122. data/test/ft_54_listen.rb +1 -1
  123. data/test/ft_54b_listen.rb +2 -2
  124. data/test/ft_56_timeout.rb +8 -1
  125. data/test/ft_57_a.rb +10 -10
  126. data/test/ft_59_ps.rb +49 -16
  127. data/test/ft_60_ecancel.rb +52 -10
  128. data/test/ft_63_pause.rb +8 -8
  129. data/test/ft_65_stringlaunch.rb +4 -6
  130. data/test/ft_67_schedlaunch.rb +4 -4
  131. data/test/ft_69_cancelmissing.rb +4 -2
  132. data/test/ft_70_lookupvar.rb +2 -2
  133. data/test/ft_72_lookup_processes.rb +2 -2
  134. data/test/ft_73_cancel_sub.rb +8 -8
  135. data/test/ft_77_segments.rb +38 -0
  136. data/test/ft_78_eval.rb +154 -0
  137. data/test/ft_79_tticket.rb +185 -0
  138. data/test/ft_80_spname.rb +95 -0
  139. data/test/ft_81_exp.rb +64 -0
  140. data/test/ft_82_trecu.rb +48 -0
  141. data/test/ft_83_badpause.rb +62 -0
  142. data/test/ft_84_updateexp.rb +125 -0
  143. data/test/ft_9b_cursor.rb +105 -0
  144. data/test/ft_tests.rb +14 -1
  145. data/test/hash_test.rb +7 -7
  146. data/test/hparticipant_test.rb +4 -4
  147. data/test/lookup_vf_test.rb +94 -0
  148. data/test/misc_test.rb +5 -3
  149. data/test/orest_test.rb +4 -3
  150. data/test/param_test.rb +12 -16
  151. data/test/participant_test.rb +36 -0
  152. data/test/pending.rb +10 -10
  153. data/test/rake_ltest.rb +1 -10
  154. data/test/rake_qtest.rb +7 -6
  155. data/test/raw_prog_test.rb +89 -121
  156. data/test/restart_cron_test.rb +84 -36
  157. data/test/restart_paused_test.rb +100 -0
  158. data/test/restart_sleep_test.rb +1 -1
  159. data/test/restart_tests.rb +1 -0
  160. data/test/restart_when_test.rb +33 -22
  161. data/test/ruby_procdef_test.rb +19 -18
  162. data/test/sec_test.rb +74 -35
  163. data/test/storage_test.rb +44 -0
  164. data/test/test.rb +3 -0
  165. data/test/timeout_test.rb +7 -18
  166. data/test/wfid_test.rb +2 -1
  167. data/test/wi_test.rb +29 -18
  168. metadata +121 -57
  169. data/lib/openwfe/expressions/raw_xml.rb +0 -176
  170. data/lib/openwfe/expressions/simplerep.rb +0 -266
  171. data/lib/openwfe/util/kotoba.rb +0 -236
  172. data/lib/openwfe/util/lru.rb +0 -171
  173. data/lib/openwfe/util/otime.rb +0 -246
  174. data/lib/openwfe/util/safe.rb +0 -160
  175. data/lib/openwfe/util/scheduler.rb +0 -1158
  176. data/test/cron_test.rb +0 -113
  177. data/test/cronline_test.rb +0 -60
  178. data/test/dollar_test.rb +0 -90
  179. data/test/kotoba_test.rb +0 -72
  180. data/test/lru_test.rb +0 -79
  181. data/test/safely_test.rb +0 -84
  182. data/test/scheduler_1_test.rb +0 -88
  183. data/test/scheduler_test.rb +0 -363
  184. data/test/time_test.rb +0 -84
@@ -34,11 +34,8 @@ class FlowTest11b < Test::Unit::TestCase
34
34
  end
35
35
  end
36
36
 
37
- #def xxxx_0
38
37
  def test_0
39
- dotest(
40
- TestDefinition0.new,
41
- "ok")
38
+ dotest TestDefinition0.new, "ok"
42
39
  end
43
40
 
44
41
  end
@@ -8,7 +8,7 @@
8
8
  #
9
9
 
10
10
  require 'flowtestbase'
11
- require 'openwfe/expressions/raw_prog'
11
+ require 'openwfe/def'
12
12
 
13
13
 
14
14
  class FlowTest12 < Test::Unit::TestCase
@@ -7,7 +7,7 @@
7
7
  # Tue Jan 2 13:14:37 JST 2007
8
8
  #
9
9
 
10
- require 'openwfe/expressions/raw_prog'
10
+ require 'openwfe/def'
11
11
  require 'openwfe/participants/participants'
12
12
  require 'openwfe/participants/enoparticipants'
13
13
  require 'flowtestbase'
@@ -7,7 +7,7 @@
7
7
  # Tue Jan 2 13:14:37 JST 2007
8
8
  #
9
9
 
10
- require 'openwfe/expressions/raw_prog'
10
+ require 'openwfe/def'
11
11
  require 'openwfe/participants/participants'
12
12
  require 'flowtestbase'
13
13
 
@@ -7,7 +7,7 @@
7
7
  # Tue Jan 2 13:14:37 JST 2007
8
8
  #
9
9
 
10
- require 'openwfe/expressions/raw_prog'
10
+ require 'openwfe/def'
11
11
  require 'openwfe/participants/participants'
12
12
  require 'flowtestbase'
13
13
 
@@ -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>
@@ -8,7 +8,7 @@
8
8
  #
9
9
 
10
10
  require 'flowtestbase'
11
- require 'openwfe/expressions/raw_prog'
11
+ require 'openwfe/def'
12
12
 
13
13
  include OpenWFE
14
14
 
@@ -6,7 +6,7 @@
6
6
  #
7
7
 
8
8
  require 'flowtestbase'
9
- require 'openwfe/expressions/raw_prog'
9
+ require 'openwfe/def'
10
10
 
11
11
  include OpenWFE
12
12
 
@@ -6,7 +6,7 @@
6
6
  #
7
7
 
8
8
  require 'flowtestbase'
9
- require 'openwfe/expressions/raw_prog'
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
- #log_level_to_debug
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
- dotest(TestDefinition0, "", 62)
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(TestDefinition1, [ "....", "....." ])
72
+ dotest TestDefinition1, [ "....", "....." ]
71
73
  end
72
74
 
73
75
  end
@@ -9,7 +9,7 @@
9
9
 
10
10
  require 'flowtestbase'
11
11
  require 'openwfe/expool/history'
12
- require 'openwfe/expressions/raw_prog'
12
+ require 'openwfe/def'
13
13
 
14
14
  include OpenWFE
15
15
 
@@ -6,7 +6,7 @@
6
6
  #
7
7
 
8
8
  require 'flowtestbase'
9
- require 'openwfe/expressions/raw_prog'
9
+ require 'openwfe/def'
10
10
 
11
11
  include OpenWFE
12
12
 
@@ -6,7 +6,7 @@
6
6
  #
7
7
 
8
8
  require 'flowtestbase'
9
- require 'openwfe/expressions/raw_prog'
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 TestDefinition0 < ProcessDefinition
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 => "3s" do
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
- dotest(TestDefinition0, "ok", 5)
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 TestWait23b1 < ProcessDefinition
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
- dotest(TestWait23b1, "ok", true)
68
+
69
+ log_level_to_debug
70
+
71
+ dotest TestWhen23b1, "ok"
60
72
  end
61
73
 
62
74
  end
@@ -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 => "2s"
32
+ wait :until => "${done} == true", :frequency => "500"
33
33
  _print "after wait"
34
34
  end
35
35
  sequence do
36
- _sleep "1s"
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 => "2s" do
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 "1s"
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
@@ -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.700)
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 test_cancel_1
60
+ def test_1
59
61
 
60
62
  dotest(
61
63
  TestDefinition1,
62
64
  "before",
63
- 0.900)
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 test_cancel_2
83
- dotest(TestDefinition2, "before\nafter")
84
+ def test_2
85
+ dotest TestDefinition2, "before\nafter"
84
86
  end
85
87
 
86
88
  end
@@ -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.200
45
+ sleep 0.350
47
46
 
48
- l = @engine.get_process_stack(fei.wfid)
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, 0
61
- assert_equal ps[fei.parent_wfid].expressions.size, 1
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, 0
69
- assert_equal ps[fei.parent_wfid].expressions.size, 1
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, 0
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.200
102
+ sleep 0.350
104
103
 
105
104
  #l = @engine.get_process_stack(fei.wfid)
106
- l = @engine.get_process_stack(fei)
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(false, "nada")
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(false, fei.wfid[0, 3])
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
- assert wi
133
+ assert_not_nil wi
129
134
 
130
- sp.forward(wi)
135
+ sp.forward wi
131
136
 
132
137
  @engine.wait_for fei
133
138