Events are objects which tell the ActionFlow framework what to do next once a step is complete. Although the event name is entirely up to the developer, some event names are reserved. See below for more details.
Every step definition has to return an event. An event can be returned as follows.
def init # Nothing to do, just a sample after all... # Let's just send a 'success' event. event :success end
The init method returns the success event, which will be interpreted according to the corresponding mapping.
action_step :init do # Tells what to do when the 'success' event is returned on :success => :display_something end
In this situation, the success event means that the display_something step will be called next.
The following event names are used internally and cannot be returned by the step definitions.
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 License.