openwferu 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +0 -3
- data/examples/engine_template.rb +10 -4
- data/lib/openwfe/engine/engine.rb +336 -63
- data/lib/openwfe/engine/file_persisted_engine.rb +9 -1
- data/lib/openwfe/expool/errorjournal.rb +379 -0
- data/lib/openwfe/expool/expressionpool.rb +84 -55
- data/lib/openwfe/expool/expstorage.rb +54 -18
- data/lib/openwfe/expool/journal.rb +31 -22
- data/lib/openwfe/expool/yamlexpstorage.rb +57 -16
- data/lib/openwfe/expressions/fe_sequence.rb +1 -1
- data/lib/openwfe/expressions/flowexpression.rb +13 -1
- data/lib/openwfe/expressions/{fe_raw.rb → raw.rb} +5 -2
- data/lib/openwfe/expressions/raw_prog.rb +1 -1
- data/lib/openwfe/expressions/raw_xml.rb +1 -1
- data/lib/openwfe/expressions/time.rb +2 -0
- data/lib/openwfe/flowexpressionid.rb +21 -6
- data/lib/openwfe/omixins.rb +37 -14
- data/lib/openwfe/participants/atomparticipants.rb +6 -5
- data/lib/openwfe/participants/participantmap.rb +2 -0
- data/lib/openwfe/rest/controlclient.rb +1 -0
- data/lib/openwfe/rudefinitions.rb +5 -1
- data/lib/openwfe/storage/yamlfilestorage.rb +7 -3
- data/lib/openwfe/util/otime.rb +1 -1
- data/lib/openwfe/util/safe.rb +14 -0
- data/lib/openwfe/util/scheduler.rb +8 -5
- data/lib/openwfe/util/workqueue.rb +9 -2
- data/lib/openwfe/utils.rb +18 -0
- data/lib/openwfe/version.rb +1 -1
- data/test/atom_test.rb +27 -26
- data/test/fei_test.rb +3 -3
- data/test/file_persistence_test.rb +19 -2
- data/test/ft_0c_testname.rb +6 -3
- data/test/ft_26_load.rb +14 -7
- data/test/ft_26b_load.rb +87 -0
- data/test/ft_26c_load.rb +71 -0
- data/test/ft_27_getflowpos.rb +22 -3
- data/test/ft_34_cancelwfid.rb +3 -2
- data/test/ft_42_environments.rb +3 -1
- data/test/ft_58_ejournal.rb +119 -0
- data/test/ft_59_ps.rb +118 -0
- data/test/ft_60_ecancel.rb +87 -0
- data/test/ft_tests.rb +4 -0
- data/test/hparticipant_test.rb +1 -1
- data/test/orest_test.rb +27 -4
- data/test/param_test.rb +5 -1
- data/test/participant_test.rb +39 -0
- data/test/rake_qtest.rb +3 -5
- data/test/rest_test.rb +2 -2
- data/test/scheduler_test.rb +10 -15
- metadata +10 -3
@@ -0,0 +1,119 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Fri Jun 29 23:12:53 JST 2007
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'openwfe/def'
|
11
|
+
|
12
|
+
require 'flowtestbase'
|
13
|
+
|
14
|
+
require 'openwfe/engine/file_persisted_engine'
|
15
|
+
require 'openwfe/expool/errorjournal'
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
class FlowTest58 < Test::Unit::TestCase
|
20
|
+
include FlowTestBase
|
21
|
+
|
22
|
+
#def teardown
|
23
|
+
#end
|
24
|
+
|
25
|
+
#def setup
|
26
|
+
#end
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# TEST 0
|
31
|
+
|
32
|
+
class Test0 < ProcessDefinition
|
33
|
+
sequence do
|
34
|
+
participant :alpha
|
35
|
+
participant :nada
|
36
|
+
participant :bravo
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
#def xxxx_0
|
41
|
+
def test_0
|
42
|
+
|
43
|
+
ejournal = @engine.get_error_journal
|
44
|
+
|
45
|
+
@engine.register_participant(:alpha) do |wi|
|
46
|
+
@tracer << "alpha\n"
|
47
|
+
end
|
48
|
+
|
49
|
+
#fei = dotest(Test0, "alpha", 0.500, true)
|
50
|
+
li = LaunchItem.new Test0
|
51
|
+
fei = @engine.launch li
|
52
|
+
|
53
|
+
sleep 0.500
|
54
|
+
|
55
|
+
assert File.exist?("work/ejournal/#{fei.parent_wfid}.ejournal") \
|
56
|
+
if @engine.is_a?(FilePersistedEngine)
|
57
|
+
|
58
|
+
errors = ejournal.get_error_log fei
|
59
|
+
|
60
|
+
#require 'pp'; pp ejournal
|
61
|
+
|
62
|
+
assert_equal errors.length, 1
|
63
|
+
|
64
|
+
first_error = errors[0]
|
65
|
+
|
66
|
+
assert ejournal.has_errors?(fei)
|
67
|
+
assert ejournal.has_errors?(fei.wfid)
|
68
|
+
|
69
|
+
# let's look at how errors do stack
|
70
|
+
|
71
|
+
ejournal.replay_at_last_error fei.wfid
|
72
|
+
|
73
|
+
sleep 0.500
|
74
|
+
|
75
|
+
errors = ejournal.get_error_log fei
|
76
|
+
|
77
|
+
assert_equal errors.length, 2
|
78
|
+
|
79
|
+
second_error = errors[1]
|
80
|
+
|
81
|
+
assert second_error.date > first_error.date
|
82
|
+
|
83
|
+
# let's clean the log (we have the error as 'second_error')
|
84
|
+
|
85
|
+
ejournal.remove_error_log fei.wfid
|
86
|
+
|
87
|
+
errors = ejournal.get_error_log fei
|
88
|
+
|
89
|
+
assert_equal errors.length, 0
|
90
|
+
assert ( ! ejournal.has_errors?(fei))
|
91
|
+
|
92
|
+
# OK, let's fix the root and replay
|
93
|
+
|
94
|
+
@engine.register_participant(:nada) do |wi|
|
95
|
+
@tracer << "nada\n"
|
96
|
+
end
|
97
|
+
@engine.register_participant(:bravo) do |wi|
|
98
|
+
@tracer << "bravo\n"
|
99
|
+
end
|
100
|
+
|
101
|
+
# fix done
|
102
|
+
|
103
|
+
assert_equal @tracer.to_s, "alpha"
|
104
|
+
|
105
|
+
ejournal.replay_at_error second_error
|
106
|
+
|
107
|
+
sleep 0.300
|
108
|
+
|
109
|
+
assert_equal @tracer.to_s, "alpha\nnada\nbravo"
|
110
|
+
|
111
|
+
errors = ejournal.get_error_log fei
|
112
|
+
|
113
|
+
assert_equal errors.length, 0
|
114
|
+
|
115
|
+
assert ( ! ejournal.has_errors?(fei))
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
data/test/ft_59_ps.rb
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Sat Jul 7 22:44:00 JST 2007 (tanabata)
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'openwfe/def'
|
11
|
+
require 'openwfe/worklist/storeparticipant'
|
12
|
+
|
13
|
+
require 'flowtestbase'
|
14
|
+
|
15
|
+
|
16
|
+
class FlowTest59 < Test::Unit::TestCase
|
17
|
+
include FlowTestBase
|
18
|
+
|
19
|
+
#def setup
|
20
|
+
#end
|
21
|
+
|
22
|
+
#def teardown
|
23
|
+
#end
|
24
|
+
|
25
|
+
#
|
26
|
+
# TEST 0
|
27
|
+
|
28
|
+
class Def59 < ProcessDefinition
|
29
|
+
concurrence do
|
30
|
+
store_a
|
31
|
+
store_b
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
#def xxxx_0
|
36
|
+
def test_0
|
37
|
+
|
38
|
+
sa = @engine.register_participant("store_a", OpenWFE::HashParticipant)
|
39
|
+
sb = @engine.register_participant("store_b", OpenWFE::HashParticipant)
|
40
|
+
|
41
|
+
fei = @engine.launch Def59
|
42
|
+
|
43
|
+
sleep 0.500
|
44
|
+
|
45
|
+
ps = @engine.get_process_status
|
46
|
+
#puts ps
|
47
|
+
|
48
|
+
assert_equal ps[fei.wfid].expressions.size, 2
|
49
|
+
assert_equal ps[fei.wfid].errors.size, 0
|
50
|
+
|
51
|
+
@engine.cancel_process fei
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# TEST 0b
|
56
|
+
|
57
|
+
class Def59b < ProcessDefinition
|
58
|
+
sequence do
|
59
|
+
alpha
|
60
|
+
bravo
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
#def xxxx_0b
|
65
|
+
def test_0b
|
66
|
+
|
67
|
+
a = @engine.register_participant(:alpha, OpenWFE::HashParticipant)
|
68
|
+
b = @engine.register_participant(:bravo, OpenWFE::HashParticipant)
|
69
|
+
|
70
|
+
fei = @engine.launch Def59b
|
71
|
+
|
72
|
+
sleep 0.500
|
73
|
+
|
74
|
+
ps = @engine.get_process_status
|
75
|
+
#puts ps
|
76
|
+
|
77
|
+
assert_equal ps[fei.wfid].expressions.size, 1
|
78
|
+
assert_equal ps[fei.wfid].errors.size, 0
|
79
|
+
|
80
|
+
@engine.cancel_process fei
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
# TEST 1
|
85
|
+
|
86
|
+
class Def59_1 < ProcessDefinition
|
87
|
+
sequence do
|
88
|
+
nada59_1
|
89
|
+
alpha
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
#def xxxx_1
|
94
|
+
def test_1
|
95
|
+
|
96
|
+
alpha = @engine.register_participant :alpha do
|
97
|
+
# nothing
|
98
|
+
end
|
99
|
+
|
100
|
+
fei = @engine.launch Def59_1
|
101
|
+
|
102
|
+
sleep 0.500
|
103
|
+
|
104
|
+
ps = @engine.get_process_status
|
105
|
+
#puts ps
|
106
|
+
#puts ps[fei.wfid].errors
|
107
|
+
|
108
|
+
assert_equal ps[fei.wfid].expressions.size, 1
|
109
|
+
assert_equal ps[fei.wfid].errors.size, 1
|
110
|
+
|
111
|
+
#puts
|
112
|
+
#puts ps.to_s
|
113
|
+
|
114
|
+
@engine.cancel_process fei.wfid
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
@@ -0,0 +1,87 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Mon Jul 9 10:25:18 JST 2007
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'openwfe/def'
|
11
|
+
require 'flowtestbase'
|
12
|
+
|
13
|
+
|
14
|
+
class FlowTest60 < Test::Unit::TestCase
|
15
|
+
include FlowTestBase
|
16
|
+
|
17
|
+
#def teardown
|
18
|
+
#end
|
19
|
+
|
20
|
+
#def setup
|
21
|
+
#end
|
22
|
+
|
23
|
+
#
|
24
|
+
# TEST 0
|
25
|
+
|
26
|
+
class TestDefinition0 < ProcessDefinition
|
27
|
+
sequence do
|
28
|
+
_print "a"
|
29
|
+
sequence do
|
30
|
+
_print "b.0"
|
31
|
+
_sleep "1s"
|
32
|
+
_print "b.1"
|
33
|
+
end
|
34
|
+
_print "c"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_0
|
39
|
+
|
40
|
+
#$OWFE_LOG.level = Logger::DEBUG
|
41
|
+
|
42
|
+
fei = @engine.launch TestDefinition0
|
43
|
+
fei = fei.dup
|
44
|
+
|
45
|
+
sleep 0.500
|
46
|
+
|
47
|
+
#puts
|
48
|
+
#puts @engine.get_process_stack fei.wfid
|
49
|
+
#puts
|
50
|
+
|
51
|
+
fei.expression_id = "0.0.1"
|
52
|
+
fei.expression_name = "sequence"
|
53
|
+
@engine.cancel_expression fei
|
54
|
+
|
55
|
+
sleep 0.700
|
56
|
+
|
57
|
+
assert_equal @tracer.to_s, "a\nb.0\nc"
|
58
|
+
|
59
|
+
assert_equal @engine.get_process_stack(fei.wfid).size, 0
|
60
|
+
|
61
|
+
#$OWFE_LOG.level = Logger::INFO
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_1
|
65
|
+
|
66
|
+
#$OWFE_LOG.level = Logger::DEBUG
|
67
|
+
|
68
|
+
fei = @engine.launch TestDefinition0
|
69
|
+
fei = fei.dup
|
70
|
+
|
71
|
+
sleep 0.500
|
72
|
+
|
73
|
+
fei.expression_id = "0.0.1.2"
|
74
|
+
fei.expression_name = "print"
|
75
|
+
@engine.cancel_expression fei
|
76
|
+
|
77
|
+
@engine.wait_for(fei.wfid)
|
78
|
+
|
79
|
+
assert_equal @tracer.to_s, "a\nb.0\nc"
|
80
|
+
|
81
|
+
assert_equal @engine.get_process_stack(fei.wfid).size, 0
|
82
|
+
|
83
|
+
#$OWFE_LOG.level = Logger::INFO
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
data/test/ft_tests.rb
CHANGED
data/test/hparticipant_test.rb
CHANGED
data/test/orest_test.rb
CHANGED
@@ -31,6 +31,9 @@ class OldRestTest < Test::Unit::TestCase
|
|
31
31
|
logger = WEBrick::Log.new "logs/orest_test.webrick.log"
|
32
32
|
logger.level = WEBrick::Log::DEBUG
|
33
33
|
|
34
|
+
#
|
35
|
+
# preparing a worklist
|
36
|
+
|
34
37
|
@worklist = OpenWFE::Worklist.new(
|
35
38
|
@engine.application_context,
|
36
39
|
:auth_system => { "foo" => "bar" })
|
@@ -44,10 +47,17 @@ class OldRestTest < Test::Unit::TestCase
|
|
44
47
|
"bravo",
|
45
48
|
"bravo",
|
46
49
|
OpenWFE::StoreWithLocks.new(OpenWFE::HashParticipant))
|
50
|
+
|
51
|
+
#
|
52
|
+
# registering the worklist (behind two participants)
|
47
53
|
|
48
54
|
@engine.register_participant :alpha, @worklist
|
49
55
|
@engine.register_participant :bravo, @worklist
|
50
56
|
|
57
|
+
#
|
58
|
+
# preparing and starting the webserver
|
59
|
+
# (it's a REST interface after all)
|
60
|
+
|
51
61
|
@server = WEBrick::HTTPServer.new(
|
52
62
|
:Port => 5080,
|
53
63
|
:BindAddress => "0.0.0.0",
|
@@ -81,6 +91,9 @@ class OldRestTest < Test::Unit::TestCase
|
|
81
91
|
def test_0
|
82
92
|
|
83
93
|
#sleep 0.1
|
94
|
+
|
95
|
+
#
|
96
|
+
# just checking that we get bounced in case of wrong credentials
|
84
97
|
|
85
98
|
assert_raise RuntimeError do
|
86
99
|
client = OpenWFE::WorklistClient.new(
|
@@ -94,10 +107,10 @@ class OldRestTest < Test::Unit::TestCase
|
|
94
107
|
|
95
108
|
assert_equal get_servlet.instance_variable_get(:@sessions).size, 1
|
96
109
|
|
110
|
+
#
|
111
|
+
# are there two stores in this worklist ?
|
112
|
+
|
97
113
|
l = client.list_stores
|
98
|
-
#l.each do |s|
|
99
|
-
# require 'pp'; pp s
|
100
|
-
#end
|
101
114
|
|
102
115
|
assert_equal l.size, 2
|
103
116
|
|
@@ -105,6 +118,9 @@ class OldRestTest < Test::Unit::TestCase
|
|
105
118
|
|
106
119
|
assert_equal store.name, "alpha"
|
107
120
|
|
121
|
+
#
|
122
|
+
# playing with a mock workitem
|
123
|
+
|
108
124
|
assert_raise RuntimeError do
|
109
125
|
client.get_headers "nada"
|
110
126
|
end
|
@@ -114,7 +130,6 @@ class OldRestTest < Test::Unit::TestCase
|
|
114
130
|
|
115
131
|
headers = client.get_headers "alpha"
|
116
132
|
|
117
|
-
#puts headers[0].fei
|
118
133
|
assert_equal headers.length, 1
|
119
134
|
assert_equal headers[0].attributes["nada"], "surf"
|
120
135
|
assert_equal headers[0].nada, "surf"
|
@@ -144,6 +159,8 @@ class OldRestTest < Test::Unit::TestCase
|
|
144
159
|
|
145
160
|
assert_equal headers.size, 2
|
146
161
|
|
162
|
+
# yes, the workitem of our newly launched process has arrived...
|
163
|
+
|
147
164
|
fei.expression_id = "0.0.0"
|
148
165
|
fei.expression_name = "participant"
|
149
166
|
|
@@ -153,6 +170,8 @@ class OldRestTest < Test::Unit::TestCase
|
|
153
170
|
|
154
171
|
wi = client.get_and_lock_workitem "alpha", fei
|
155
172
|
|
173
|
+
# got the workitem and made sure others can't modify / forward it
|
174
|
+
|
156
175
|
assert_equal wi.myfield, "myvalue"
|
157
176
|
|
158
177
|
headers = client.get_headers "alpha"
|
@@ -171,6 +190,8 @@ class OldRestTest < Test::Unit::TestCase
|
|
171
190
|
|
172
191
|
assert_equal feis.size, 1
|
173
192
|
|
193
|
+
# releasing the fish...
|
194
|
+
|
174
195
|
client.release_workitem wi
|
175
196
|
|
176
197
|
headers = client.get_headers "alpha"
|
@@ -181,6 +202,8 @@ class OldRestTest < Test::Unit::TestCase
|
|
181
202
|
client.save_workitem wi
|
182
203
|
end
|
183
204
|
|
205
|
+
# catching it again
|
206
|
+
|
184
207
|
wi = client.get_and_lock_workitem "alpha", fei
|
185
208
|
|
186
209
|
wi.got_forwarded = true
|
data/test/param_test.rb
CHANGED
@@ -55,16 +55,20 @@ class ParameterTest < Test::Unit::TestCase
|
|
55
55
|
|
56
56
|
#require 'pp' ; pp li
|
57
57
|
|
58
|
+
fei = nil
|
58
59
|
e = nil
|
59
60
|
|
60
61
|
begin
|
61
|
-
@engine.launch(li)
|
62
|
+
fei = @engine.launch(li)
|
62
63
|
rescue Exception => e
|
63
64
|
#puts e
|
64
65
|
#puts OpenWFE::exception_to_s(e)
|
65
66
|
end
|
66
67
|
|
67
68
|
assert_nil e
|
69
|
+
|
70
|
+
sleep 0.500
|
71
|
+
# let the flow terminate on its own
|
68
72
|
end
|
69
73
|
|
70
74
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Sun Oct 29 16:18:25 JST 2006
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
|
12
|
+
require 'openwfe/engine/engine'
|
13
|
+
require 'openwfe/participants/participants'
|
14
|
+
|
15
|
+
#
|
16
|
+
# testing misc things
|
17
|
+
#
|
18
|
+
|
19
|
+
class ParticipantTest < Test::Unit::TestCase
|
20
|
+
|
21
|
+
#def setup
|
22
|
+
#end
|
23
|
+
|
24
|
+
#def teardown
|
25
|
+
#end
|
26
|
+
|
27
|
+
def test_lookup_participant
|
28
|
+
|
29
|
+
engine = OpenWFE::Engine.new
|
30
|
+
engine.register_participant :toto, NullParticipant
|
31
|
+
|
32
|
+
p = engine.get_participant "toto"
|
33
|
+
assert_kind_of NullParticipant, p
|
34
|
+
|
35
|
+
p = engine.get_participant :toto
|
36
|
+
assert_kind_of NullParticipant, p
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
data/test/rake_qtest.rb
CHANGED
@@ -6,11 +6,6 @@
|
|
6
6
|
# Mon Oct 9 22:19:44 JST 2006
|
7
7
|
#
|
8
8
|
|
9
|
-
#require 'test/unit'
|
10
|
-
|
11
|
-
#File.delete('engine.log') \
|
12
|
-
# if File.exist? 'engine.log'
|
13
|
-
|
14
9
|
require 'fei_test'
|
15
10
|
require 'wfid_test'
|
16
11
|
require 'wi_test'
|
@@ -38,9 +33,12 @@ require 'ft_tests'
|
|
38
33
|
|
39
34
|
#require 'ft_30_socketlistener'
|
40
35
|
|
36
|
+
require 'participant_test'
|
41
37
|
require 'hparticipant_test'
|
42
38
|
require 'timeout_test'
|
43
39
|
|
44
40
|
require 'slock_test'
|
45
41
|
require 'orest_test.rb'
|
46
42
|
|
43
|
+
#require 'atom_test.rb'
|
44
|
+
|
data/test/rest_test.rb
CHANGED
@@ -167,8 +167,8 @@ class RestTest < Test::Unit::TestCase
|
|
167
167
|
puts
|
168
168
|
|
169
169
|
wfid = exps[-1].id.workflow_instance_id
|
170
|
-
puts "
|
171
|
-
exps = client.
|
170
|
+
puts "get_flow_stack() for flow #{wfid}"
|
171
|
+
exps = client.get_flow_stack(wfid)
|
172
172
|
display_expressions(exps)
|
173
173
|
|
174
174
|
client.close()
|
data/test/scheduler_test.rb
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
#
|
9
9
|
|
10
10
|
require 'test/unit'
|
11
|
-
#require 'openwfe/otime'
|
12
11
|
require 'openwfe/util/scheduler'
|
13
12
|
|
14
13
|
#
|
@@ -27,7 +26,7 @@ class SchedulerTest < Test::Unit::TestCase
|
|
27
26
|
|
28
27
|
$var = nil
|
29
28
|
|
30
|
-
scheduler = OpenWFE::Scheduler.new
|
29
|
+
scheduler = OpenWFE::Scheduler.new
|
31
30
|
scheduler.sstart
|
32
31
|
|
33
32
|
sid = scheduler.schedule_in('2s', :schedulable => TestSchedulable.new)
|
@@ -40,21 +39,19 @@ class SchedulerTest < Test::Unit::TestCase
|
|
40
39
|
(not $var),
|
41
40
|
"scheduler_0 is blocking but should not"
|
42
41
|
|
43
|
-
sleep
|
42
|
+
sleep 2.5
|
44
43
|
scheduler.sstop
|
45
44
|
|
46
45
|
#puts ">#{$var}<"
|
47
46
|
|
48
|
-
|
49
|
-
($var == "ok"),
|
50
|
-
"scheduler_0 didn't work"
|
47
|
+
assert_equal "ok", $var
|
51
48
|
end
|
52
49
|
|
53
50
|
def test_scheduler_1
|
54
51
|
|
55
52
|
$var = nil
|
56
53
|
|
57
|
-
scheduler = OpenWFE::Scheduler.new
|
54
|
+
scheduler = OpenWFE::Scheduler.new
|
58
55
|
scheduler.sstart
|
59
56
|
|
60
57
|
sid = scheduler.schedule_in('1s') do
|
@@ -69,14 +66,12 @@ class SchedulerTest < Test::Unit::TestCase
|
|
69
66
|
(not $var),
|
70
67
|
"scheduler_1 is blocking but should not"
|
71
68
|
|
72
|
-
sleep
|
69
|
+
sleep 2
|
73
70
|
scheduler.sstop
|
74
71
|
|
75
72
|
#puts ">#{$var}<"
|
76
73
|
|
77
|
-
assert
|
78
|
-
($var == "ok..1"),
|
79
|
-
"scheduler_1 didn't work"
|
74
|
+
assert "ok..1", $var
|
80
75
|
end
|
81
76
|
|
82
77
|
#
|
@@ -103,7 +98,7 @@ class SchedulerTest < Test::Unit::TestCase
|
|
103
98
|
|
104
99
|
#puts text
|
105
100
|
|
106
|
-
|
101
|
+
assert_equal text, "onetwo"
|
107
102
|
end
|
108
103
|
|
109
104
|
|
@@ -147,7 +142,7 @@ class SchedulerTest < Test::Unit::TestCase
|
|
147
142
|
job_id = scheduler.schedule_every("500", es)
|
148
143
|
#job_id = scheduler.schedule_every("500", :schedulable => es)
|
149
144
|
|
150
|
-
sleep(3.
|
145
|
+
sleep(3.4)
|
151
146
|
|
152
147
|
assert_equal es.count, 6
|
153
148
|
|
@@ -169,7 +164,7 @@ class SchedulerTest < Test::Unit::TestCase
|
|
169
164
|
#
|
170
165
|
def test_scheduler_5
|
171
166
|
|
172
|
-
scheduler = OpenWFE::Scheduler.new
|
167
|
+
scheduler = OpenWFE::Scheduler.new
|
173
168
|
scheduler.sstart
|
174
169
|
|
175
170
|
touched = false
|
@@ -188,7 +183,7 @@ class SchedulerTest < Test::Unit::TestCase
|
|
188
183
|
#
|
189
184
|
def test_scheduler_6
|
190
185
|
|
191
|
-
scheduler = OpenWFE::Scheduler.new
|
186
|
+
scheduler = OpenWFE::Scheduler.new
|
192
187
|
scheduler.start
|
193
188
|
|
194
189
|
value = nil
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: openwferu
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.9.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.9.12
|
7
|
+
date: 2007-07-10 00:00:00 +09:00
|
8
8
|
summary: an open source ruby workflow and bpm engine
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- lib/openwfe/worklist
|
59
59
|
- lib/openwfe/engine/engine.rb
|
60
60
|
- lib/openwfe/engine/file_persisted_engine.rb
|
61
|
+
- lib/openwfe/expool/errorjournal.rb
|
61
62
|
- lib/openwfe/expool/expressionpool.rb
|
62
63
|
- lib/openwfe/expool/expstorage.rb
|
63
64
|
- lib/openwfe/expool/history.rb
|
@@ -84,7 +85,6 @@ files:
|
|
84
85
|
- lib/openwfe/expressions/fe_losfor.rb
|
85
86
|
- lib/openwfe/expressions/fe_misc.rb
|
86
87
|
- lib/openwfe/expressions/fe_participant.rb
|
87
|
-
- lib/openwfe/expressions/fe_raw.rb
|
88
88
|
- lib/openwfe/expressions/fe_reserve.rb
|
89
89
|
- lib/openwfe/expressions/fe_save.rb
|
90
90
|
- lib/openwfe/expressions/fe_sequence.rb
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- lib/openwfe/expressions/filter.rb
|
98
98
|
- lib/openwfe/expressions/flowexpression.rb
|
99
99
|
- lib/openwfe/expressions/merge.rb
|
100
|
+
- lib/openwfe/expressions/raw.rb
|
100
101
|
- lib/openwfe/expressions/raw_prog.rb
|
101
102
|
- lib/openwfe/expressions/raw_xml.rb
|
102
103
|
- lib/openwfe/expressions/simplerep.rb
|
@@ -184,6 +185,8 @@ files:
|
|
184
185
|
- test/ft_24_def.rb
|
185
186
|
- test/ft_25_cancel.rb
|
186
187
|
- test/ft_26_load.rb
|
188
|
+
- test/ft_26b_load.rb
|
189
|
+
- test/ft_26c_load.rb
|
187
190
|
- test/ft_27_getflowpos.rb
|
188
191
|
- test/ft_28_fileparticipant.rb
|
189
192
|
- test/ft_29_httprb.rb
|
@@ -224,7 +227,10 @@ files:
|
|
224
227
|
- test/ft_55_ptimeout.rb
|
225
228
|
- test/ft_56_timeout.rb
|
226
229
|
- test/ft_57_a.rb
|
230
|
+
- test/ft_58_ejournal.rb
|
231
|
+
- test/ft_59_ps.rb
|
227
232
|
- test/ft_5_time.rb
|
233
|
+
- test/ft_60_ecancel.rb
|
228
234
|
- test/ft_6_lambda.rb
|
229
235
|
- test/ft_7_lose.rb
|
230
236
|
- test/ft_7b_lose.rb
|
@@ -240,6 +246,7 @@ files:
|
|
240
246
|
- test/obs_test.rb
|
241
247
|
- test/orest_test.rb
|
242
248
|
- test/param_test.rb
|
249
|
+
- test/participant_test.rb
|
243
250
|
- test/pending.rb
|
244
251
|
- test/rake_qtest.rb
|
245
252
|
- test/rake_test.rb
|