| Module | Ruote::ReceiverMixin |
| In: |
lib/ruote/receiver/base.rb
|
The core methods for the Receiver class (sometimes a Mixin is easier to integrate).
(The engine itself includes this mixin, the LocalParticipant module includes it as well).
Given a process definitions and optional initial fields and variables, launches a new process instance.
This method is mostly used from the Ruote::Engine class (which includes this mixin).
process_definition must be a result of Ruote.process_definition call or XML or JSON serialized process definition, as accepted by Ruote::Parser#parse.
fields are workflow parameters that will be placed in workitem.fields.
variables contain engine variables.
Wraps a call to receive(workitem)
Not aliasing so that if someone changes the receive implementation, reply_to_engine is affected as well.
Stashes values in the participant expression (in the storage).
put(workitem.fei, 'key' => 'value', 'colour' => 'blue')
Remember that keys/values must be serializable in JSON.
put & get are useful for a participant that needs to communicate between its consume and its cancel.
See the thread at groups.google.com/group/openwferu-users/t/2e6a95708c10847b for the justification.