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
@@ -38,7 +38,6 @@ class FlowTest28 < Test::Unit::TestCase
38
38
  end
39
39
  end
40
40
 
41
- #def xxxx_fp_0
42
41
  def test_fp_0
43
42
 
44
43
  FileUtils.mkdir("./work/in") unless File.exist? "./work/in"
@@ -48,7 +47,7 @@ class FlowTest28 < Test::Unit::TestCase
48
47
 
49
48
  fei = @engine.launch(TestDefinition0)
50
49
 
51
- sleep 0.300
50
+ sleep 0.350
52
51
 
53
52
  Find.find("./work/out/") do |path|
54
53
  next unless path.match ".*\.yaml$"
@@ -42,7 +42,7 @@ class FlowTest2 < Test::Unit::TestCase
42
42
  true)
43
43
  end
44
44
 
45
- def _test_con_2
45
+ def test_con_2
46
46
 
47
47
  dotest(
48
48
  '''<process-definition name="ft_2_concurrence" revision="2">
@@ -43,8 +43,9 @@ class FlowTest2b < Test::Unit::TestCase
43
43
 
44
44
  prepare()
45
45
 
46
- dotest(\
47
- '''<process-definition name="2b_con" revision="0">
46
+ dotest(
47
+ '''
48
+ <process-definition name="2b_con" revision="0">
48
49
  <sequence>
49
50
  <concurrence
50
51
  merge="lowest"
@@ -61,8 +62,7 @@ class FlowTest2b < Test::Unit::TestCase
61
62
  <print>${f:key}</print>
62
63
  </sequence>
63
64
  </process-definition>''',
64
- "charly")
65
- #0.25)
65
+ "charly")
66
66
  end
67
67
 
68
68
  #
