lib/openwfe/participants/participants.rb in openwferu-0.9.8 vs lib/openwfe/participants/participants.rb in openwferu-0.9.9
- old
+ new
@@ -154,10 +154,16 @@
# end
#
# Having the FlowExpression instance at hand allows for advanced tricks,
# beware...
#
+ # It's also OK to register a block participant without params :
+ #
+ # engine.register_participant :alice do
+ # puts "Alice received a workitem"
+ # end
+ #
class BlockParticipant
include LocalParticipant
def initialize (block0=nil, &block1)
@block = if block1
@@ -178,10 +184,10 @@
else
@block.call
end
if result
- ldebug { "consume() result is of class #{result.class.name}" }
+ #ldebug { "consume() result is of class #{result.class.name}" }
workitem.set_result(result)
end
reply_to_engine(workitem) \
if workitem.kind_of? InFlowWorkItem