Sha256: 88eccd069f9f30a4eea569e0a83b3483b2c6a3d957f66091a73c14f21170aa75

Contents?: true

Size: 1.18 KB

Versions: 3

Compression:

Stored size: 1.18 KB

Contents

#
# Testing OpenWFE
#
# Original bug report by Maarten Oelering
# John Mettraux at openwfe.org
#
# Thu Sep 13 17:46:20 JST 2007
#

require 'flowtestbase'


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

    #def teardown
    #end

    #def setup
    #end

    #
    # TEST 0

    def test_0

        engine.register_participant("part1") do |workitem|
            @tracer << "part1\n"
            # the last expression of the block evaluates to the workitem
            # remove this line or replace it with nil and it works again
            workitem
        end
        
        engine.register_participant("part3") do |workitem|
            @tracer << "part3\n"
        end
        
        engine.register_participant("part4") do |workitem|
            @tracer << "part4\n"
        end

        process = <<THE_END
<process-definition name="test" revision="0.1">
    <sequence>
        <part1/>
        <concurrence>
            <part3/>
            <part4/>
        </concurrence>
    </sequence>
</process-definition>
THE_END
        
        #log_level_to_debug

        dotest(
            process.strip,
            [ "part1\npart3\npart4", "part1\npart4\npart3" ])
    end

end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
openwferu-0.9.16 test/ft_74_block_and_workitem_dup.rb
openwferu-0.9.17 test/ft_74_block_and_workitem_dup.rb
ruote-0.9.18 test/ft_74_block_and_workitem_dup.rb