lib/openwfe/participants/participants.rb in openwferu-0.9.7 vs lib/openwfe/participants/participants.rb in openwferu-0.9.8

- old
+ new

@@ -169,18 +169,23 @@ unless @block end def consume (workitem) - if @block.arity == 1 + result = if @block.arity == 1 @block.call workitem elsif @block.arity > 1 @block.call get_flow_expression(workitem), workitem else @block.call end + if result + ldebug { "consume() result is of class #{result.class.name}" } + workitem.set_result(result) + end + reply_to_engine(workitem) \ if workitem.kind_of? InFlowWorkItem # else it's a cancel item end end @@ -197,9 +202,10 @@ tracer = @application_context['__tracer'] if tracer tracer << workitem.participant_name + tracer << "\n" else puts workitem.participant_name end reply_to_engine(workitem)