Skip to content
Ho-Sheng Hsiao edited this page Aug 11, 2015 · 3 revisions

Callback Flow

The callbacks flow work like this:

  1. before_transition (haltable)
  2. action (haltable)
  3. on_transition
  4. on_exit
  5. Persistance (via update_column, bypasses validations)
  6. on_entry
  7. after_transition

before_transition and action are "haltable". That means that you can call halt or halt! within those callbacks, and the workflow will not continue the state change. This allows transition validation to take place before transitioning.

Another way for checking validity is through https://github.com/hosh/workflow#conditional-event-transitions

Clone this wiki locally