Statifier.Actions.ActionExecutor (statifier v1.9.0)

View Source

Executes SCXML actions during state transitions.

This module handles the execution of executable content like <log>, <raise>, and other actions that occur during onentry and onexit processing.

Summary

Functions

Execute onentry actions for a list of states being entered. Returns the updated state chart with any events raised by actions.

Execute onexit actions for a list of states being exited. Returns the updated state chart with any events raised by actions.

Execute a single action without state/phase context.

Execute transition actions for all transitions being taken. Returns the updated state chart with any events raised by actions.

Functions

execute_onentry_actions(state_chart, entering_states)

@spec execute_onentry_actions(Statifier.StateChart.t(), [String.t()]) ::
  Statifier.StateChart.t()

Execute onentry actions for a list of states being entered. Returns the updated state chart with any events raised by actions.

execute_onexit_actions(state_chart, exiting_states)

@spec execute_onexit_actions(Statifier.StateChart.t(), [String.t()]) ::
  Statifier.StateChart.t()

Execute onexit actions for a list of states being exited. Returns the updated state chart with any events raised by actions.

execute_single_action(state_chart, action)

@spec execute_single_action(Statifier.StateChart.t(), term()) ::
  Statifier.StateChart.t()

Execute a single action without state/phase context.

This is a public interface for executing individual actions from other action types like IfAction that need to execute nested actions.

execute_transition_actions(state_chart, transitions)

@spec execute_transition_actions(Statifier.StateChart.t(), [Statifier.Transition.t()]) ::
  Statifier.StateChart.t()

Execute transition actions for all transitions being taken. Returns the updated state chart with any events raised by actions.