Statemachine Diagram

Statemachine diagram represents the states in an object and their transitions.

image

Creating a Statemachine Diagram

Statemachine diagrams can be added by the following procedure:

  • Click [Statemachine Diagram] from [Diagram] on the Main Menu.

  • Use the context menu from [Structure] in [Project View].


Diagram Elements of the Statemachine Diagram

image
Description of each icon

Type

Icon

Description

Select

select_icon

The basic operations of the Diagram Editor can be executed in this mode.

InitialPseudostate

initial_state_icon

Add an InitialPseudostate.

State

action_state_icon

Add a State.

SubmachineState

submachinestate_icon

Add a SubmachineState.

FinalState

final_state_icon

Add a FinalState.

Transition

asso_with_nav_icon

Add a Transition.

EntryPoint

entrypoint_icon

Add an EntryPoint.

ExitPoint

exitpoint_icon

Add an ExitPoint.

ShallowHistory

shallow_h_icon

Add an ShallowHistory.

DeepHistory

deep_h_icon

Add an DeepHistory.

JunctionPoint

junction_point_icon

Add a JunctionPoint

Choice

choicepseudostate_icon

Add a Choice.

ForkPseudostate

fork_icon

Add a ForkPseudostate.

ForkPseudostate

rotated_fork_icon

Add a landscape ForkPseudostate. Select from the pull-down of the ForkPseudostate icon.

JoinPseudostate

join_icon

Add a JoinPseudostate.

JoinPseudostate

rotated_join_icon

Add a landscape JoinPseudostate. Select from the pull-down of the JoinPseudostate icon.

Refer to Common Diagram Elements for information on other items.


InitialPseudostate

Creating an InitialPseudostate

InitialPseudostate can be created by the following procedure:

  • Select [InitialPseudostate] initial_state_icon in the Tool Bar and click on the diagram.

Note

A state cannot have multiple InitialPseudostates.


State

Creating a State

State can be created by the following procedure: To insert a line break in the name, click either SHIFT + ENTER, ALT + ENTER, or CTRL + ENTER.

  • Double-click on the Activity diagram.

  • Select [State] action_state_icon in the Tool Bar and click on the diagram.

image

Editing the State

Adding a Region

Region can be added by the following procedure:

  • Select [Add Region] from the context menu.

image

Deleting the Region

Region can be deleted by the following procedure:

  • Select [Delete Region] from the context menu.

Adding an Action

Action can be added by the following procedure:

  • Select [Add Action] from the context menu of the State and click the Action to add ([Add Entity]/[Add Do]/[Add Exit]).

image

Deleting the Action

Action can be deleted by the following procedure:

  • Select [Delete Action] from the context menu of the State and click the Action to delete ([Delete Entity]/[Delete Do]/[Delete Exit]).

  • Delete from the [Entry/Do/Exit] tab of the Property View.

Add an Internal Transition

Internal Transition can be added by the following procedure:

  1. Select [Add Internal Transition] from the context menu of the State.

  2. Double-click the Internal Transition and enter the names of “trigger”, [guard], and “/action”.

To insert a line break in the name, click either SHIFT + ENTER, ALT + ENTER, or CTRL + ENTER.

  • Add from the [Internal Transition] tab of the Property View.

image

Note

When entering the Internal Transition on the diagram, enclose the guard condition with [ ] and add “/” at the beginning of the Action.

Deleting an Internal Transition

Internal Transition can be deleted by the following procedure:

  • Delete from the [Internal Transition] tab of the Property View.

Editing the State Name

State Name can be edited by the following procedure:

  • Double-click the name of the Diagram Element on the diagram editor and edit the name.

  • Edit from the [Base] tab in the Property View.

Action Visibility

Set whether to show or hide the Action by the following procedure:

  • Select [Action Visibility] from the context menu to switch the visibility.

Adding a Stereotype

Stereotype can be added by the following procedure:

  • Select [Add Stereotype] from the context menu.

  • Add a stereotype from the [Stereotype] tab of the Property View.


SubmachineState

Creating a SubmachineState

SubmachineState can be created by the following procedure:

  • Select the Statemachine diagram that to be the SubmachineState in [Structure] and drag and drop it to the Statemachine diagram open in the Diagram Editor.

image
  1. Select [SubmachineState] submachinestate_icon in the Tool Bar and click on the diagram.

  2. Select [Create a new model] or [Select an existing model] and specify the Statemachine diagram to associate from the pull-down.

  3. Click the [OK] button.

  • When [Create a new model] is selected, a new Statemachine diagram is created.

  • When [Select an existing model] is selected, the Statemachine diagram specified in the pull-down is associated.

image

Editing the SubmachineState

Adding an Action

Action can be added by the following procedure:

  • Select [Add Action] from the context menu and select the Action to add ([Add Entity]/[Add Do]/[Add Exit]).

  • Add from the [Entry/Do/Exit] tab of the Property View.

Deleting the Action

Action can be deleted by the following procedure:

  • Select [Delete Action] from the context menu and select the Action to delete ([Delete Entity]/[Delete Do]/[Delete Exit]).

  • Delete from the [Entry/Do/Exit] tab of the Property View.

Add an Internal Transition

Internal Transition can be added by the following procedure:

  • Select [Add Internal Transition] from the context menu and enter the names of “trigger”, [guard], and “/action”.

  • Add from the [Internal Transition] tab of the Property View.

image

Deleting the Internal Transition

Internal Transition can be deleted by the following procedure:

  • Delete from the [Internal Transition] tab of the Property View.

Editing the SubmachineState Name

SubmachineState name can be edited by the following procedure:

  • Edit from the [Base] tab in the Property View.

  • With the diagram element-like SubmachineState name selected, click it again to enter the edit mode and edit.

Opening the Associated Statemachine Diagram

Statemachine associated with the SubmachineState can open by the following procedure:

  • Select [Open Diagram] from the context menu of the SubmachineState.

  • Double-click the SubmachineState on the Diagram Editor.


FinalState

Creating a FinalState

FinalState can be created by the following procedure:

  • Select [FinalState] final_state_icon in the Tool Bar and click on the diagram.


Transition

Creating a Transition

Transition can be created by the following procedure:

  • Select [Transition] asso_with_nav_icon in the Tool Bar.

  • Select [Transition] asso_with_nav_icon in the Draw Suggest.

image

When the Transition from the State/SubmachineState is created, “Trigger” is added to it. When the Transition from the JunctionPoint/Choice is created, “Guard” is added to it.

Editing the Transition

Setting the Action of the Transition

Transition can be edited by the following procedure: To insert a line break in the name, click either SHIFT + ENTER, ALT + ENTER, or CTRL + ENTER.

  • Double-click the name of the Diagram Element on the diagram editor and edit the name.

  • Edit from the [Base] tab in the Property View.


EntryPoint and ExitPoint

Creating EntryPoint and ExitPoint

EntryPoint and ExitPoint can be created by the following procedure:

  • Select [EntryPoint] entrypoint_icon in the Tool Bar and click the State/SubmachineState.

image
  • Select [ExitPoint] exitpoint_icon in the Tool Bar and click the State/SubmachineState.

image

Editing the EntryPoint and ExitPoint

Editing the Name

Name can be edited by the following procedure:

  • Double-click the name of the Diagram Element on the diagram editor and edit the name.

  • Edit from the [Base] tab in the Property View.

Editing the Definition

Definition can be edited by the following procedure:

  • Edit from the [Base] tab in the Property View.


ShallowHistoryPseudostate and DeepHistoryPseudostate

Creating a HistoryPseudostate

HistoryPseudostate can be created by the following procedure:

  • Select [ShallowHistoryPseudostate] shallow_h_icon in the Tool Bar and click on the diagram.

  • Select [DeepHistoryPseudostate] deep_h_icon in the Tool Bar and click on the diagram.

ShallowHistoryPseudostate

DeepHistoryPseudostate

h1

h2

Note

Only one of each HistoryPseudostate can be created in the Statemachine diagram.


JunctionPoint

Creating a JunctionPoint

JunctionPoint can be created by the following procedure:

  • Select [JunctionPoint] junction_point_icon in the Tool Bar and click on the diagram.


Choice

Creating a Choice

Choice can be created by the following procedure:

  • Select [Choice] choicepseudostate_icon in the Tool Bar and click on the diagram.


ForkPseudostate and JoinPseudostate

Creating ForkPseudostate and JoinPseudostate

Select either of the items below in each Tool Bar and click on the diagram.

ForkPseudostate

fork_icon rotated_fork_icon

JoinPseudostate

join_icon rotated_join_icon