openwferu 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/examples/flowtracing.rb +22 -0
- data/lib/openwfe/contextual.rb +5 -2
- data/lib/openwfe/def.rb +47 -0
- data/lib/openwfe/engine/engine.rb +1 -1
- data/lib/openwfe/engine/file_persisted_engine.rb +3 -5
- data/lib/openwfe/expool/expressionpool.rb +45 -6
- data/lib/openwfe/expool/history.rb +117 -0
- data/lib/openwfe/expool/yamlexpstorage.rb +21 -4
- data/lib/openwfe/expressions/environment.rb +3 -0
- data/lib/openwfe/expressions/expressionmap.rb +1 -0
- data/lib/openwfe/expressions/fe_concurrence.rb +22 -12
- data/lib/openwfe/expressions/fe_iterator.rb +3 -1
- data/lib/openwfe/expressions/fe_participant.rb +1 -4
- data/lib/openwfe/expressions/fe_raw.rb +2 -2
- data/lib/openwfe/expressions/fe_time.rb +184 -10
- data/lib/openwfe/expressions/fe_utils.rb +10 -0
- data/lib/openwfe/expressions/flowexpression.rb +3 -1
- data/lib/openwfe/expressions/raw_prog.rb +1 -1
- data/lib/openwfe/expressions/timeout.rb +47 -13
- data/lib/openwfe/flowexpressionid.rb +9 -1
- data/lib/openwfe/participants/csvparticipant.rb +127 -0
- data/lib/openwfe/participants/participant.rb +1 -0
- data/lib/openwfe/participants/participants.rb +26 -3
- data/lib/openwfe/rest/controlclient.rb +3 -3
- data/lib/openwfe/rest/worklistclient.rb +6 -8
- data/lib/openwfe/rest/xmlcodec.rb +6 -6
- data/lib/openwfe/rudefinitions.rb +6 -13
- data/lib/openwfe/storage/yamlfilestorage.rb +1 -1
- data/lib/openwfe/tools/flowtracer.rb +80 -0
- data/lib/openwfe/util/csvtable.rb +378 -0
- data/lib/openwfe/util/dollar.rb +24 -7
- data/lib/openwfe/util/observable.rb +82 -0
- data/lib/openwfe/util/scheduler.rb +14 -0
- data/lib/openwfe/utils.rb +64 -0
- data/lib/openwfe/version.rb +38 -0
- data/lib/openwfe/workitem.rb +53 -0
- data/lib/openwfe/worklist/storeparticipant.rb +19 -4
- data/test/csv_test.rb +285 -0
- data/test/fei_test.rb +1 -1
- data/test/file_persistence_test.rb +2 -2
- data/test/flowtestbase.rb +10 -3
- data/test/ft_0.rb +0 -7
- data/test/ft_0d_participant.rb +29 -0
- data/test/ft_11_ppd.rb +26 -1
- data/test/ft_12_blockparticipant.rb +28 -1
- data/test/ft_19_csv.rb +64 -0
- data/test/ft_20_cron.rb +60 -0
- data/test/ft_21_cron.rb +48 -0
- data/test/ft_22_history.rb +68 -0
- data/test/ft_23_when.rb +50 -0
- data/test/ft_23b_when.rb +45 -0
- data/test/ft_24_def.rb +47 -0
- data/test/ft_9_cursor.rb +20 -0
- data/test/rake_qtest.rb +7 -0
- data/test/rake_test.rb +3 -0
- data/test/timeout_test.rb +46 -4
- data/test/wi_test.rb +66 -0
- metadata +21 -3
- data/test/rake_ptest.rb +0 -18
data/test/ft_19_csv.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFEru
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'flowtestbase'
|
9
|
+
require 'openwfe/expressions/raw_prog'
|
10
|
+
require 'openwfe/participants/csvparticipant'
|
11
|
+
|
12
|
+
include OpenWFE
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
class FlowTest19 < FlowTestBase
|
17
|
+
|
18
|
+
CSV0 = \
|
19
|
+
"""
|
20
|
+
in:weather, in:month, out:take_umbrella?
|
21
|
+
,,
|
22
|
+
raining, , yes
|
23
|
+
sunny, , no
|
24
|
+
cloudy, june, yes
|
25
|
+
cloudy, may, yes
|
26
|
+
cloudy, , no
|
27
|
+
"""
|
28
|
+
|
29
|
+
#def setup
|
30
|
+
#end
|
31
|
+
|
32
|
+
#def teardown
|
33
|
+
#end
|
34
|
+
|
35
|
+
#
|
36
|
+
# Test 0
|
37
|
+
#
|
38
|
+
|
39
|
+
class TestDefinition0 < ProcessDefinition
|
40
|
+
def make
|
41
|
+
process_definition :name => "test0", :revision => "0" do
|
42
|
+
sequence do
|
43
|
+
set :field => "weather", :value => "cloudy"
|
44
|
+
set :field => "month", :value => "may"
|
45
|
+
decision
|
46
|
+
_print "${f:take_umbrella?}"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_0
|
53
|
+
|
54
|
+
csvParticipant = CsvParticipant.new(CSV0)
|
55
|
+
|
56
|
+
@engine.register_participant("decision", csvParticipant)
|
57
|
+
|
58
|
+
dotest(
|
59
|
+
TestDefinition0,
|
60
|
+
"yes")
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
data/test/ft_20_cron.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFEru
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'flowtestbase'
|
9
|
+
require 'openwfe/expressions/raw_prog'
|
10
|
+
require 'openwfe/participants/csvparticipant'
|
11
|
+
|
12
|
+
include OpenWFE
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
class FlowTest20 < FlowTestBase
|
17
|
+
|
18
|
+
#def setup
|
19
|
+
#end
|
20
|
+
|
21
|
+
#def teardown
|
22
|
+
#end
|
23
|
+
|
24
|
+
#
|
25
|
+
# Test 0
|
26
|
+
#
|
27
|
+
|
28
|
+
class TestDefinition0 < ProcessDefinition
|
29
|
+
def make
|
30
|
+
process_definition :name => "rs0", :revision => "0" do
|
31
|
+
concurrence do
|
32
|
+
cron :tab => "* * * * *", :name => "cron" do
|
33
|
+
participant :cron_event
|
34
|
+
end
|
35
|
+
sequence do
|
36
|
+
_print "before"
|
37
|
+
_sleep :for => "61s"
|
38
|
+
_print "after"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_0
|
46
|
+
|
47
|
+
@engine.register_participant(:cron_event) do |fexp, wi|
|
48
|
+
@tracer << "#{fexp.class.name}\n"
|
49
|
+
end
|
50
|
+
|
51
|
+
dotest(
|
52
|
+
TestDefinition0,
|
53
|
+
"""before
|
54
|
+
OpenWFE::ParticipantExpression
|
55
|
+
after""",
|
56
|
+
62)
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
data/test/ft_21_cron.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFEru
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'flowtestbase'
|
9
|
+
require 'openwfe/expressions/raw_prog'
|
10
|
+
require 'openwfe/participants/csvparticipant'
|
11
|
+
|
12
|
+
include OpenWFE
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
class FlowTest21 < FlowTestBase
|
17
|
+
|
18
|
+
#def setup
|
19
|
+
#end
|
20
|
+
|
21
|
+
#def teardown
|
22
|
+
#end
|
23
|
+
|
24
|
+
#
|
25
|
+
# Test 0
|
26
|
+
#
|
27
|
+
|
28
|
+
class TestDefinition0 < ProcessDefinition
|
29
|
+
def make
|
30
|
+
process_definition :name => "rs0", :revision => "0" do
|
31
|
+
cron :tab => "* * * * *", :name => "cron" do
|
32
|
+
participant :cron_event
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_0
|
39
|
+
|
40
|
+
@engine.register_participant(:cron_event) do
|
41
|
+
@tracer << "cron_event"
|
42
|
+
end
|
43
|
+
|
44
|
+
dotest(TestDefinition0, "", 62)
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
@@ -0,0 +1,68 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Tue Jan 2 13:14:37 JST 2007
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'flowtestbase'
|
11
|
+
require 'openwfe/expool/history'
|
12
|
+
require 'openwfe/expressions/raw_prog'
|
13
|
+
|
14
|
+
include OpenWFE
|
15
|
+
|
16
|
+
|
17
|
+
class FlowTest22 < FlowTestBase
|
18
|
+
|
19
|
+
#def setup
|
20
|
+
#end
|
21
|
+
|
22
|
+
#def teardown
|
23
|
+
#end
|
24
|
+
|
25
|
+
#
|
26
|
+
# Test 0
|
27
|
+
#
|
28
|
+
|
29
|
+
class TestDefinition0 < ProcessDefinition
|
30
|
+
def make
|
31
|
+
process_definition :name => "test0", :revision => "0" do
|
32
|
+
sequence do
|
33
|
+
_print "a"
|
34
|
+
_print "b"
|
35
|
+
_print "c"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_history_0
|
42
|
+
|
43
|
+
@engine.init_service("history", InMemoryHistory)
|
44
|
+
|
45
|
+
history = @engine.application_context["history"]
|
46
|
+
|
47
|
+
dotest(
|
48
|
+
TestDefinition0,
|
49
|
+
"""a
|
50
|
+
b
|
51
|
+
c""")
|
52
|
+
|
53
|
+
#puts history.to_s
|
54
|
+
#puts history.entries.size()
|
55
|
+
|
56
|
+
#f = File.open("history.log", "w")
|
57
|
+
#f.write(history.to_s)
|
58
|
+
#f.close()
|
59
|
+
|
60
|
+
assert \
|
61
|
+
(history.entries.size == 34 or history.entries.size == 37),
|
62
|
+
"History count is #{history.entries.size} should be 34 (or 37)"
|
63
|
+
|
64
|
+
# 37 in case of persisted engine (it's slower, so rescheduling kicks in)
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
data/test/ft_23_when.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFEru
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'flowtestbase'
|
9
|
+
require 'openwfe/expressions/raw_prog'
|
10
|
+
|
11
|
+
include OpenWFE
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
class FlowTest23 < FlowTestBase
|
16
|
+
|
17
|
+
#def setup
|
18
|
+
#end
|
19
|
+
|
20
|
+
#def teardown
|
21
|
+
#end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Test 0
|
25
|
+
#
|
26
|
+
|
27
|
+
class TestDefinition0 < ProcessDefinition
|
28
|
+
def make
|
29
|
+
process_definition :name => "when0", :revision => "0" do
|
30
|
+
concurrence do
|
31
|
+
_when :test => "${v:done} == true", :frequency => "2s" do
|
32
|
+
_print "ok"
|
33
|
+
end
|
34
|
+
sequence do
|
35
|
+
_sleep "500"
|
36
|
+
_set :variable => "done", :value => "true"
|
37
|
+
_print "done"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_0
|
45
|
+
#dotest(TestDefinition0, "done\nok")
|
46
|
+
dotest(TestDefinition0, "done\nok", 4)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
data/test/ft_23b_when.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFEru
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'flowtestbase'
|
9
|
+
require 'openwfe/expressions/raw_prog'
|
10
|
+
|
11
|
+
include OpenWFE
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
class FlowTest23 < FlowTestBase
|
16
|
+
|
17
|
+
#def setup
|
18
|
+
#end
|
19
|
+
|
20
|
+
#def teardown
|
21
|
+
#end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Test 0
|
25
|
+
#
|
26
|
+
|
27
|
+
class TestDefinition0 < ProcessDefinition
|
28
|
+
def make
|
29
|
+
process_definition :name => "23b_when0", :revision => "0" do
|
30
|
+
concurrence do
|
31
|
+
_when :test => "false == true", :timeout => "10s" do
|
32
|
+
_print "la vaca vuela"
|
33
|
+
end
|
34
|
+
_print "ok"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_0
|
41
|
+
dotest(TestDefinition0, "ok", 23)
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
data/test/ft_24_def.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFEru
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'flowtestbase'
|
9
|
+
require 'openwfe/def'
|
10
|
+
|
11
|
+
include OpenWFE
|
12
|
+
|
13
|
+
|
14
|
+
#
|
15
|
+
# just testing the
|
16
|
+
#
|
17
|
+
# require 'openwfe/def'
|
18
|
+
#
|
19
|
+
# shortcut
|
20
|
+
#
|
21
|
+
|
22
|
+
class FlowTest24 < FlowTestBase
|
23
|
+
|
24
|
+
#def setup
|
25
|
+
#end
|
26
|
+
|
27
|
+
#def teardown
|
28
|
+
#end
|
29
|
+
|
30
|
+
#
|
31
|
+
# Test 0
|
32
|
+
#
|
33
|
+
|
34
|
+
class TestDefinition0 < ProcessDefinition
|
35
|
+
def make
|
36
|
+
process_definition :name => "ft_24_def", :revision => "0" do
|
37
|
+
_print "ok"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_0
|
43
|
+
dotest(TestDefinition0, "ok")
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
data/test/ft_9_cursor.rb
CHANGED
@@ -58,6 +58,26 @@ b""")
|
|
58
58
|
b""")
|
59
59
|
end
|
60
60
|
|
61
|
+
def test_cursor_2b
|
62
|
+
#
|
63
|
+
# ZigZag test
|
64
|
+
#
|
65
|
+
dotest(\
|
66
|
+
'<process-definition name="'+test_name+'''" revision="0">
|
67
|
+
<cursor>
|
68
|
+
<print>a</print>
|
69
|
+
<skip step="3" />
|
70
|
+
<print>b</print>
|
71
|
+
<skip step="2" />
|
72
|
+
<back step="2"/>
|
73
|
+
<print>c</print>
|
74
|
+
</cursor>
|
75
|
+
</process-definition>''',
|
76
|
+
"""a
|
77
|
+
b
|
78
|
+
c""")
|
79
|
+
end
|
80
|
+
|
61
81
|
def test_cursor_3
|
62
82
|
dotest(\
|
63
83
|
'<process-definition name="'+test_name+'''" revision="0">
|
data/test/rake_qtest.rb
CHANGED
@@ -12,12 +12,14 @@ File.delete('engine.log') \
|
|
12
12
|
if File.exist? 'engine.log'
|
13
13
|
|
14
14
|
require 'fei_test'
|
15
|
+
require 'wi_test'
|
15
16
|
require 'dollar_test'
|
16
17
|
require 'misc_test'
|
17
18
|
require 'time_test'
|
18
19
|
require 'raw_prog_test'
|
19
20
|
require 'file_persistence_test'
|
20
21
|
require 'cronline_test'
|
22
|
+
require 'csv_test'
|
21
23
|
|
22
24
|
#require 'journal_persistence_test'
|
23
25
|
#
|
@@ -26,6 +28,7 @@ require 'cronline_test'
|
|
26
28
|
require 'ft_0'
|
27
29
|
require 'ft_0b_sequence'
|
28
30
|
require 'ft_0c_testname'
|
31
|
+
require 'ft_0d_participant'
|
29
32
|
require 'ft_1_unset'
|
30
33
|
require 'ft_2_concurrence'
|
31
34
|
require 'ft_3_equals'
|
@@ -43,6 +46,10 @@ require 'ft_15_iterator'
|
|
43
46
|
require 'ft_16_fqv'
|
44
47
|
require 'ft_17_condition'
|
45
48
|
require 'ft_18_pname'
|
49
|
+
require 'ft_19_csv'
|
50
|
+
require 'ft_22_history'
|
51
|
+
require 'ft_23_when'
|
52
|
+
require 'ft_24_def'
|
46
53
|
|
47
54
|
require 'hparticipant_test'
|
48
55
|
require 'timeout_test'
|
data/test/rake_test.rb
CHANGED
data/test/timeout_test.rb
CHANGED
@@ -5,8 +5,6 @@
|
|
5
5
|
#
|
6
6
|
# Sun Oct 29 15:41:44 JST 2006
|
7
7
|
#
|
8
|
-
# somewhere between Philippina and the Japan
|
9
|
-
#
|
10
8
|
|
11
9
|
require 'test/unit'
|
12
10
|
|
@@ -34,7 +32,7 @@ class TimeoutTest < Test::Unit::TestCase
|
|
34
32
|
process_definition :name => "to0", :revision => "0" do
|
35
33
|
sequence do
|
36
34
|
participant :ref => "albert", :timeout => "500"
|
37
|
-
_print "over"
|
35
|
+
_print "over ${f:done}"
|
38
36
|
end
|
39
37
|
end
|
40
38
|
end
|
@@ -58,6 +56,8 @@ class TimeoutTest < Test::Unit::TestCase
|
|
58
56
|
|
59
57
|
s = engine.application_context["__tracer"].to_s
|
60
58
|
|
59
|
+
engine.stop
|
60
|
+
|
61
61
|
#puts "trace is >#{s}<"
|
62
62
|
#puts "albert.size is #{albert.size}"
|
63
63
|
|
@@ -66,7 +66,49 @@ class TimeoutTest < Test::Unit::TestCase
|
|
66
66
|
"workitem was not removed from workitem store"
|
67
67
|
assert \
|
68
68
|
s == "over",
|
69
|
-
"flow did not
|
69
|
+
"flow did not reach 'over'"
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_timeout_1
|
73
|
+
|
74
|
+
albert = HashParticipant.new
|
75
|
+
|
76
|
+
engine = Engine.new
|
77
|
+
|
78
|
+
engine.application_context["__tracer"] = Tracer.new
|
79
|
+
|
80
|
+
engine.register_participant(:albert, albert)
|
81
|
+
|
82
|
+
pjc = engine.get_scheduler.pending_job_count
|
83
|
+
assert \
|
84
|
+
pjc == 0,
|
85
|
+
"0 pending_jobs_count is at #{pjc}, it should be at 0"
|
86
|
+
|
87
|
+
li = LaunchItem.new(TimeoutDefinition0)
|
88
|
+
|
89
|
+
engine.launch(li)
|
90
|
+
|
91
|
+
wi = albert.list_workitems(nil)[0]
|
92
|
+
wi.done = "ok"
|
93
|
+
albert.proceed(wi)
|
94
|
+
|
95
|
+
s = engine.application_context["__tracer"].to_s
|
96
|
+
|
97
|
+
#puts "trace is >#{s}<"
|
98
|
+
#puts "albert.size is #{albert.size}"
|
99
|
+
|
100
|
+
assert \
|
101
|
+
albert.size == 0,
|
102
|
+
"workitem was not removed from workitem store"
|
103
|
+
assert \
|
104
|
+
s == "over ok",
|
105
|
+
"flow did not reach 'over ok'"
|
106
|
+
|
107
|
+
pjc = engine.get_scheduler.pending_job_count
|
108
|
+
|
109
|
+
assert \
|
110
|
+
pjc == 0,
|
111
|
+
"1 pending_jobs_count is at #{pjc}, it should be at 0"
|
70
112
|
end
|
71
113
|
|
72
114
|
end
|
data/test/wi_test.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
|
8
|
+
require 'test/unit'
|
9
|
+
require 'openwfe/workitem'
|
10
|
+
require 'openwfe/util/dollar'
|
11
|
+
|
12
|
+
include OpenWFE
|
13
|
+
|
14
|
+
|
15
|
+
class WiTest < Test::Unit::TestCase
|
16
|
+
|
17
|
+
#def setup
|
18
|
+
#end
|
19
|
+
|
20
|
+
#def teardown
|
21
|
+
#end
|
22
|
+
|
23
|
+
def test_lookup_0
|
24
|
+
|
25
|
+
wi = InFlowWorkItem.new()
|
26
|
+
wi.attributes = {
|
27
|
+
"field0" => "value0",
|
28
|
+
"field1" => [ 0, 1, 2, 3, [ "a", "b", "c" ]],
|
29
|
+
"field2" => {
|
30
|
+
"a" => "AA",
|
31
|
+
"b" => "BB",
|
32
|
+
"c" => [ "C0", "C1", "C3" ]
|
33
|
+
},
|
34
|
+
"field3" => 3,
|
35
|
+
"field99" => nil
|
36
|
+
}
|
37
|
+
|
38
|
+
assert wi.lookup_attribute("field3") == 3
|
39
|
+
assert wi.lookup_attribute("field1.1") == 1
|
40
|
+
assert wi.lookup_attribute("field1.4.1") == "b"
|
41
|
+
assert wi.lookup_attribute("field2.c.1") == "C1"
|
42
|
+
assert wi.lookup_attribute("field4") == nil
|
43
|
+
assert wi.lookup_attribute("field4.2") == nil
|
44
|
+
assert wi.lookup_attribute("field99") == nil
|
45
|
+
assert wi.lookup_attribute("field99.9") == nil
|
46
|
+
|
47
|
+
assert wi.has_attribute?("field4") == false
|
48
|
+
assert wi.has_attribute?("field4.2") == false
|
49
|
+
assert wi.has_attribute?("field99") == true
|
50
|
+
assert wi.has_attribute?("field99.9") == false
|
51
|
+
|
52
|
+
text = "value is '${f:field2.c.1}'"
|
53
|
+
text = OpenWFE::dosub(text, nil, wi)
|
54
|
+
assert text == "value is 'C1'"
|
55
|
+
|
56
|
+
# setting attributes
|
57
|
+
|
58
|
+
wi.set_attribute("field2.a", 42)
|
59
|
+
wi.set_attribute("field99", "f99")
|
60
|
+
|
61
|
+
assert wi.lookup_attribute("field2.a") == 42
|
62
|
+
assert wi.lookup_attribute("field99") == "f99"
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
|
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-02-
|
6
|
+
version: 0.9.4
|
7
|
+
date: 2007-02-15 00:00:00 +09:00
|
8
8
|
summary: an open source ruby workflow and bpm engine
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- lib/openwfe
|
37
37
|
- lib/openwfe.rb
|
38
38
|
- lib/openwfe/contextual.rb
|
39
|
+
- lib/openwfe/def.rb
|
39
40
|
- lib/openwfe/engine
|
40
41
|
- lib/openwfe/expool
|
41
42
|
- lib/openwfe/expressions
|
@@ -47,14 +48,17 @@ files:
|
|
47
48
|
- lib/openwfe/rudefinitions.rb
|
48
49
|
- lib/openwfe/service.rb
|
49
50
|
- lib/openwfe/storage
|
51
|
+
- lib/openwfe/tools
|
50
52
|
- lib/openwfe/util
|
51
53
|
- lib/openwfe/utils.rb
|
54
|
+
- lib/openwfe/version.rb
|
52
55
|
- lib/openwfe/workitem.rb
|
53
56
|
- lib/openwfe/worklist
|
54
57
|
- lib/openwfe/engine/engine.rb
|
55
58
|
- lib/openwfe/engine/file_persisted_engine.rb
|
56
59
|
- lib/openwfe/expool/expressionpool.rb
|
57
60
|
- lib/openwfe/expool/expstorage.rb
|
61
|
+
- lib/openwfe/expool/history.rb
|
58
62
|
- lib/openwfe/expool/journalexpstorage.rb
|
59
63
|
- lib/openwfe/expool/yamlexpstorage.rb
|
60
64
|
- lib/openwfe/expressions/environment.rb
|
@@ -79,6 +83,7 @@ files:
|
|
79
83
|
- lib/openwfe/expressions/raw_xml.rb
|
80
84
|
- lib/openwfe/expressions/timeout.rb
|
81
85
|
- lib/openwfe/participants/atomparticipants.rb
|
86
|
+
- lib/openwfe/participants/csvparticipant.rb
|
82
87
|
- lib/openwfe/participants/enoparticipant.rb
|
83
88
|
- lib/openwfe/participants/participant.rb
|
84
89
|
- lib/openwfe/participants/participantmap.rb
|
@@ -91,8 +96,11 @@ files:
|
|
91
96
|
- lib/openwfe/rest/worklistclient.rb
|
92
97
|
- lib/openwfe/rest/xmlcodec.rb
|
93
98
|
- lib/openwfe/storage/yamlfilestorage.rb
|
99
|
+
- lib/openwfe/tools/flowtracer.rb
|
100
|
+
- lib/openwfe/util/csvtable.rb
|
94
101
|
- lib/openwfe/util/dollar.rb
|
95
102
|
- lib/openwfe/util/lru_cache.rb
|
103
|
+
- lib/openwfe/util/observable.rb
|
96
104
|
- lib/openwfe/util/otime.rb
|
97
105
|
- lib/openwfe/util/scheduler.rb
|
98
106
|
- lib/openwfe/util/schedulers.rb
|
@@ -101,6 +109,7 @@ files:
|
|
101
109
|
- test/atom_test.rb
|
102
110
|
- test/cron_test.rb
|
103
111
|
- test/cronline_test.rb
|
112
|
+
- test/csv_test.rb
|
104
113
|
- test/dollar_test.rb
|
105
114
|
- test/fei_test.rb
|
106
115
|
- test/file_persistence_test.rb
|
@@ -108,6 +117,7 @@ files:
|
|
108
117
|
- test/ft_0.rb
|
109
118
|
- test/ft_0b_sequence.rb
|
110
119
|
- test/ft_0c_testname.rb
|
120
|
+
- test/ft_0d_participant.rb
|
111
121
|
- test/ft_10_loop.rb
|
112
122
|
- test/ft_11_ppd.rb
|
113
123
|
- test/ft_12_blockparticipant.rb
|
@@ -118,7 +128,14 @@ files:
|
|
118
128
|
- test/ft_16_fqv.rb
|
119
129
|
- test/ft_17_condition.rb
|
120
130
|
- test/ft_18_pname.rb
|
131
|
+
- test/ft_19_csv.rb
|
121
132
|
- test/ft_1_unset.rb
|
133
|
+
- test/ft_20_cron.rb
|
134
|
+
- test/ft_21_cron.rb
|
135
|
+
- test/ft_22_history.rb
|
136
|
+
- test/ft_23_when.rb
|
137
|
+
- test/ft_23b_when.rb
|
138
|
+
- test/ft_24_def.rb
|
122
139
|
- test/ft_2_concurrence.rb
|
123
140
|
- test/ft_3_equals.rb
|
124
141
|
- test/ft_4_misc.rb
|
@@ -130,7 +147,6 @@ files:
|
|
130
147
|
- test/hparticipant_test.rb
|
131
148
|
- test/journal_persistence_test.rb
|
132
149
|
- test/misc_test.rb
|
133
|
-
- test/rake_ptest.rb
|
134
150
|
- test/rake_qtest.rb
|
135
151
|
- test/rake_test.rb
|
136
152
|
- test/raw_prog_test.rb
|
@@ -142,6 +158,8 @@ files:
|
|
142
158
|
- test/scheduler_test.rb
|
143
159
|
- test/time_test.rb
|
144
160
|
- test/timeout_test.rb
|
161
|
+
- test/wi_test.rb
|
162
|
+
- examples/flowtracing.rb
|
145
163
|
- examples/homeworkreview.rb
|
146
164
|
- examples/mano_tracker.rb
|
147
165
|
- examples/quotereporter.rb
|