State Machines and Submachines
This article covers the core structural units of Logiop Studio: top-level State Machines and reusable Submachines.
State Machine
A State Machine specifies the discrete, event-driven behavior of a system or component. It models system lifecycle as a graph of Vertices (such as States and Pseudostates) interconnected by Transitions triggered by dispatched Events.
During execution, a State Machine alternates between being in state (settled in a stable state configuration) and in transit (traversing Transitions in response to dispatched Events, firing transition effects and state entry/exit Actions).
Operations
-
Creating:
Right-click the Project node in Project Explorer and selectNew State Machinefrom the context menu, or click theNew State Machinebutton in the Main Toolbar on the left. -
Opening:
Double-click the State Machine node in Project Explorer, or right-click the node and selectOpenfrom the context menu. -
Renaming:
Select the State Machine node in Project Explorer and edit theNamefield in the Properties Panel. A State Machine's name must be unique within the containing Project SV1001. -
Deleting:
Right-click the State Machine node in Project Explorer and selectDeletefrom the context menu. -
Duplicating:
Right-click the State Machine node in Project Explorer and selectDuplicatefrom the context menu. This creates a deep clone of the State Machine including all its Behaviors and Submachines. -
Editing Notes:
Select the State Machine node in Project Explorer and edit theNotesfield in the Properties Panel (maximum 500 characters SV1031).
UML 2.5.1 Specification (Subclause 14.2.3.1):
“StateMachines can be used to express event-driven behaviors of parts of a system. Behavior is modeled as a traversal of a graph of Vertices interconnected by one or more joined Transition arcs that are triggered by the dispatching of successive Event occurrences.”
Deviations from UML 2.5
Validations
-
SV1001:
A root State Machine must have a unique name within its containing Project. -
SV1002:
Vertices and Transitions within a State Machine must have unique names. -
SV1008:
A State Machine Behavior name must be unique across all Behavior types (Events, Actions, DoActivity, and Guards). -
SV1031:
Notes for an element can contain a maximum of 500 characters.
Submachine
A Submachine is a distinct, standalone State Machine defined for modular decomposition and behavioral reuse. They are similar to composite States in that they can encapsulate logic, but rather in a separate document.
In a parent diagram, a Submachine is referenced by a Submachine State. Each reference acts as a macro-like instantiation representing an independent behavioral instance at runtime. A Submachine can reference other Submachines within the root State Machine, but it cannot directly reference itself SV1004, SV1005.
Note: Shared Behavior Repository
Submachines do not maintain an independent Behavior repository. Instead, they inherit and share the Behavior repository (Events, Actions, DoActivity, Guards) of their parent root State Machine.
Operations
-
Creating:
Right-click the root State Machine node in Project Explorer and selectNew Submachinefrom the context menu, or click theNew Submachinebutton in the left Main Toolbar. A Submachine is always created with a top-level composite State. This State cannot be deleted, and all Submachine elements must be placed inside this top-level State SV1006. -
Opening:
Double-click the Submachine node in Project Explorer, or right-click the node and selectOpenfrom the context menu. -
Renaming:
Select the Submachine node in Project Explorer and edit theNamefield in the Properties Panel. A Submachine's name must be unique within the parent State Machine SV1003. -
Deleting:
Right-click the Submachine node in Project Explorer and selectDeletefrom the context menu. Deleting a Submachine automatically deletes all of its referencing Submachine State instances across your State Machine diagrams (cascade delete) to maintain workspace integrity. -
Duplicating:
Right-click the Submachine node in Project Explorer and selectDuplicatefrom the context menu. -
Editing Notes:
Select the Submachine node in Project Explorer and edit theNotesfield in the Properties Panel (maximum 500 characters SV1031).
Connection Point References
The concept of Connection Point Reference is provided to support binding between the Submachine State and the referenced Submachine.
-
Creating:
First, create new Entry or Exit Points in the Submachine's top-level composite State. Next, navigate to the referencing Submachine State, and right-click it. The context menu will display anAdd Connection Point Referencesubmenu. Hovering over this submenu will display all available references to the Submachine's Connection Points. Select from this list to create a new Connection Point Reference. -
Deleting:
Select the Connection Point Reference on the Submachine State and hitDelete, or right-click and selectDeletefrom the context menu. Deleting an Entry or Exit Point from a Submachine automatically deletes all corresponding Connection Point References across all referencing Submachine States (cascade delete).
UML 2.5.1 Specification (Subclause 14.2.3.4.7):
“Submachines are a means by which a single StateMachine specification can be reused multiple times... A submachine State implies a macro-like insertion of the specification of the corresponding submachine StateMachine. It is, therefore, semantically equivalent to a composite State...
A Connection Point Reference represents a point on the submachine State at which a Transition either terminates or originates. That is, they serve as targets for incoming Transitions to submachine States, as well as sources for outgoing Transitions from submachine States. Each Connection Point Reference is matched by a corresponding entry or exit point in the referenced submachine StateMachine. This provides the necessary binding mechanism between the submachine invocation and its specification.”
Deviations from UML 2.5
-
UMD1002:
In UML, a Submachine defines top-level Vertices directly on its canvas. Logiop Studio requires a Submachine to enclose all internal modeling elements within a single top-level Composite State container. -
UMD1003:
In UML, a Submachine State Machine maintains its own encapsulated namespace and behavior definitions. In Logiop Studio, Submachines inherit the Behavior repository of their root State Machine, ensuring a unified catalog for Events, Actions, DoActivities, and Guards across the entire hierarchy.
Validations
-
SV1003:
A Submachine must have a unique name within its root State Machine. -
SV1004:
A Submachine can only be referenced by Submachine States within its owning root State Machine tree. -
SV1005:
A Submachine cannot reference itself directly through nested Submachine States. -
SV1006:
A Submachine must contain exactly one top-level Composite State. All internal elements must reside within this root Composite State. -
SV1007:
Only one Connection Point Reference referencing a specific Connection Point of a Submachine can be created for a referencing Submachine State. -
SV1031:
Notes for an element can contain a maximum of 500 characters.