Skip to content

backmp11: Remove active state switch policies #222

@chandryan

Description

@chandryan

Currently backmp11 supports the same set of state switch policies as in back:

  • before transition / after guard
  • after exit of the source state
  • after transition action
  • after entry of the target state (default)

Apparently the UML specification did not specify exactly when the active state is supposed to switch in the past.
Version 2.5.1 seems to have filled this gap and specifies the exact point in time when the switch is supposed to happen.
Taking below statements from the specification into account results in a "after exit of the source state" state switch policy:

  • Entering a state: "Regardless of how a State is entered, the StateMachine is deemed to be “in” that State even before any entry Behavior or
    effect Behavior (if defined) of that State start executing."
  • Exiting a state: "Regardless of how a State is exited, the StateMachine is deemed to have “left” that State only after the exit Behavior (if
    defined) of that State has completed execution."

The specified switch time seems to be a practicable choice. It allows active state visitors to be called with the most intuitive set of states: The previous active state before the source state finished its exit behavior, the new active state in all other cases.

As the active state switch policy is a rarely needed configuration detail with little effect and MSM implements state machines as specified in UML, change the default to "after exit of the source state" in 1.92 and remove the setting in 1.93.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions