dootle.control.fsm.machines

The FSM’s for various components of doot

Classes

TaskMachine

A Statemachine controlling the tracking of task states

ArtifactMachine

A statemachine of artifact

MainMachine

For running doot as main

OverlordMachine

Module Contents

class dootle.control.fsm.machines.TaskMachine(
task: dootle.control.fsm._interface.TaskModel_p,
)

Bases: statemachine.StateMachine

A Statemachine controlling the tracking of task states

Parameters:

task (dootle.control.fsm._interface.TaskModel_p)

_
setup
prepare
run
finish
skip
halt
fail
progress
run_until_init(
tracker: doot.control.tracker._interface.WorkflowTracker_p,
**kwargs,
) None
Parameters:

tracker (doot.control.tracker._interface.WorkflowTracker_p)

Return type:

None

run_until_ready(
tracker: doot.control.tracker._interface.WorkflowTracker_p,
**kwargs,
) None
Parameters:

tracker (doot.control.tracker._interface.WorkflowTracker_p)

Return type:

None

run_until_dead(
tracker: doot.control.tracker._interface.WorkflowTracker_p,
**kwargs,
) None
Parameters:

tracker (doot.control.tracker._interface.WorkflowTracker_p)

Return type:

None

before_transition(
source: Any,
event: Any,
target: Any,
) None
Parameters:
  • source (Any)

  • event (Any)

  • target (Any)

Return type:

None

class dootle.control.fsm.machines.ArtifactMachine(
artifact: dootle.control.fsm._interface.ArtifactModel_p,
)

Bases: statemachine.StateMachine

A statemachine of artifact

Parameters:

artifact (dootle.control.fsm._interface.ArtifactModel_p)

Declared
Stale
ToClean
Removed
Exists
Finished
progress
class dootle.control.fsm.machines.MainMachine(
model: Any = None,
state_field: str = 'state',
start_value: Any = None,
rtc: bool = True,
allow_event_without_transition: bool = False,
listeners: List[object] | None = None,
)

Bases: statemachine.StateMachine

For running doot as main

Parameters:
  • model (Any)

  • state_field (str)

  • start_value (Any)

  • rtc (bool)

  • allow_event_without_transition (bool)

  • listeners (List[object] | None)

init
setup
plugins
cli
reporter
commands
tasks
run
failed
report
shutdown
finished
progress
fail
class dootle.control.fsm.machines.OverlordMachine(
model: Any = None,
state_field: str = 'state',
start_value: Any = None,
rtc: bool = True,
allow_event_without_transition: bool = False,
listeners: List[object] | None = None,
)

Bases: statemachine.StateMachine

Parameters:
  • model (Any) – An optional external object to store state. See domain models.

  • state_field (str) – The model’s field which stores the current state. Default: state.

  • start_value (Any) – An optional start state value if there’s no current state assigned on the domain models. Default: None.

  • rtc (bool) – Controls the processing model. Defaults to True that corresponds to a run-to-completion (RTC) model.

  • allow_event_without_transition (bool) – If False when an event does not result in a transition, an exception TransitionNotAllowed will be raised. If True the state machine allows triggering events that may not lead to a state transition, including tolerance to unknown event triggers. Default: False.

  • listeners (List[object] | None) – An optional list of objects that provies attributes to be used as callbacks. See listeners for more details.

init
constants
config_file
logging
locations
shared
ready
failed
finished
progress
fail