State Machine

A machine is a device which accepts some inputs, possibly produces some output,
and has some memory sorting information on the overall results of all previous
inputs.

The condition of the machine at a particular instance is called a state of the
machine. New input changes the state, may be to another state, and may be to
the same state. The effect of a new input depends on the present state the
machine is in.

If the total number of possible states is finite, the machine is called finite
state machine, eg. a computer.

Event Execution Summary

  1. Check the event's guard condition. Stop here if FALSE.
  2. Event::before_transition
  3. CurrentState::on_exit
  4. Update state in machine
  5. NewState::on_enter
  6. Event::after_transition

State Flow

State Flow is a submodule that provides a base implementation of the State Machine class. It provides a base workflow as a base plugin.

Custom plugins should use State Flow as a model when:

  • Adding new states
  • Adding new events

Integration

State Flow provides the following optional integration with other modules:

  • Rules: Hook a condition into a event transition
  • Views: Exposes defined states, revision information, and timestamps

7.x-2.x

  • Extend State Flow by hook_state_flow_machine_type_alter() instead of variable_set
  • Bulk revision editing
  • Workflow scheduling. Requires Date_Popup.
  • Easily implement conditions to allow workflow to be ignored

7.x-3.x

Currently in unstable development as a collaborative effort with Workbench Moderation. State Flow will be come State Flow Node. An entity agnostic State Flow Entity will be created. State Flow Node will be dependent on State Flow Entity.

This module is sponsored by Treehouse Agency and Energy.gov

Downloads

Recommended releases

Version Downloads Date Links
7.x-2.0-beta2 tar.gz (28.74 KB) | zip (40.27 KB) 2012-May-19 Notes

Development releases

Project Information


Maintainers for State Machine

  • robeano - 65 commits
    last: 5 days ago, first: 15 weeks ago
  • timcosgrove - 1 commit
    last: 5 days ago, first: 5 days ago
  • fmitchell - 77 commits
    last: 6 days ago, first: 1 year ago
  • stevector - 86 commits
    last: 1 week ago, first: 12 weeks ago
  • indytechcook - 16 commits
    last: 15 weeks ago, first: 36 weeks ago

Issues for State Machine

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports