The Concepts : Action Step

The Action Step is used to map a method definition to a flow chain of execution. It is very simple and does not take much parameters. Read the Action Step API for more details.

class MyController < ActionFlow::Base
 
  def initialize
 
    # Map an action step
    action_step :my_step do
 
      on :event_name => :next_step_name
 
      # Use the superclass 'method' instruction to map the method named
      # 'my_step_implementation_method' as this step implementation.
      # This is optionnal since by default, it would search for a method
      # named after the step name : 'my_step'
      method :my_step_implementation_method
 
    end
 
    (...)
 
  end
 
  def my_step_implementation_method
 
    # Return an event
    event :event_name
 
  end
 
  (...)
 
end

The standard Flow Step superclass methods are also available.

~~DISCUSSION~~

 
action_step.txt · Last modified: 2007/06/06 16:21 by lucboudreau
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.