openwferu 0.9.16 → 0.9.17
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/about_state.rb +81 -0
- data/examples/engine_template.rb +7 -0
- data/lib/openwfe/contextual.rb +2 -2
- data/lib/openwfe/def.rb +2 -3
- data/lib/openwfe/{util/schedulers.rb → engine.rb} +3 -39
- data/lib/openwfe/engine/engine.rb +202 -251
- data/lib/openwfe/engine/process_status.rb +359 -0
- data/lib/openwfe/expool/errorjournal.rb +6 -6
- data/lib/openwfe/expool/expressionpool.rb +161 -239
- data/lib/openwfe/expool/expstorage.rb +185 -55
- data/lib/openwfe/expool/journal.rb +1 -2
- data/lib/openwfe/expool/parser.rb +233 -0
- data/lib/openwfe/expool/threadedexpstorage.rb +6 -18
- data/lib/openwfe/expool/wfidgen.rb +25 -7
- data/lib/openwfe/expool/yamlexpstorage.rb +60 -37
- data/lib/openwfe/expressions/condition.rb +49 -12
- data/lib/openwfe/expressions/environment.rb +45 -15
- data/lib/openwfe/expressions/expressionmap.rb +39 -19
- data/lib/openwfe/expressions/fe_concurrence.rb +24 -13
- data/lib/openwfe/expressions/fe_cron.rb +19 -18
- data/lib/openwfe/expressions/fe_cursor.rb +69 -28
- data/lib/openwfe/expressions/fe_define.rb +4 -1
- data/lib/openwfe/expressions/fe_do.rb +1 -3
- data/lib/openwfe/expressions/fe_equals.rb +131 -20
- data/lib/openwfe/expressions/fe_fqv.rb +27 -3
- data/lib/openwfe/expressions/fe_iterator.rb +14 -7
- data/lib/openwfe/expressions/fe_listen.rb +7 -2
- data/lib/openwfe/expressions/fe_misc.rb +187 -20
- data/lib/openwfe/expressions/fe_participant.rb +8 -7
- data/lib/openwfe/expressions/fe_reserve.rb +105 -33
- data/lib/openwfe/expressions/fe_save.rb +55 -5
- data/lib/openwfe/expressions/{fe_value.rb → fe_set.rb} +6 -82
- data/lib/openwfe/expressions/fe_sleep.rb +25 -15
- data/lib/openwfe/expressions/fe_subprocess.rb +2 -2
- data/lib/openwfe/expressions/fe_wait.rb +3 -2
- data/lib/openwfe/expressions/fe_when.rb +7 -15
- data/lib/openwfe/expressions/flowexpression.rb +90 -49
- data/lib/openwfe/expressions/merge.rb +7 -1
- data/lib/openwfe/expressions/raw.rb +261 -63
- data/lib/openwfe/expressions/{raw_prog.rb → rprocdef.rb} +94 -179
- data/lib/openwfe/expressions/time.rb +36 -12
- data/lib/openwfe/expressions/timeout.rb +9 -7
- data/lib/openwfe/expressions/value.rb +126 -0
- data/lib/openwfe/flowexpressionid.rb +52 -22
- data/lib/openwfe/listeners/listeners.rb +3 -3
- data/lib/openwfe/listeners/socketlisteners.rb +8 -5
- data/lib/openwfe/logging.rb +6 -3
- data/lib/openwfe/omixins.rb +8 -6
- data/lib/openwfe/orest/xmlcodec.rb +16 -12
- data/lib/openwfe/participants.rb +38 -0
- data/lib/openwfe/participants/participant.rb +1 -1
- data/lib/openwfe/participants/participantmap.rb +24 -10
- data/lib/openwfe/participants/participants.rb +4 -3
- data/lib/openwfe/participants/soapparticipants.rb +1 -1
- data/lib/openwfe/participants/socketparticipants.rb +1 -1
- data/lib/openwfe/rudefinitions.rb +7 -5
- data/lib/openwfe/storage/yamlcustom.rb +10 -10
- data/lib/openwfe/storage/yamlfilestorage.rb +12 -12
- data/lib/openwfe/tools/flowtracer.rb +6 -5
- data/lib/openwfe/util/dollar.rb +42 -85
- data/lib/openwfe/util/ometa.rb +1 -3
- data/lib/openwfe/util/workqueue.rb +1 -1
- data/lib/openwfe/utils.rb +33 -11
- data/lib/openwfe/version.rb +2 -2
- data/lib/openwfe/workitem.rb +76 -14
- data/lib/openwfe/worklist/storelocks.rb +9 -4
- data/lib/openwfe/worklist/storeparticipant.rb +1 -1
- data/test/back_0916_test.rb +101 -0
- data/test/bm/ft_26_load.rb +1 -1
- data/test/bm/ft_26b_load.rb +1 -1
- data/test/bm/ft_26c_load.rb +3 -2
- data/test/bm/ft_26d_load.rb +97 -0
- data/test/bm/ft_recu.rb +71 -0
- data/test/concurrence_test.rb +1 -1
- data/test/condition_test.rb +152 -0
- data/test/description_test.rb +12 -7
- data/test/eno_test.rb +1 -1
- data/test/expool_20031219_0916.tgz +0 -0
- data/test/fe_lookup_att_test.rb +1 -1
- data/test/fei_test.rb +16 -0
- data/test/file_persistence_test.rb +8 -12
- data/test/filep_cancel_test.rb +116 -0
- data/test/flowtestbase.rb +47 -25
- data/test/ft_0.rb +1 -1
- data/test/ft_10_loop.rb +29 -14
- data/test/{ft_10b_loop2.rb → ft_10b_loop.rb} +2 -11
- data/test/ft_11_ppd.rb +6 -17
- data/test/ft_11b_ppd.rb +1 -4
- data/test/ft_12_blockparticipant.rb +1 -1
- data/test/ft_13_eno.rb +1 -1
- data/test/ft_15_iterator.rb +1 -1
- data/test/ft_15b_iterator.rb +1 -1
- data/test/ft_17_condition.rb +6 -6
- data/test/ft_18_pname.rb +1 -1
- data/test/ft_20_cron.rb +1 -1
- data/test/ft_21_cron.rb +6 -4
- data/test/ft_22_history.rb +1 -1
- data/test/ft_23_when.rb +1 -1
- data/test/ft_23b_when.rb +18 -6
- data/test/ft_23c_wait.rb +8 -6
- data/test/ft_25_cancel.rb +7 -5
- data/test/ft_27_getflowpos.rb +22 -17
- data/test/ft_28_fileparticipant.rb +1 -2
- data/test/ft_2_concurrence.rb +1 -1
- data/test/ft_2b_concurrence.rb +25 -20
- data/test/ft_30_socketlistener.rb +0 -3
- data/test/ft_34_cancelwfid.rb +9 -9
- data/test/ft_35_localdefs.rb +0 -1
- data/test/ft_36_subprocids.rb +6 -6
- data/test/ft_38_tag.rb +3 -2
- data/test/ft_38b_tag.rb +229 -0
- data/test/ft_39_reserve.rb +3 -18
- data/test/ft_39b_reserve.rb +34 -5
- data/test/ft_3b_lookup_vf.rb +83 -0
- data/test/ft_40_defined.rb +2 -11
- data/test/ft_42_environments.rb +4 -6
- data/test/ft_44b_restore.rb +88 -22
- data/test/ft_45_citerator.rb +57 -11
- data/test/ft_49_condition.rb +4 -2
- data/test/ft_4_misc.rb +24 -3
- data/test/ft_50_xml_attribute.rb +17 -20
- data/test/ft_54_listen.rb +1 -1
- data/test/ft_54b_listen.rb +2 -2
- data/test/ft_56_timeout.rb +8 -1
- data/test/ft_57_a.rb +10 -10
- data/test/ft_59_ps.rb +49 -16
- data/test/ft_60_ecancel.rb +52 -10
- data/test/ft_63_pause.rb +8 -8
- data/test/ft_65_stringlaunch.rb +4 -6
- data/test/ft_67_schedlaunch.rb +4 -4
- data/test/ft_69_cancelmissing.rb +4 -2
- data/test/ft_70_lookupvar.rb +2 -2
- data/test/ft_72_lookup_processes.rb +2 -2
- data/test/ft_73_cancel_sub.rb +8 -8
- data/test/ft_77_segments.rb +38 -0
- data/test/ft_78_eval.rb +154 -0
- data/test/ft_79_tticket.rb +185 -0
- data/test/ft_80_spname.rb +95 -0
- data/test/ft_81_exp.rb +64 -0
- data/test/ft_82_trecu.rb +48 -0
- data/test/ft_83_badpause.rb +62 -0
- data/test/ft_84_updateexp.rb +125 -0
- data/test/ft_9b_cursor.rb +105 -0
- data/test/ft_tests.rb +14 -1
- data/test/hash_test.rb +7 -7
- data/test/hparticipant_test.rb +4 -4
- data/test/lookup_vf_test.rb +94 -0
- data/test/misc_test.rb +5 -3
- data/test/orest_test.rb +4 -3
- data/test/param_test.rb +12 -16
- data/test/participant_test.rb +36 -0
- data/test/pending.rb +10 -10
- data/test/rake_ltest.rb +1 -10
- data/test/rake_qtest.rb +7 -6
- data/test/raw_prog_test.rb +89 -121
- data/test/restart_cron_test.rb +84 -36
- data/test/restart_paused_test.rb +100 -0
- data/test/restart_sleep_test.rb +1 -1
- data/test/restart_tests.rb +1 -0
- data/test/restart_when_test.rb +33 -22
- data/test/ruby_procdef_test.rb +19 -18
- data/test/sec_test.rb +74 -35
- data/test/storage_test.rb +44 -0
- data/test/test.rb +3 -0
- data/test/timeout_test.rb +7 -18
- data/test/wfid_test.rb +2 -1
- data/test/wi_test.rb +29 -18
- metadata +121 -57
- data/lib/openwfe/expressions/raw_xml.rb +0 -176
- data/lib/openwfe/expressions/simplerep.rb +0 -266
- data/lib/openwfe/util/kotoba.rb +0 -236
- data/lib/openwfe/util/lru.rb +0 -171
- data/lib/openwfe/util/otime.rb +0 -246
- data/lib/openwfe/util/safe.rb +0 -160
- data/lib/openwfe/util/scheduler.rb +0 -1158
- data/test/cron_test.rb +0 -113
- data/test/cronline_test.rb +0 -60
- data/test/dollar_test.rb +0 -90
- data/test/kotoba_test.rb +0 -72
- data/test/lru_test.rb +0 -79
- data/test/safely_test.rb +0 -84
- data/test/scheduler_1_test.rb +0 -88
- data/test/scheduler_test.rb +0 -363
- data/test/time_test.rb +0 -84
data/test/bm/ft_26_load.rb
CHANGED
data/test/bm/ft_26b_load.rb
CHANGED
data/test/bm/ft_26c_load.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#require 'profile'
|
11
11
|
|
12
12
|
require 'flowtestbase'
|
13
|
-
require 'openwfe/
|
13
|
+
require 'openwfe/def'
|
14
14
|
|
15
15
|
include OpenWFE
|
16
16
|
|
@@ -28,7 +28,8 @@ class FlowTest26c < Test::Unit::TestCase
|
|
28
28
|
# Test 0
|
29
29
|
#
|
30
30
|
|
31
|
-
N = 10_000
|
31
|
+
#N = 10_000
|
32
|
+
N = 1000
|
32
33
|
|
33
34
|
class TestDefinition0 < ProcessDefinition
|
34
35
|
sequence do
|
@@ -0,0 +1,97 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing OpenWFE
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Mon Dec 24 22:02:12 JST 2007
|
8
|
+
#
|
9
|
+
|
10
|
+
#require 'profile'
|
11
|
+
|
12
|
+
require 'flowtestbase'
|
13
|
+
require 'openwfe/def'
|
14
|
+
|
15
|
+
include OpenWFE
|
16
|
+
|
17
|
+
|
18
|
+
class FlowTest26d < Test::Unit::TestCase
|
19
|
+
include FlowTestBase
|
20
|
+
|
21
|
+
#def setup
|
22
|
+
#end
|
23
|
+
|
24
|
+
#def teardown
|
25
|
+
#end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Test 0
|
29
|
+
#
|
30
|
+
|
31
|
+
#N = 10_000
|
32
|
+
N = 1_000
|
33
|
+
|
34
|
+
class TestDefinition0 < ProcessDefinition
|
35
|
+
concurrence do
|
36
|
+
N.times do
|
37
|
+
count
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_load_0
|
43
|
+
|
44
|
+
#log_level_to_debug
|
45
|
+
|
46
|
+
#@engine.get_scheduler.sstop
|
47
|
+
#
|
48
|
+
# JRuby is no friend of the Scheduler ( was :) )
|
49
|
+
|
50
|
+
$count = 0
|
51
|
+
|
52
|
+
@engine.register_participant("count") do |workitem|
|
53
|
+
$count += 1
|
54
|
+
print "."
|
55
|
+
end
|
56
|
+
|
57
|
+
fei = @engine.launch(LaunchItem.new(TestDefinition0))
|
58
|
+
puts "launched #{fei}"
|
59
|
+
|
60
|
+
#log_level_to_debug
|
61
|
+
|
62
|
+
@engine.wait_for fei
|
63
|
+
|
64
|
+
assert_equal N, $count
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# Thu Sep 13 15:41:20 JST 2007
|
69
|
+
#
|
70
|
+
# ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.3]
|
71
|
+
#
|
72
|
+
# 10_000 in 27.69s
|
73
|
+
#
|
74
|
+
# before optimization : 10k in 138.341
|
75
|
+
#
|
76
|
+
#
|
77
|
+
# ruby 1.8.5 (2007-09-13 rev 3876) [i386-jruby1.1]
|
78
|
+
#
|
79
|
+
# 10_000 in 53.96s
|
80
|
+
#
|
81
|
+
# ruby 1.8.5 (2007-09-13 rev 3876) [i386-jruby1.1]
|
82
|
+
# -O -J-server
|
83
|
+
#
|
84
|
+
# 10_000 in 42.616s
|
85
|
+
|
86
|
+
#
|
87
|
+
# Thu Nov 8 21:36:02 JST 2007
|
88
|
+
#
|
89
|
+
# ruby 1.8.6 (2007-06-07 patchlevel 36) [universal-darwin9.0]
|
90
|
+
#
|
91
|
+
# 10_000 in 39.089
|
92
|
+
#
|
93
|
+
# ?
|
94
|
+
#
|
95
|
+
|
96
|
+
end
|
97
|
+
|
data/test/bm/ft_recu.rb
ADDED
@@ -0,0 +1,71 @@
|
|
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
|
+
|
15
|
+
class FlowTestRecursion < Test::Unit::TestCase
|
16
|
+
include FlowTestBase
|
17
|
+
|
18
|
+
#def teardown
|
19
|
+
#end
|
20
|
+
|
21
|
+
#def setup
|
22
|
+
#end
|
23
|
+
|
24
|
+
#
|
25
|
+
# test 0
|
26
|
+
#
|
27
|
+
|
28
|
+
class Test0 < OpenWFE::ProcessDefinition
|
29
|
+
sequence do
|
30
|
+
#print_i
|
31
|
+
#subprocess :ref => "Test"
|
32
|
+
subprocess :ref => "Testy"
|
33
|
+
end
|
34
|
+
process_definition :name => "Testy" do
|
35
|
+
sequence do
|
36
|
+
print_i
|
37
|
+
subprocess :ref => "Testy"
|
38
|
+
end
|
39
|
+
#_loop do
|
40
|
+
# print_i
|
41
|
+
#end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_0
|
46
|
+
|
47
|
+
i = 0
|
48
|
+
last = Time.now.to_f
|
49
|
+
|
50
|
+
@engine.register_participant :print_i do
|
51
|
+
now = Time.now.to_f
|
52
|
+
print "#{i}"
|
53
|
+
if i % 10 == 0
|
54
|
+
print "("
|
55
|
+
print "#{now-last}"
|
56
|
+
print " #{@engine.get_expression_storage.size}"
|
57
|
+
print ")"
|
58
|
+
end
|
59
|
+
print " "
|
60
|
+
last = now
|
61
|
+
i += 1
|
62
|
+
end
|
63
|
+
|
64
|
+
#dotest TestTag0, "blah"
|
65
|
+
@engine.launch Test0
|
66
|
+
|
67
|
+
sleep 360
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
data/test/concurrence_test.rb
CHANGED
@@ -13,7 +13,7 @@ require 'test/unit'
|
|
13
13
|
#require 'openwfe/workitem'
|
14
14
|
#require 'openwfe/flowexpressionid'
|
15
15
|
require 'openwfe/engine/engine'
|
16
|
-
require 'openwfe/
|
16
|
+
require 'openwfe/def'
|
17
17
|
require 'openwfe/worklist/storeparticipant'
|
18
18
|
|
19
19
|
include OpenWFE
|
@@ -0,0 +1,152 @@
|
|
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/workitem'
|
13
|
+
require 'openwfe/expressions/condition'
|
14
|
+
|
15
|
+
#
|
16
|
+
# testing expression conditions
|
17
|
+
#
|
18
|
+
|
19
|
+
class ConditionTest < Test::Unit::TestCase
|
20
|
+
include OpenWFE::ConditionMixin
|
21
|
+
|
22
|
+
def setup
|
23
|
+
@debug = false
|
24
|
+
end
|
25
|
+
|
26
|
+
#def teardown
|
27
|
+
#end
|
28
|
+
|
29
|
+
def test_0
|
30
|
+
|
31
|
+
#@debug = true
|
32
|
+
|
33
|
+
assert_t "true"
|
34
|
+
assert_F "false"
|
35
|
+
|
36
|
+
assert_t "1 == 1"
|
37
|
+
|
38
|
+
assert_t "'a' == 'a'"
|
39
|
+
assert_t '"a" == "a"'
|
40
|
+
|
41
|
+
assert_t "a == a"
|
42
|
+
assert_F "'a' == a"
|
43
|
+
|
44
|
+
#assert_t "!= ''"
|
45
|
+
|
46
|
+
assert_F " == 1 "
|
47
|
+
assert_F " == 1"
|
48
|
+
assert_F "== 1"
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_0b
|
52
|
+
|
53
|
+
#@debug = true
|
54
|
+
|
55
|
+
assert_t "a"
|
56
|
+
assert_F ""
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_1
|
60
|
+
|
61
|
+
#@debug = true
|
62
|
+
|
63
|
+
assert_set_t "1 is set"
|
64
|
+
assert_set_t "1 set"
|
65
|
+
assert_set_F "1 is not set"
|
66
|
+
assert_set_F "1 not set"
|
67
|
+
|
68
|
+
assert_set_t " is not set"
|
69
|
+
assert_set_t " not set"
|
70
|
+
assert_set_F " is set"
|
71
|
+
assert_set_F " set"
|
72
|
+
|
73
|
+
assert_t "1 is set"
|
74
|
+
assert_t "1 set"
|
75
|
+
assert_F "1 is not set"
|
76
|
+
assert_F "1 not set"
|
77
|
+
|
78
|
+
assert_t " is not set"
|
79
|
+
assert_t " not set"
|
80
|
+
assert_F " is set"
|
81
|
+
assert_F " set"
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_2
|
85
|
+
|
86
|
+
#@debug = true
|
87
|
+
|
88
|
+
$my_owferu_var = nil
|
89
|
+
|
90
|
+
#assert_F "f = File.open('toto', 'w'); f.puts('nada'); f.close"
|
91
|
+
assert_t "$my_owferu_var = 3; $my_owferu_var = 4"
|
92
|
+
assert_equal nil, $my_owferu_var
|
93
|
+
|
94
|
+
#assert_F "fe.reply('a')"
|
95
|
+
assert_t "fe.reply('a')"
|
96
|
+
end
|
97
|
+
|
98
|
+
protected
|
99
|
+
|
100
|
+
#
|
101
|
+
# just for test_2
|
102
|
+
#
|
103
|
+
def reply (m)
|
104
|
+
@fei = nil
|
105
|
+
end
|
106
|
+
|
107
|
+
def assert_t (s, inv=false)
|
108
|
+
|
109
|
+
r = eval_condition(s, nil)
|
110
|
+
|
111
|
+
#puts "raw r is _#{r}_" if @debug
|
112
|
+
|
113
|
+
r = (not r) if inv
|
114
|
+
|
115
|
+
assert r, ">#{s}< should have evaluated to _#{not inv}_"
|
116
|
+
end
|
117
|
+
|
118
|
+
def assert_F (s)
|
119
|
+
|
120
|
+
assert_t s, true
|
121
|
+
end
|
122
|
+
|
123
|
+
def assert_set_t (s, inv=false)
|
124
|
+
|
125
|
+
r = eval_set s
|
126
|
+
r = (not r) if inv
|
127
|
+
|
128
|
+
assert r, ">#{s}< should have evaluated to _#{not inv}_"
|
129
|
+
end
|
130
|
+
|
131
|
+
def assert_set_F (s)
|
132
|
+
|
133
|
+
assert_set_t s, true
|
134
|
+
end
|
135
|
+
|
136
|
+
#def evalc (s)
|
137
|
+
# eval_condition(s, nil)
|
138
|
+
#end
|
139
|
+
|
140
|
+
def lookup_attribute (attname, workitem)
|
141
|
+
|
142
|
+
attname
|
143
|
+
end
|
144
|
+
|
145
|
+
def ldebug (&block)
|
146
|
+
|
147
|
+
# don't do a thing
|
148
|
+
return unless @debug
|
149
|
+
|
150
|
+
puts " " + block.call
|
151
|
+
end
|
152
|
+
end
|
data/test/description_test.rb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
require 'test/unit'
|
11
11
|
|
12
|
-
require 'openwfe/
|
12
|
+
require 'openwfe/expool/parser'
|
13
13
|
|
14
14
|
#
|
15
15
|
# testing definition.get_description
|
@@ -33,25 +33,30 @@ end
|
|
33
33
|
|
34
34
|
def test_0
|
35
35
|
|
36
|
-
rep = OpenWFE::SimpleExpRepresentation.from_code DEF0
|
36
|
+
#rep = OpenWFE::SimpleExpRepresentation.from_code DEF0
|
37
|
+
rep = OpenWFE::DefParser.parse_string DEF0
|
37
38
|
|
38
|
-
assert_equal
|
39
|
+
assert_equal(
|
40
|
+
"not much to say",
|
41
|
+
OpenWFE::ExpressionTree.get_description(rep))
|
39
42
|
end
|
40
43
|
|
41
|
-
DEF1 =
|
44
|
+
DEF1 = <<-EOS
|
42
45
|
<process-definition name="x" revision="y">
|
43
46
|
<description>
|
44
47
|
just a tiny process
|
45
48
|
</description>
|
46
49
|
<participant ref="nada" />
|
47
50
|
</process-definition>
|
48
|
-
|
51
|
+
EOS
|
49
52
|
|
50
53
|
def test_1
|
51
54
|
|
52
|
-
rep = OpenWFE::
|
55
|
+
rep = OpenWFE::DefParser.parse_string DEF1
|
53
56
|
|
54
|
-
assert_equal
|
57
|
+
assert_equal(
|
58
|
+
"just a tiny process",
|
59
|
+
OpenWFE::ExpressionTree.get_description(rep))
|
55
60
|
end
|
56
61
|
end
|
57
62
|
|
data/test/eno_test.rb
CHANGED
@@ -11,7 +11,7 @@ require 'test/unit'
|
|
11
11
|
|
12
12
|
require 'openwfe/workitem'
|
13
13
|
require 'openwfe/engine/engine'
|
14
|
-
require 'openwfe/
|
14
|
+
require 'openwfe/def'
|
15
15
|
require 'openwfe/participants/participants'
|
16
16
|
require 'openwfe/participants/enoparticipants'
|
17
17
|
#require 'flowtestbase'
|
Binary file
|
data/test/fe_lookup_att_test.rb
CHANGED
@@ -27,7 +27,7 @@ class FeLookupAttTest < Test::Unit::TestCase
|
|
27
27
|
"a" => true,
|
28
28
|
"b" => false,
|
29
29
|
}
|
30
|
-
fe = FlowExpression.
|
30
|
+
fe = FlowExpression.new_exp nil, nil, nil, nil, attributes
|
31
31
|
|
32
32
|
assert_equal true, fe.lookup_boolean_attribute("a", nil)
|
33
33
|
assert_equal true, fe.lookup_boolean_attribute(:a, nil)
|
data/test/fei_test.rb
CHANGED
@@ -151,6 +151,22 @@ class FeiTest < Test::Unit::TestCase
|
|
151
151
|
assert_equal s1, fei1.to_s
|
152
152
|
end
|
153
153
|
|
154
|
+
def test_web_s
|
155
|
+
|
156
|
+
s1 = "(fei 0.9.16 eng http://test/test.xml test 1.0 123456 do-test 0.0)"
|
157
|
+
fei1 = OpenWFE::FlowExpressionId.from_s s1
|
158
|
+
|
159
|
+
assert_equal(
|
160
|
+
[ "123456", "0.0" ],
|
161
|
+
OpenWFE::FlowExpressionId.split_web_s(fei1.to_web_s))
|
162
|
+
end
|
163
|
+
|
164
|
+
def test_from_h
|
165
|
+
|
166
|
+
fei = new_fei()
|
167
|
+
assert_equal fei, OpenWFE::FlowExpressionId.from_h(fei.to_h)
|
168
|
+
end
|
169
|
+
|
154
170
|
protected
|
155
171
|
|
156
172
|
def puts_hash (h)
|