Module | OpenWFE::Participant |
In: |
lib/openwfe/participants/participant.rb
|
The ‘participant’ concept is displayed as a module, so that other pieces of code may easily ‘mix it in’.
Participant extensions should at least provide a consume(workitem) method. As an option, it can provide a cancel(cancelitem) method.
The engine will transmit instances of OpenWFE:WorkItem via the consume method.
If there is a cancel method available and an OpenWFE::CancelItem instance is emitted (cancelling a process or part of it), it will be fed to the participant only via the cancel method.
If there is no cancel method, the participant will not get notified of the cancellation.
A Participant will be receiving OpenWFE::WorkItem‘s via this method.
# File lib/openwfe/participants/participant.rb, line 70 70: def consume (workitem) 71: 72: raise NotImplementedError.new( 73: "implementation for method consume() "+ 74: "is missing in class '#{self.class}'") 75: end