test/ft_82_trecu.rb in ruote-0.9.18 vs test/ft_82_trecu.rb in ruote-0.9.19

- old
+ new

@@ -9,38 +9,44 @@ require 'flowtestbase' class FlowTest82 < Test::Unit::TestCase - include FlowTestBase + include FlowTestBase - #def setup - #end + #def setup + #end - #def teardown - #end + #def teardown + #end - # - # Test 0 - # + # + # Test 0 + # - class Test0 < OpenWFE::ProcessDefinition - sequence do - #_print "${r:fei.wfname}" - _print do - reval "$i += 1" - end - subprocess :ref => "Test", :unless => "${r:$i} == 3" - end + class Test0 < OpenWFE::ProcessDefinition + sequence do + participant :ref => "toto" + subprocess :ref => "Test", :unless => "${f:count} == 3" end + end - def test_0 + def test_0 - log_level_to_debug + #log_level_to_debug - $i = 0 + @engine.register_participant :toto do |workitem| - dotest Test0, "1\n2\n3" + if workitem.attributes['count'] != nil + workitem.count = workitem.count + 1 + else + workitem.count = 0 + end + + @tracer << workitem.count.to_s end + + dotest Test0, "0123" + end end