Sha256: 62c83d06dba30bfd45c161dad4033bdd880641348fb056aaa329d220c80398ce

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Tue Jan  2 13:14:37 JST 2007
#

require 'flowtestbase'
require 'openwfe/expressions/raw_prog'


class FlowTest10b < Test::Unit::TestCase
    include FlowTestBase

    #def setup
    #end

    #def teardown
    #end

    #
    # Test 0
    #

    class TestDefinition0 < ProcessDefinition
        def make
            process_definition :name => "10b_loop", :revision => "0" do
                _loop do
                    my_participant
                    _print "${f:last_digit}"
                end
            end
        end
    end

    def test_loop_0

        @engine.register_participant("my_participant") do |workitem|

            wfid = workitem.fei.workflow_instance_id
            last_digit = wfid[-1, 1]

            #puts "wfid :       #{wfid}"
            #puts "last_digit : #{last_digit}"

            workitem.last_digit = last_digit

            workitem.__cursor_command__ = "break" if last_digit > "4"
        end

        dotest(
            TestDefinition0,
            """0
1
2
3
4""")
    end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
openwferu-0.9.5 test/ft_10b_loop2.rb
openwferu-0.9.6 test/ft_10b_loop2.rb
openwferu-0.9.7 test/ft_10b_loop2.rb
openwferu-0.9.8 test/ft_10b_loop2.rb
openwferu-0.9.9 test/ft_10b_loop2.rb