It was not hard to reproduce the problem in a small test program. The
following program crashes with a stack level too deep exception:

W, [2007-10-31T10:45:49.220609 #383]  WARN -- :
OpenWFE::ConcurrenceExpression - apply() caught exception in
concurrent child  (fei test 0.1 20071031-gupushitsupe 0.0.1.0 part3)
exception : stack level too deep
/usr/local/lib/ruby/gems/1.8/gems/openwferu-0.9.16/lib/openwfe/
utils.rb:143:in `fulldup'

If you enable the part2 participant, the program aborts instead of
hangs. Then the log does not show much, but if you remove the workitem
expression from part1, it all works as normal.

Since I couldn't attach or upload files, I included the program below.

I think the problem is the workitem.set_result of the participant
(storing a workitem in a workitem) in combination with the recursion
in to_s and dup of the workitem. Maybe you should just exclude a
workitem as a possible result and check this in workitem.set_result.

Maarten


require 'rubygems'
require 'openwfe/def'
require 'openwfe/workitem'
require 'openwfe/engine/engine'
require 'openwfe/listeners/listeners'

engine = OpenWFE::Engine.new()

engine.register_participant("part1") do |workitem|
    puts "one last message..."
    # 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("part2") do |workitem|
    puts workitem.to_s
end

engine.register_participant("part3") do |workitem|
    puts "one way"
end

engine.register_participant("part4") do |workitem|
    puts "or the other"
end

process = <<THE_END
<process-definition name="test" revision="0.1">
    <sequence>
            <part1/>
            <!-- enable part2, and the process will abort instead of hang -->
            <!-- part2/ -->
            <concurrence>
                <part3/>
                <part4/>
            </concurrence>
        </sequence>
</process-definition>
THE_END

li = OpenWFE::LaunchItem.new(process.strip)

fei = engine.launch(li)
engine.wait_for(fei)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to