@@ -128,25 +128,30 @@ true""",
128
128
  end
129
129
 
130
130
  def test_rawprog
131
- #def xxxx_rawprog
132
131
 
133
132
  #puts TestDefinition1.new("lowest", "mix").make.to_s
134
133
 
135
- assert TestDefinition1.new("lowest", "mix").make.to_s == """
136
- <process-definition name='2b_con' revision='1'>
137
- <sequence>
138
- <concurrence merge='lowest' merge-type='mix'>
139
- <participant>alpha</participant>
140
- <participant>bravo</participant>
141
- <participant>charly</participant>
142
- </concurrence>
143
- <print>${f:key}
144
- ${f:alpha}
145
- ${f:bravo}
146
- ${f:charly}</print>
147
- </sequence>
148
- </process-definition>
149
- """.strip
134
+ assert_equal(
135
+ "<process-definition name='2b_con' revision='1'>"+
136
+ "<sequence>"+
137
+ "<concurrence merge='lowest' merge-type='mix'>"+
138
+ "<participant>"+
139
+ "alpha"+
140
+ "</participant>"+
141
+ "<participant>"+
142
+ "bravo"+
143
+ "</participant>"+
144
+ "<participant>"+
145
+ "charly"+
146
+ "</participant>"+
147
+ "</concurrence>"+
148
+ "<print>"+
149
+ "${f:key}\n${f:alpha}\n${f:bravo}\n${f:charly}"+
150
+ "</print>"+
151
+ "</sequence>"+
152
+ "</process-definition>",
153
+ OpenWFE::ExpressionTree.to_s(
154
+ TestDefinition1.new("lowest", "mix").make))
150
155
  end
151
156
 
152
157
 
@@ -68,7 +68,6 @@ class FlowTest30 < Test::Unit::TestCase
68
68
  #
69
69
  # TEST 1
70
70
 
71
- #def xxxx_sl_1
72
71
  def test_sl_1
73
72
 
74
73
  @engine.add_workitem_listener(OpenWFE::SocketListener)
@@ -99,7 +98,6 @@ class FlowTest30 < Test::Unit::TestCase
99
98
  #
100
99
  # TEST 2
101
100
 
102
- #def xxxx_sl_2
103
101
  def test_sl_2
104
102
 
105
103
  @engine.add_workitem_listener(OpenWFE::SocketListener)
@@ -136,7 +134,6 @@ class FlowTest30 < Test::Unit::TestCase
136
134
  #
137
135
  # TEST 3
138
136
 
139
- #def xxxx_sl_3
140
137
  def test_sl_3
141
138
 
142
139
  @engine.add_workitem_listener(OpenWFE::SocketListener)
@@ -39,17 +39,17 @@ class FlowTest34 < Test::Unit::TestCase
39
39
 
40
40
  fei = @engine.launch(TestCancelWfid0)
41
41
 
42
- sleep 0.100
42
+ sleep 0.300
43
43
 
44
44
  @engine.cancel_process(fei.wfid)
45
45
 
46
- sleep 0.300
46
+ sleep 0.350
47
47
 
48
- l = @engine.list_processes()
48
+ l = @engine.list_processes
49
49
 
50
- assert_equal l.size, 0
50
+ assert_equal 0, l.size
51
51
 
52
- assert_equal sp.size, 0
52
+ assert_equal 0, sp.size
53
53
  # check that participant got cancelled as well
54
54
  end
55
55
 
@@ -62,15 +62,15 @@ class FlowTest34 < Test::Unit::TestCase
62
62
 
63
63
  fei = @engine.launch(TestCancelWfid0)
64
64
 
65
- sleep 0.300
65
+ sleep 0.350
66
66
 
67
67
  @engine.cancel_process(fei.wfid)
68
68
 
69
- sleep 0.300
69
+ sleep 0.350
70
70
 
71
- assert_equal @engine.get_process_stack(fei.wfid).size, 0
71
+ assert_equal 0, @engine.get_process_stack(fei.wfid).size
72
72
 
73
- assert_equal sp.size, 0
73
+ assert_equal 0, sp.size
74
74
  # check that participant got cancelled as well
75
75
  end
76
76
 
@@ -29,7 +29,6 @@ class FlowTest35 < Test::Unit::TestCase
29
29
  #
30
30
  # TEST 0
31
31
 
32
- #def xxxx_local_0
33
32
  def test_local_0
34
33
 
35
34
  #log_level_to_debug
@@ -59,12 +59,12 @@ class FlowTest36 < Test::Unit::TestCase
59
59
  feis[fexp.fei] = true
60
60
  end
61
61
 
62
- @engine.launch(TestSubProcId0)
63
- @engine.launch(TestSubProcId1)
62
+ @engine.launch TestSubProcId0
63
+ @engine.launch TestSubProcId1
64
64
 
65
- sleep 1
65
+ sleep 2
66
66
 
67
- assert_equal feis.keys.size, 4
67
+ assert_equal 4, feis.keys.size
68
68
  end
69
69
 
70
70
 
@@ -88,9 +88,9 @@ class FlowTest36 < Test::Unit::TestCase
88
88
 
89
89
  @engine.launch(TestIteratorSubId0)
90
90
 
91
- sleep 0.250
91
+ sleep 0.350
92
92
 
93
- assert_equal feis.keys.size, 2
93
+ assert_equal 2, feis.keys.size
94
94
  end
95
95
 
96
96
  end
@@ -7,10 +7,11 @@
7
7
  # Mon Oct 9 22:19:44 JST 2006
8
8
  #
9
9
 
10
- require 'openwfe/def'
11
10
 
12
11
  require 'flowtestbase'
13
12
 
13
+ require 'openwfe/def'
14
+
14
15
 
15
16
  class FlowTest38 < Test::Unit::TestCase
16
17
  include FlowTestBase
@@ -68,7 +69,7 @@ class FlowTest38 < Test::Unit::TestCase
68
69
  count += 1
69
70
  end
70
71
 
71
- dotest TestTag1, "blah\nhello", 2
72
+ dotest TestTag1, "blah\nhello"
72
73
 
73
74
  assert_equal 1, count
74
75
  end
@@ -0,0 +1,229 @@
1
+
2
+ #
3
+ # Testing OpenWFE
4
+ #
5
+ # John Mettraux at openwfe.org
6
+ #
7
+ # Mon Oct 9 22:19:44 JST 2006
8
+ #
9
+
10
+ require 'openwfe/def'
11
+ require 'openwfe/participants'
12
+
13
+ require 'flowtestbase'
14
+
15
+
16
+ class FlowTest38b < Test::Unit::TestCase
17
+ include FlowTestBase
18
+
19
+ #def teardown
20
+ #end
21
+
22
+ #def setup
23
+ #end
24
+
25
+
26
+ #
27
+ # test 4
28
+ #
29
+
30
+ class TestTag4 < OpenWFE::ProcessDefinition
31
+ sequence do
32
+ sequence :tag => "seq0" do
33
+ peekin
34
+ end
35
+ peekout
36
+ end
37
+ end
38
+
39
+ def test_tag_4
40
+
41
+ @engine.register_participant :peekin do |fexp, wi|
42
+
43
+ fei = fexp.fei
44
+
45
+ assert_equal 0, @engine.get_variables.size
46
+
47
+ assert_equal 2, @engine.get_variables(fei.wfid).size
48
+ assert_equal 1, @engine.process_status(fei.wfid).tags.size
49
+ assert_equal "seq0", @engine.process_status(fei.wfid).tags.to_s
50
+ assert_not_nil @engine.get_variables(fei.wfid)["seq0"]
51
+
52
+ @tracer << "peekin\n"
53
+ end
54
+
55
+ @engine.register_participant :peekout do |fexp, wi|
56
+
57
+ fei = fexp.fei
58
+
59
+ assert_equal 1, @engine.get_variables(fei.wfid).size
60
+ assert_equal 0, @engine.process_status(fei.wfid).tags.size
61
+ assert_equal "", @engine.process_status(fei.wfid).tags.to_s
62
+
63
+ @tracer << "peekout\n"
64
+ end
65
+
66
+ fei = @engine.launch TestTag4
67
+
68
+ @engine.wait_for fei
69
+ dotest TestTag4, "peekin\npeekout"
70
+ end
71
+
72
+
73
+ #
74
+ # test 5
75
+ #
76
+
77
+ class TestTag5 < OpenWFE::ProcessDefinition
78
+
79
+ sequence do
80
+ sub0
81
+ end
82
+
83
+ process_definition :name => "sub0" do
84
+ sequence :tag => "seq0" do
85
+ peekin
86
+ end
87
+ end
88
+ end
89
+
90
+ def test_tag_5
91
+
92
+ @engine.register_participant :peekin do |fexp, wi|
93
+
94
+ wfid = fexp.fei.parent_workflow_instance_id
95
+
96
+ assert_equal 3, @engine.get_variables(wfid).size
97
+ # :next_sub_id and one [sub] process definition
98
+
99
+ assert_equal 0, @engine.process_status(wfid).tags.size
100
+ assert_equal "", @engine.process_status(wfid).tags.to_s
101
+
102
+ @tracer << "peekin\n"
103
+ end
104
+
105
+ dotest TestTag5, "peekin"
106
+ end
107
+
108
+
109
+ #
110
+ # test 5b
111
+ #
112
+
113
+ class TestTag5b < OpenWFE::ProcessDefinition
114
+
115
+ sequence do
116
+ sub0
117
+ end
118
+
119
+ process_definition :name => "sub0" do
120
+ sequence :tag => "/seq0" do
121
+ peekin
122
+ end
123
+ end
124
+ end
125
+
126
+ def test_5b
127
+
128
+ @engine.register_participant :peekin do |fexp, wi|
129
+
130
+ wfid = fexp.fei.parent_workflow_instance_id
131
+
132
+ assert_equal 4, @engine.get_variables(wfid).size
133
+ # :next_sub_id and one [sub] process definition (and the tag)
134
+
135
+ assert_equal 1, @engine.process_status(wfid).tags.size
136
+ assert_equal "seq0", @engine.process_status(wfid).tags.to_s
137
+
138
+ @tracer << "peekin\n"
139
+ end
140
+
141
+ dotest TestTag5b, "peekin"
142
+ end
143
+
144
+
145
+ #
146
+ # test 6
147
+ #
148
+
149
+ class TestTag6 < OpenWFE::ProcessDefinition
150
+
151
+ concurrence do
152
+ peek :tag => "A"
153
+ peek :tag => "B"
154
+ end
155
+ end
156
+
157
+ def test_6
158
+
159
+ @engine.register_participant :peek do |fexp, wi|
160
+
161
+ wfid = fexp.fei.parent_workflow_instance_id
162
+
163
+ #puts @engine.get_variables(wfid).keys.inspect
164
+ @tracer << @engine.process_status(wfid).tags.to_s
165
+ end
166
+
167
+ dotest TestTag6, [ 'AAB', 'BAB' ]
168
+ end
169
+
170
+ #
171
+ # test 7 (milestone)
172
+ #
173
+
174
+ class TestTag7 < OpenWFE::ProcessDefinition
175
+ concurrence do
176
+ sequence do
177
+ participant0
178
+ participant1 :tag => "milestone"
179
+ participant2
180
+ end
181
+ sequence do
182
+ #wait :until => "'${milestone}' != ''", :frequency => "300"
183
+ wait :until => "${milestone} is set", :frequency => "300"
184
+ participant3
185
+ end
186
+ end
187
+ end
188
+
189
+ class OpenWFE::HashParticipant
190
+ def proceed_first
191
+ proceed first_workitem
192
+ end
193
+ end
194
+ #
195
+ # just added a shortcut method for testing purpose
196
+
197
+ def test_7
198
+
199
+ #log_level_to_debug
200
+
201
+ ps = (0..3).collect do |i|
202
+
203
+ @engine.register_participant(
204
+ "participant#{i}", OpenWFE::HashParticipant)
205
+ end
206
+
207
+ fei = @engine.launch TestTag7
208
+
209
+ sleep 0.350
210
+
211
+ assert_equal 1, ps[0].size
212
+ assert_equal 0, ps[1].size
213
+ assert_equal 0, ps[2].size
214
+ assert_equal 0, ps[3].size
215
+
216
+ ps[0].proceed_first
217
+
218
+ sleep 0.500
219
+
220
+ assert_equal 0, ps[0].size
221
+ assert_equal 1, ps[1].size
222
+ assert_equal 0, ps[2].size
223
+ assert_equal 1, ps[3].size
224
+
225
+ @engine.cancel_process fei.wfid
226
+ end
227
+
228
+ end
229
+