openwferu 0.9.10.653 → 0.9.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +65 -33
- data/examples/README.txt +4 -0
- data/examples/flowtracing.rb +2 -0
- data/examples/homeworkreview.rb +2 -0
- data/examples/mano_tracker.rb +2 -0
- data/examples/openwferu.rb +3 -1
- data/examples/quotereporter.rb +2 -0
- data/examples/scheduler_cron_usage.rb +3 -1
- data/examples/scheduler_usage.rb +3 -1
- data/lib/openwfe/engine/engine.rb +15 -5
- data/lib/openwfe/expool/expressionpool.rb +30 -4
- data/lib/openwfe/expool/journal.rb +16 -18
- data/lib/openwfe/expool/journal_replay.rb +56 -8
- data/lib/openwfe/expool/wfidgen.rb +17 -8
- data/lib/openwfe/expressions/condition.rb +41 -26
- data/lib/openwfe/expressions/expressionmap.rb +7 -0
- data/lib/openwfe/expressions/fe_cancel.rb +1 -1
- data/lib/openwfe/expressions/fe_concurrence.rb +14 -5
- data/lib/openwfe/expressions/fe_cron.rb +3 -1
- data/lib/openwfe/expressions/fe_cursor.rb +1 -1
- data/lib/openwfe/expressions/fe_fqv.rb +58 -0
- data/lib/openwfe/expressions/fe_if.rb +1 -1
- data/lib/openwfe/expressions/fe_iterator.rb +5 -0
- data/lib/openwfe/expressions/fe_listen.rb +224 -0
- data/lib/openwfe/expressions/fe_misc.rb +32 -9
- data/lib/openwfe/expressions/fe_participant.rb +26 -6
- data/lib/openwfe/expressions/fe_sleep.rb +5 -7
- data/lib/openwfe/expressions/fe_timeout.rb +127 -0
- data/lib/openwfe/expressions/fe_when.rb +13 -1
- data/lib/openwfe/expressions/flowexpression.rb +4 -1
- data/lib/openwfe/expressions/time.rb +10 -27
- data/lib/openwfe/expressions/timeout.rb +23 -6
- data/lib/openwfe/flowexpressionid.rb +7 -6
- data/lib/openwfe/listeners/socketlisteners.rb +1 -1
- data/lib/openwfe/participants/enoparticipants.rb +103 -47
- data/lib/openwfe/participants/participant.rb +29 -3
- data/lib/openwfe/participants/participantmap.rb +10 -2
- data/lib/openwfe/participants/participants.rb +31 -19
- data/lib/openwfe/participants/socketparticipants.rb +3 -1
- data/lib/openwfe/rest/controlclient.rb +5 -18
- data/lib/openwfe/rest/oldrestservlet.rb +279 -0
- data/lib/openwfe/rest/restclient.rb +55 -25
- data/lib/openwfe/rest/worklistclient.rb +35 -44
- data/lib/openwfe/rest/xmlcodec.rb +79 -69
- data/lib/openwfe/rudefinitions.rb +15 -7
- data/lib/openwfe/storage/yamlextras.rb +3 -3
- data/lib/openwfe/util/observable.rb +64 -7
- data/lib/openwfe/util/scheduler.rb +107 -77
- data/lib/openwfe/util/workqueue.rb +5 -11
- data/lib/openwfe/utils.rb +3 -3
- data/lib/openwfe/version.rb +1 -2
- data/lib/openwfe/workitem.rb +3 -4
- data/lib/openwfe/worklist/oldrest.rb +244 -0
- data/lib/openwfe/worklist/storelocks.rb +288 -0
- data/lib/openwfe/worklist/storeparticipant.rb +4 -2
- data/lib/openwfe/worklist/worklist.rb +297 -0
- data/test/cron_test.rb +8 -9
- data/test/eno_test.rb +10 -13
- data/test/flowtestbase.rb +26 -17
- data/test/ft_15_iterator.rb +19 -0
- data/test/ft_23c_wait.rb +2 -2
- data/test/ft_2b_concurrence.rb +2 -2
- data/test/ft_30_socketlistener.rb +5 -1
- data/test/ft_32_journal.rb +1 -1
- data/test/ft_32c_journal.rb +102 -0
- data/test/ft_32d_journal.rb +85 -0
- data/test/ft_45_citerator.rb +25 -0
- data/test/ft_49_condition.rb +60 -2
- data/test/ft_4_misc.rb +15 -0
- data/test/ft_50_xml_attribute.rb +4 -4
- data/test/ft_53_null_noop_participant.rb +66 -0
- data/test/ft_54_listen.rb +223 -0
- data/test/ft_55_ptimeout.rb +64 -0
- data/test/ft_56_timeout.rb +55 -0
- data/test/ft_57_a.rb +109 -0
- data/test/ft_tests.rb +7 -0
- data/test/hparticipant_test.rb +3 -3
- data/test/obs_test.rb +115 -0
- data/test/orest_test.rb +224 -0
- data/test/pending.rb +24 -0
- data/test/rake_qtest.rb +5 -1
- data/test/rake_test.rb +4 -0
- data/test/scheduler_test.rb +31 -2
- data/test/sec_test.rb +7 -3
- data/test/slock_test.rb +82 -0
- metadata +19 -3
- data/test/ft_32b_journal.rb +0 -76
data/test/orest_test.rb
ADDED
@@ -0,0 +1,224 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'test/unit'
|
9
|
+
require 'fileutils'
|
10
|
+
require 'webrick'
|
11
|
+
|
12
|
+
require 'rutest_utils'
|
13
|
+
require 'openwfe/rest/worklistclient'
|
14
|
+
require 'openwfe/engine/engine'
|
15
|
+
require 'openwfe/worklist/oldrest'
|
16
|
+
require 'openwfe/worklist/storelocks'
|
17
|
+
require 'openwfe/worklist/storeparticipant'
|
18
|
+
require 'openwfe/worklist/worklist'
|
19
|
+
|
20
|
+
|
21
|
+
class OldRestTest < Test::Unit::TestCase
|
22
|
+
|
23
|
+
def setup
|
24
|
+
|
25
|
+
#$DEBUG = true
|
26
|
+
|
27
|
+
@engine = Engine.new
|
28
|
+
|
29
|
+
FileUtils.mkdir "logs" unless File.exist?("logs")
|
30
|
+
|
31
|
+
logger = WEBrick::Log.new "logs/orest_test.webrick.log"
|
32
|
+
logger.level = WEBrick::Log::DEBUG
|
33
|
+
|
34
|
+
@worklist = OpenWFE::Worklist.new(
|
35
|
+
@engine.application_context,
|
36
|
+
:auth_system => { "foo" => "bar" })
|
37
|
+
#:launchables => {})
|
38
|
+
|
39
|
+
@worklist.add_store(
|
40
|
+
"alpha",
|
41
|
+
"alpha",
|
42
|
+
OpenWFE::StoreWithLocks.new(OpenWFE::HashParticipant))
|
43
|
+
@worklist.add_store(
|
44
|
+
"bravo",
|
45
|
+
"bravo",
|
46
|
+
OpenWFE::StoreWithLocks.new(OpenWFE::HashParticipant))
|
47
|
+
|
48
|
+
@engine.register_participant :alpha, @worklist
|
49
|
+
@engine.register_participant :bravo, @worklist
|
50
|
+
|
51
|
+
@server = WEBrick::HTTPServer.new(
|
52
|
+
:Port => 5080,
|
53
|
+
:BindAddress => "0.0.0.0",
|
54
|
+
:Logger => logger,
|
55
|
+
:AccessLog => [[
|
56
|
+
File.open("logs/orest_test.access.log", "w"),
|
57
|
+
WEBrick::AccessLog::COMMON_LOG_FORMAT ]])
|
58
|
+
|
59
|
+
@server.mount(
|
60
|
+
"/worklist",
|
61
|
+
OpenWFE::OldRestWorklistServlet,
|
62
|
+
:AuthSystem => @worklist,
|
63
|
+
:Worklist => @worklist)
|
64
|
+
|
65
|
+
Thread.new do
|
66
|
+
@server.start
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def get_servlet
|
71
|
+
servlet_class = @server.search_servlet("/worklist")[0]
|
72
|
+
servlet_class.get_instance(@server, {})
|
73
|
+
end
|
74
|
+
|
75
|
+
def teardown
|
76
|
+
@server.shutdown
|
77
|
+
@engine.stop
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
def test_0
|
82
|
+
|
83
|
+
#sleep 0.1
|
84
|
+
|
85
|
+
assert_raise RuntimeError do
|
86
|
+
client = OpenWFE::WorklistClient.new(
|
87
|
+
"http://localhost:5080/worklist", "foo", "foo")
|
88
|
+
end
|
89
|
+
|
90
|
+
client = OpenWFE::WorklistClient.new(
|
91
|
+
"http://localhost:5080/worklist", "foo", "bar")
|
92
|
+
|
93
|
+
assert client.session_id > 0
|
94
|
+
|
95
|
+
assert_equal get_servlet.instance_variable_get(:@sessions).size, 1
|
96
|
+
|
97
|
+
l = client.list_stores
|
98
|
+
#l.each do |s|
|
99
|
+
# require 'pp'; pp s
|
100
|
+
#end
|
101
|
+
|
102
|
+
assert_equal l.size, 2
|
103
|
+
|
104
|
+
store = l[0]
|
105
|
+
|
106
|
+
assert_equal store.name, "alpha"
|
107
|
+
|
108
|
+
assert_raise RuntimeError do
|
109
|
+
client.get_headers "nada"
|
110
|
+
end
|
111
|
+
|
112
|
+
actual_store = @worklist.get_store "alpha"
|
113
|
+
actual_store.consume(new_workitem())
|
114
|
+
|
115
|
+
headers = client.get_headers "alpha"
|
116
|
+
|
117
|
+
#puts headers[0].fei
|
118
|
+
assert_equal headers.length, 1
|
119
|
+
assert_equal headers[0].attributes["nada"], "surf"
|
120
|
+
assert_equal headers[0].nada, "surf"
|
121
|
+
|
122
|
+
#
|
123
|
+
# launching a new process...
|
124
|
+
|
125
|
+
li = LaunchItem.new('''
|
126
|
+
<process-definition name="orest" revision="1">
|
127
|
+
<sequence>
|
128
|
+
<participant ref="alpha" />
|
129
|
+
<participant ref="bravo" />
|
130
|
+
</sequence>
|
131
|
+
</process-definition>
|
132
|
+
'''.strip)
|
133
|
+
li.myfield = "myvalue"
|
134
|
+
|
135
|
+
fei = client.launch_flow "any", li
|
136
|
+
|
137
|
+
assert_kind_of OpenWFE::FlowExpressionId, fei
|
138
|
+
|
139
|
+
sleep 0.7
|
140
|
+
|
141
|
+
headers = client.get_headers "alpha"
|
142
|
+
|
143
|
+
#require 'pp'; pp headers
|
144
|
+
|
145
|
+
assert_equal headers.size, 2
|
146
|
+
|
147
|
+
fei.expression_id = "0.0.0"
|
148
|
+
fei.expression_name = "participant"
|
149
|
+
|
150
|
+
wi = client.get_workitem "alpha", fei
|
151
|
+
|
152
|
+
assert_equal wi.myfield, "myvalue"
|
153
|
+
|
154
|
+
wi = client.get_and_lock_workitem "alpha", fei
|
155
|
+
|
156
|
+
assert_equal wi.myfield, "myvalue"
|
157
|
+
|
158
|
+
headers = client.get_headers "alpha"
|
159
|
+
|
160
|
+
h = nil
|
161
|
+
headers.each do |hh|
|
162
|
+
if hh.locked
|
163
|
+
h = hh
|
164
|
+
break
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
assert_equal h.fei, fei
|
169
|
+
|
170
|
+
feis = client.find_flow_instance "alpha", fei.wfid
|
171
|
+
|
172
|
+
assert_equal feis.size, 1
|
173
|
+
|
174
|
+
client.release_workitem wi
|
175
|
+
|
176
|
+
headers = client.get_headers "alpha"
|
177
|
+
|
178
|
+
assert (not (headers[0].locked or headers[1].locked))
|
179
|
+
|
180
|
+
assert_raise RuntimeError do
|
181
|
+
client.save_workitem wi
|
182
|
+
end
|
183
|
+
|
184
|
+
wi = client.get_and_lock_workitem "alpha", fei
|
185
|
+
|
186
|
+
wi.got_forwarded = true
|
187
|
+
|
188
|
+
client.forward_workitem wi
|
189
|
+
|
190
|
+
headers = client.get_headers "alpha"
|
191
|
+
|
192
|
+
assert_equal headers.size, 1
|
193
|
+
|
194
|
+
assert_nil headers[0].attributes['got_forwarded']
|
195
|
+
#
|
196
|
+
# still our old initial workitem, inserted manually
|
197
|
+
|
198
|
+
sleep 0.500
|
199
|
+
|
200
|
+
headers = client.get_headers "bravo"
|
201
|
+
|
202
|
+
assert_equal headers.size, 1
|
203
|
+
|
204
|
+
assert_equal headers[0].got_forwarded, true
|
205
|
+
|
206
|
+
#
|
207
|
+
# done
|
208
|
+
|
209
|
+
client.close
|
210
|
+
|
211
|
+
assert_equal get_servlet.instance_variable_get(:@sessions).size, 0
|
212
|
+
end
|
213
|
+
|
214
|
+
protected
|
215
|
+
|
216
|
+
def new_workitem ()
|
217
|
+
wi = OpenWFE::InFlowWorkItem.new
|
218
|
+
wi.fei = new_fei()
|
219
|
+
wi.attributes = { "nada" => "surf" }
|
220
|
+
wi
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
|
data/test/pending.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# a method for checking the number of pending jobs left in the engine
|
4
|
+
#
|
5
|
+
|
6
|
+
require 'openwfe/engine/file_persisted_engine'
|
7
|
+
|
8
|
+
|
9
|
+
module PendingJobsMixin
|
10
|
+
|
11
|
+
def assert_no_jobs_left
|
12
|
+
|
13
|
+
min_jobs = if @engine.is_a?(OpenWFE::CachedFilePersistedEngine)
|
14
|
+
1
|
15
|
+
#elsif @engine.is_a?(OpenWFE::FilePersistedEngine)
|
16
|
+
# 0
|
17
|
+
else
|
18
|
+
0
|
19
|
+
end
|
20
|
+
|
21
|
+
assert_equal @engine.get_scheduler.pending_job_count, min_jobs
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
data/test/rake_qtest.rb
CHANGED
@@ -27,6 +27,7 @@ require 'csv_test'
|
|
27
27
|
require 'safely_test'
|
28
28
|
require 'kotoba_test'
|
29
29
|
require 'expmap_test'
|
30
|
+
require 'obs_test'
|
30
31
|
|
31
32
|
require 'sec_test'
|
32
33
|
require 'param_test'
|
@@ -35,8 +36,11 @@ require 'ft_tests'
|
|
35
36
|
#
|
36
37
|
# all the 'ft' tests are required in 'ft_tests.rb'
|
37
38
|
|
38
|
-
require 'ft_30_socketlistener'
|
39
|
+
#require 'ft_30_socketlistener'
|
39
40
|
|
40
41
|
require 'hparticipant_test'
|
41
42
|
require 'timeout_test'
|
42
43
|
|
44
|
+
require 'slock_test'
|
45
|
+
require 'orest_test.rb'
|
46
|
+
|
data/test/rake_test.rb
CHANGED
data/test/scheduler_test.rb
CHANGED
@@ -30,7 +30,7 @@ class SchedulerTest < Test::Unit::TestCase
|
|
30
30
|
scheduler = OpenWFE::Scheduler.new()
|
31
31
|
scheduler.sstart
|
32
32
|
|
33
|
-
sid = scheduler.schedule_in('2s', TestSchedulable.new
|
33
|
+
sid = scheduler.schedule_in('2s', :schedulable => TestSchedulable.new)
|
34
34
|
|
35
35
|
assert \
|
36
36
|
sid,
|
@@ -144,7 +144,8 @@ class SchedulerTest < Test::Unit::TestCase
|
|
144
144
|
|
145
145
|
es = EverySchedulable.new
|
146
146
|
|
147
|
-
job_id = scheduler.schedule_every("500", es
|
147
|
+
job_id = scheduler.schedule_every("500", es)
|
148
|
+
#job_id = scheduler.schedule_every("500", :schedulable => es)
|
148
149
|
|
149
150
|
sleep(3.2)
|
150
151
|
|
@@ -182,6 +183,34 @@ class SchedulerTest < Test::Unit::TestCase
|
|
182
183
|
scheduler.sstop
|
183
184
|
end
|
184
185
|
|
186
|
+
#
|
187
|
+
# Testing to see if a second job with the same id discards the first one.
|
188
|
+
#
|
189
|
+
def test_scheduler_6
|
190
|
+
|
191
|
+
scheduler = OpenWFE::Scheduler.new()
|
192
|
+
scheduler.start
|
193
|
+
|
194
|
+
value = nil
|
195
|
+
|
196
|
+
scheduler.schedule_in "3s", :job_id => "job" do
|
197
|
+
value = 0
|
198
|
+
end
|
199
|
+
scheduler.schedule_in "2s", :job_id => "job" do
|
200
|
+
value = 1
|
201
|
+
end
|
202
|
+
|
203
|
+
sleep 2.5
|
204
|
+
|
205
|
+
assert_equal value, 1
|
206
|
+
|
207
|
+
sleep 4
|
208
|
+
|
209
|
+
assert_equal value, 1
|
210
|
+
|
211
|
+
scheduler.stop
|
212
|
+
end
|
213
|
+
|
185
214
|
protected
|
186
215
|
|
187
216
|
class TestSchedulable
|
data/test/sec_test.rb
CHANGED
@@ -43,7 +43,9 @@ class SecTest < Test::Unit::TestCase
|
|
43
43
|
|
44
44
|
dotest(engine, def0)
|
45
45
|
|
46
|
-
assert
|
46
|
+
assert((
|
47
|
+
OpenWFE::grep "Insecure operation - initialize",
|
48
|
+
"logs/openwferu.log").size > 0)
|
47
49
|
|
48
50
|
def1 = \
|
49
51
|
'''<process-definition name="" revision="0">
|
@@ -61,7 +63,9 @@ class SecTest < Test::Unit::TestCase
|
|
61
63
|
|
62
64
|
dotest(engine, def1)
|
63
65
|
|
64
|
-
assert
|
66
|
+
assert((
|
67
|
+
OpenWFE::grep "undefined method `my_name' for \"stringobject\":String",
|
68
|
+
"logs/openwferu.log").size > 0)
|
65
69
|
|
66
70
|
def2 = \
|
67
71
|
'''<process-definition name="" revision="0">
|
@@ -92,7 +96,7 @@ class SecTest < Test::Unit::TestCase
|
|
92
96
|
dotest(engine, def3)
|
93
97
|
|
94
98
|
assert OpenWFE::grep(
|
95
|
-
"evaluation of ruby code is not allowed", "
|
99
|
+
"evaluation of ruby code is not allowed", "logs/openwferu.log")
|
96
100
|
|
97
101
|
engine.stop
|
98
102
|
end
|
data/test/slock_test.rb
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'test/unit'
|
9
|
+
require 'openwfe/worklist/storelocks'
|
10
|
+
require 'openwfe/worklist/storeparticipant'
|
11
|
+
|
12
|
+
include OpenWFE
|
13
|
+
|
14
|
+
|
15
|
+
class MockItem
|
16
|
+
attr_reader :fei
|
17
|
+
def initialize (fei)
|
18
|
+
@fei = fei
|
19
|
+
end
|
20
|
+
def flow_expression_id
|
21
|
+
@fei
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class StoreLockTest < Test::Unit::TestCase
|
26
|
+
|
27
|
+
#def setup
|
28
|
+
#end
|
29
|
+
|
30
|
+
#def teardown
|
31
|
+
#end
|
32
|
+
|
33
|
+
def test_0
|
34
|
+
|
35
|
+
store = StoreWithLocks.new(HashParticipant)
|
36
|
+
|
37
|
+
wi0 = MockItem.new("fei")
|
38
|
+
|
39
|
+
store.store.push(wi0)
|
40
|
+
|
41
|
+
wi1 = store.get_and_lock("locker_a", "fei")
|
42
|
+
|
43
|
+
assert_not_nil wi1
|
44
|
+
assert_equal wi0.object_id, wi1.object_id
|
45
|
+
|
46
|
+
assert_raise RuntimeError do
|
47
|
+
wi2 = store.get_and_lock("locker_b", "fei")
|
48
|
+
end
|
49
|
+
|
50
|
+
assert_equal store.get_locker("fei"), "locker_a"
|
51
|
+
|
52
|
+
assert_raise RuntimeError do
|
53
|
+
store.release "locker_b", "fei"
|
54
|
+
end
|
55
|
+
|
56
|
+
store.release "locker_a", "fei"
|
57
|
+
|
58
|
+
assert_nil store.get_locker("fei")
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_1
|
62
|
+
|
63
|
+
store = StoreWithLocks.new(
|
64
|
+
HashParticipant,
|
65
|
+
nil,
|
66
|
+
:lock_max_age => "100")
|
67
|
+
|
68
|
+
wi0 = MockItem.new("fei")
|
69
|
+
|
70
|
+
store.store.push(wi0)
|
71
|
+
|
72
|
+
wi1 = store.get_and_lock("locker_a", "fei")
|
73
|
+
|
74
|
+
assert_not_nil wi1
|
75
|
+
|
76
|
+
sleep 1
|
77
|
+
|
78
|
+
assert_nil store.get_locker("fei")
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
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.11
|
7
|
+
date: 2007-06-06 00:00:00 +09:00
|
8
8
|
summary: an open source ruby workflow and bpm engine
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- lib/openwfe/expressions/fe_fqv.rb
|
81
81
|
- lib/openwfe/expressions/fe_if.rb
|
82
82
|
- lib/openwfe/expressions/fe_iterator.rb
|
83
|
+
- lib/openwfe/expressions/fe_listen.rb
|
83
84
|
- lib/openwfe/expressions/fe_losfor.rb
|
84
85
|
- lib/openwfe/expressions/fe_misc.rb
|
85
86
|
- lib/openwfe/expressions/fe_participant.rb
|
@@ -89,6 +90,7 @@ files:
|
|
89
90
|
- lib/openwfe/expressions/fe_sequence.rb
|
90
91
|
- lib/openwfe/expressions/fe_sleep.rb
|
91
92
|
- lib/openwfe/expressions/fe_subprocess.rb
|
93
|
+
- lib/openwfe/expressions/fe_timeout.rb
|
92
94
|
- lib/openwfe/expressions/fe_value.rb
|
93
95
|
- lib/openwfe/expressions/fe_wait.rb
|
94
96
|
- lib/openwfe/expressions/fe_when.rb
|
@@ -117,6 +119,7 @@ files:
|
|
117
119
|
- lib/openwfe/rest/controlclient.rb
|
118
120
|
- lib/openwfe/rest/definitions.rb
|
119
121
|
- lib/openwfe/rest/exception.rb
|
122
|
+
- lib/openwfe/rest/oldrestservlet.rb
|
120
123
|
- lib/openwfe/rest/osocket.rb
|
121
124
|
- lib/openwfe/rest/restclient.rb
|
122
125
|
- lib/openwfe/rest/worklistclient.rb
|
@@ -137,7 +140,10 @@ files:
|
|
137
140
|
- lib/openwfe/util/schedulers.rb
|
138
141
|
- lib/openwfe/util/sqs.rb
|
139
142
|
- lib/openwfe/util/workqueue.rb
|
143
|
+
- lib/openwfe/worklist/oldrest.rb
|
144
|
+
- lib/openwfe/worklist/storelocks.rb
|
140
145
|
- lib/openwfe/worklist/storeparticipant.rb
|
146
|
+
- lib/openwfe/worklist/worklist.rb
|
141
147
|
- test/atom_test.rb
|
142
148
|
- test/console_test.rb
|
143
149
|
- test/cron_test.rb
|
@@ -187,7 +193,8 @@ files:
|
|
187
193
|
- test/ft_30_socketlistener.rb
|
188
194
|
- test/ft_31_flowname.rb
|
189
195
|
- test/ft_32_journal.rb
|
190
|
-
- test/
|
196
|
+
- test/ft_32c_journal.rb
|
197
|
+
- test/ft_32d_journal.rb
|
191
198
|
- test/ft_33_description.rb
|
192
199
|
- test/ft_34_cancelwfid.rb
|
193
200
|
- test/ft_35_localdefs.rb
|
@@ -212,6 +219,11 @@ files:
|
|
212
219
|
- test/ft_50_xml_attribute.rb
|
213
220
|
- test/ft_51_stack.rb
|
214
221
|
- test/ft_52_obs_participant.rb
|
222
|
+
- test/ft_53_null_noop_participant.rb
|
223
|
+
- test/ft_54_listen.rb
|
224
|
+
- test/ft_55_ptimeout.rb
|
225
|
+
- test/ft_56_timeout.rb
|
226
|
+
- test/ft_57_a.rb
|
215
227
|
- test/ft_5_time.rb
|
216
228
|
- test/ft_6_lambda.rb
|
217
229
|
- test/ft_7_lose.rb
|
@@ -225,7 +237,10 @@ files:
|
|
225
237
|
- test/lru_test.rb
|
226
238
|
- test/misc_test.rb
|
227
239
|
- test/nut_0_irb.rb
|
240
|
+
- test/obs_test.rb
|
241
|
+
- test/orest_test.rb
|
228
242
|
- test/param_test.rb
|
243
|
+
- test/pending.rb
|
229
244
|
- test/rake_qtest.rb
|
230
245
|
- test/rake_test.rb
|
231
246
|
- test/raw_prog_test.rb
|
@@ -239,6 +254,7 @@ files:
|
|
239
254
|
- test/safely_test.rb
|
240
255
|
- test/scheduler_test.rb
|
241
256
|
- test/sec_test.rb
|
257
|
+
- test/slock_test.rb
|
242
258
|
- test/sqs_test.rb
|
243
259
|
- test/time_test.rb
|
244
260
|
- test/timeout_test.rb
|
data/test/ft_32b_journal.rb
DELETED
@@ -1,76 +0,0 @@
|
|
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
|
-
|
12
|
-
require 'flowtestbase'
|
13
|
-
|
14
|
-
require 'openwfe/expool/journal'
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
class FlowTest32b < Test::Unit::TestCase
|
19
|
-
include FlowTestBase
|
20
|
-
|
21
|
-
#def teardown
|
22
|
-
#end
|
23
|
-
|
24
|
-
#def setup
|
25
|
-
#end
|
26
|
-
|
27
|
-
#
|
28
|
-
# TEST 0
|
29
|
-
|
30
|
-
class TestDefinition0 < ProcessDefinition
|
31
|
-
sequence do
|
32
|
-
participant :alpha
|
33
|
-
participant :bravo
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
#def xxxx_journal_0
|
38
|
-
def test_journal_0
|
39
|
-
|
40
|
-
#@engine.application_context[:keep_journals] = true
|
41
|
-
|
42
|
-
@engine.init_service "journal", Journal
|
43
|
-
|
44
|
-
@engine.register_participant(:alpha) do |wi|
|
45
|
-
@tracer << "alpha\n"
|
46
|
-
sleep(90)
|
47
|
-
end
|
48
|
-
@engine.register_participant(:bravo) do |wi|
|
49
|
-
@tracer << "bravo\n"
|
50
|
-
end
|
51
|
-
|
52
|
-
journal_service = @engine.application_context["journal"]
|
53
|
-
|
54
|
-
fei = dotest(TestDefinition0, "alpha\nbravo")
|
55
|
-
|
56
|
-
return
|
57
|
-
|
58
|
-
fn = journal_service.donedir + "/" + fei.wfid + ".journal"
|
59
|
-
|
60
|
-
#journal_service.analyze fn
|
61
|
-
|
62
|
-
#sleep(10)
|
63
|
-
|
64
|
-
assert_equal @engine.get_expression_storage.size, 1
|
65
|
-
|
66
|
-
journal_service.replay fn, 18
|
67
|
-
|
68
|
-
assert_equal @engine.get_expression_storage.size, 6
|
69
|
-
|
70
|
-
journal_service.replay fn, 18, true
|
71
|
-
|
72
|
-
assert_equal @engine.get_expression_storage.size, 1
|
73
|
-
end
|
74
|
-
|
75
|
-
end
|
76
|
-
|