public
Description: the [OpenWFEru] workflow and BPM engine (ruby)
Homepage: http://openwferu.rubyforge.org
Clone URL: git://github.com/jmettraux/ruote.git
Search Repo:
bug #21322 : reserve mutex not freed upon cancel. Fixed.
jmettraux (author)
Thu Jul 24 03:46:39 -0700 2008
commit  7083210f424c1a5117ceb51cefe9f280696b50e0
tree    e86ba0644738fa430bb679183bbe63294073b257
parent  82b1468c92202f1d01efb9a3af311e126572799e
...
4
5
6
 
7
8
9
...
4
5
6
7
8
9
10
0
@@ -4,6 +4,7 @@
0
 
0
 == ruote - 0.9.19 not yet released
0
 
0
+- bug #21322 : reserve mutex not freed upon cancel. Fixed.
0
 - bug #21305 : replay_at_error was broken for subprocesses. Fixed.
0
 - bug #21306 : made sure duplicate insert bug for ActiveParticipant is fixed.
0
 - todo #21167 : exptree.to_code_s() now respecting non-string att values.
...
621
622
623
624
625
626
627
628
629
630
 
 
 
 
 
 
 
631
632
633
...
635
636
637
638
639
640
641
642
 
 
 
 
 
643
644
645
...
621
622
623
 
 
 
 
 
 
 
624
625
626
627
628
629
630
631
632
633
...
635
636
637
 
 
 
 
 
638
639
640
641
642
643
644
645
0
@@ -621,13 +621,13 @@ h2. <a name="pat_e"></a>State-based Patterns
0
 h3. <a name="pat_16_deferred_choice"></a>Deferred Choice
0
 
0
 #:code#xml#
0
- <concurrence
0
- count="1"
0
- remaining="cancel"
0
- >
0
- <participant ref="an-activity" />
0
- <participant ref="another-activity" />
0
- </concurrence>
0
+ <concurrence
0
+ count="1"
0
+ remaining="cancel"
0
+ >
0
+ <participant ref="an-activity" />
0
+ <participant ref="another-activity" />
0
+ </concurrence>
0
 #:code#
0
 
0
 ('cancel' is the default behaviour for a concurrence with a 'count').
0
@@ -635,11 +635,11 @@ h3. <a name="pat_16_deferred_choice"></a>Deferred Choice
0
 As soon as one of the activities is over, the flow resumes (after the concurrence) and the other activity gets cancelled.
0
 
0
 #:code#ruby#
0
- concurrence :count => 2 do
0
- subprocess_0
0
- subprocess_1
0
- subprocess_2
0
- end
0
+ concurrence :count => 2 do
0
+ subprocess_0
0
+ subprocess_1
0
+ subprocess_2
0
+ end
0
 #:code#
0
 
0
 In that Ruby process definition example, as soon as two subprocesses do reply to the concurrence, the other gets cancelled and the flow resumes.
...
116
117
118
 
 
 
 
 
 
 
 
 
 
 
119
120
121
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
0
@@ -116,6 +116,17 @@ module OpenWFE
0
     end
0
 
0
     #
0
+ # takes care of exiting the critical section once the children
0
+ # have been cancelled
0
+ #
0
+ def cancel
0
+
0
+ super
0
+
0
+ lookup_variable(@mutex_name).release self
0
+ end
0
+
0
+ #
0
     # Called by the FlowMutex to enter the 'reserved/critical' section.
0
     #
0
     def enter (workitem=nil)
...
159
160
161
162
 
163
164
165
...
159
160
161
 
162
163
164
165
0
@@ -159,7 +159,7 @@ ftoto:_nada__321
0
   end
0
 
