Sha256: 88c8f9be380b2f5813b0de22c7d847e6c3e310fe3b96266c37b10ed8d8b189b2

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

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

require 'flowtestbase'
require 'openwfe/def'


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..4).to_a.join("\n")
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openwferu-0.9.17 test/ft_10b_loop.rb