Package translate :: Package storage :: Module workflow :: Class Workflow |
[hide private]
[frames] | no frames]

# Class Workflow

source code

Instance Methods | [hide private]
__init__(self, wf_obj=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
_get_edges(self) | source code
_get_states(self) | source code
add_edge(self, from_state, to_state) | source code
add_state(self, state) | source code
get_from_states(self) Returns a list of states that can be transitioned from to the current state. | source code
get_to_states(self) Returns a list of states that can be transitioned to from the current state. | source code
get_state_by_name(self, state_name) Get the `State` object for the given name. | source code
set_current_state(self, state) Set the current state. | source code
set_initial_state(self, state) Sets the initial state, used by the reset method. | source code
reset(self, wf_obj, init_state=None) Reset the work flow to the initial state using the given object. | source code
trans(self, to_state=None) Transition to the given state. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
| edges
| states
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, wf_obj=None) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### set_current_state(self, state) | source code
Set the current state. This is absolute and not subject to edge constraints. The current state's `leave` and the new state's `enter` method is still called. For edge transitions, see the `trans` method.

### trans(self, to_state=None) | source code
Transition to the given state. If no state is given, the first one returned by `get_to_states` is used.

Property Details | [hide private]

### edges Get Method: _get_edges(self)

### states Get Method: _get_states(self)