0
   CODE4 = """
0
-process_definition :name => 'test4', :revision => '0' do
0
+process_definition :name => \"test4\", :revision => \"0\" do
0
   sequence do
0
     sequence do
0
       _print do
...
59
60
61
 
62
63
64
...
59
60
61
62
63
64
65
0
@@ -59,6 +59,7 @@ require 'ft_37_pnames'
0
 require 'ft_38_tag'
0
 require 'ft_38b_tag'
0
 require 'ft_38c_tag'
0
+require 'ft_38d_tag'
0
 require 'ft_39_reserve'
0
 require 'ft_39b_reserve'
0
 require 'ft_40_defined'
...
148
149
150
151
 
152
153
154
 
 
155
156
157
...
186
187
188
189
190
 
 
191
192
193
194
 
 
 
195
196
 
197
198
199
...
222
223
224
225
226
 
 
227
228
229
...
235
236
237
238
 
239
240
241
...
261
262
263
264
265
 
 
266
267
268
269
270
 
271
272
273
 
274
275
276
...
293
294
295
296
297
 
 
298
299
300
301
302
 
303
304
305
...
319
320
321
322
323
 
 
324
325
 
326
327
328
...
148
149
150
 
151
152
 
 
153
154
155
156
157
...
186
187
188
 
 
189
190
191
 
 
 
192
193
194
195
 
196
197
198
199
...
222
223
224
 
 
225
226
227
228
229
...
235
236
237
 
238
239
240
241
...
261
262
263
 
 
264
265
266
267
268
269
 
270
271
272
 
273
274
275
276
...
293
294
295
 
 
296
297
298
299
300
301
 
302
303
304
305
...
319
320
321
 
 
322
323
324
 
325
326
327
328
0
@@ -148,10 +148,10 @@ class RawProgTest < Test::Unit::TestCase
0
     "</process-definition>"
0
 
0
   CODE_DEF3 = """
0
-process_definition :name => 'test3', :revision => '0' do
0
+process_definition :name => \"test3\", :revision => \"0\" do
0
   _if do
0
- equals :field_value => 'nada', :other_value => 'surf'
0
- participant :ref => 'b'
0
+ equals :field_value => \"nada\", :other_value => \"surf\"
0
+ participant :ref => \"b\"
0
   end
0
 end""".strip
0
 
0
@@ -186,14 +186,14 @@ end""".strip
0
     end
0
   end
0
 
0
- CODE_DEF4 = """
0
-process_definition :name => 'test4', :revision => '0' do
0
+ CODE_DEF4 = %{
0
+process_definition :name => "test4", :revision => "0" do
0
   sequence do
0
- participant :ref => 'b'
0
- participant :ref => 'b'
0
- participant :ref => 'b'
0
+ participant :ref => "b"
0
+ participant :ref => "b"
0
+ participant :ref => "b"
0
   end
0
-end""".strip
0
+end}.strip
0
 
0
   def test_prog_4
0
 
0
@@ -222,8 +222,8 @@ end""".strip
0
     end
0
   end
0
 
0
- CODE_DEF4b = """
0
-process_definition :name => 'Test', :revision => '4b' do
0
+ CODE_DEF4b = %{
0
+process_definition :name => "Test", :revision => "4b" do
0
   sequence do
0
     participant do
0
       'b'
0
@@ -235,7 +235,7 @@ process_definition :name => 'Test', :revision => '4b' do
0
       'b'
0
     end
0
   end
0
-end""".strip
0
+end}.strip
0
 
0
   def test_prog_4b
0
 
0
@@ -261,16 +261,16 @@ end""".strip
0
     end
0
   end
0
 
0
- CODE_DEF5 = """
0
-process_definition :name => 'Test', :revision => '5' do
0
+ CODE_DEF5 = %{
0
+process_definition :name => "Test", :revision => "5" do
0
   sequence do
0
     participant :ref => :toto
0
     sub0
0
   end
0
- process_definition :name => 'sub0' do
0
+ process_definition :name => "sub0" do
0
     nada
0
   end
0
-end""".strip
0
+end}.strip
0
 
0
   def test_prog_5
0
 
0
@@ -293,13 +293,13 @@ end""".strip
0
     end
0
   end
0
 
0
- CODE_DEF6 = """
0
-process_definition :name => 'Test', :revision => '60' do
0
+ CODE_DEF6 = %{
0
+process_definition :name => "Test", :revision => "60" do
0
   sequence do
0
     participant :ref => :toto
0
     nada
0
   end
0
-end""".strip
0
+end}.strip
0
 
0
   def test_prog_6
0
 
0
@@ -319,10 +319,10 @@ end""".strip
0
     end
0
   end
0
 
0
- CODE_DEF7 = """
0
-process_definition :name => 'TestDefinitionSeven', :revision => '0' do
0
+ CODE_DEF7 = %{
0
+process_definition :name => "TestDefinitionSeven", :revision => "0" do
0
   participant :ref => :toto
0
-end""".strip
0
+end}.strip
0
 
0
   A_DEF7 = [
0
     "process-definition",

Comments

    No one has commented yet.