Statechart Entry Point

Statechart entry point is used to indicate the initial state of the statechart. There should be exactly one statechart entry point defined for each statechart.

You may define several independent statecharts for the same agent, each one describing some particular process. In this case AnyLogic will distinguish how many distinct statecharts are there by analyzing the number of statechart entry points.

To draw a statechart entry point
  1. Statechart entry point should point to some state of a statechart that you want to make the global initial state for this statechart.
  2. In case this state is already drawn, drag the Statechart Entry Point element from the Statechart palette onto the diagram of agent so that the end point of this element gets connected to the state that you want to make the initial one.
  1. Otherwise, if you start drawing your statechart with an entry point, just drag the Statechart Entry Point element onto your diagram and continue constructing your statechart by drawing a state connected to this entry point and so on.
Please do not confuse statechart entry point with initial state pointer. The latter one is used to define an initial state inside some composite one.

Properties

Name – The name of the statechart entry point. The name is used to identify and access the entry point from code.

Show name – If selected, the name of the statechart entry point is displayed on a presentation diagram.

Ignore – If selected, the statechart entry point is excluded from the model.

Visible – If selected, the statechart entry point is visible on a presentation at runtime.

Action – Here you can specify Java statements to be executed when thestatechart entry point forwards the control to an initial state.

Log to database – If selected, information on all transition trigger moments will be saved into the model execution log statechart_transitions_log (if logging is turned on in the model's Database properties).

Related topics

Statecharts

Statechart declaration rules

Statechart execution order