test/flowtestbase.rb in openwferu-0.9.6 vs test/flowtestbase.rb in openwferu-0.9.7

- old
+ new

@@ -45,12 +45,20 @@ def setup @engine = $WORKFLOW_ENGINE_CLASS.new() + @engine.application_context[:ruby_eval_allowed] = true + @tracer = Tracer.new @engine.application_context["__tracer"] = @tracer + + @engine.register_participant('pp-workitem') do |workitem| + puts + require 'pp'; pp workitem + puts + end end def teardown @engine.stop @@ -60,10 +68,18 @@ # assert true #end protected + def print_exp_list (l) + puts + l.each do |fexp| + puts " - #{fexp.fei.to_debug_s}" + end + puts + end + def name_of_test s = caller(1)[0] i = s.index('`') #s = s[i+1..s.length-2] s = s[i+6..s.length-2] @@ -106,11 +122,11 @@ flowDef else OpenWFE::LaunchItem.new(flowDef) end - @engine.launch(li) + fei = @engine.launch(li) sleep(sleepTime) trace = @tracer.to_s @@ -162,9 +178,11 @@ assert \ exp_storage.length == 1, "there are expressions remaining in the expression pool " + "(#{exp_storage.length})" + + return fei end end