forked from geekq/workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Callback Flow
Ho-Sheng Hsiao edited this page Aug 11, 2015
·
3 revisions
The callbacks flow work like this:
-
before_transition
(haltable) -
action
(haltable) on_transition
on_exit
-
Persistance (via
update_column
, bypasses validations) on_entry
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