MiceOnABeam Product Documentation

Modified: 10/27/2011 7:21 PM
Recently changed articles You can subscribe to this wiki article using an RSS feed reader.

Default Entry

Summary

Directs a Composite State to transition to it's Initial Point and automatically take the Initial Transition from there.

Graphic

A Default Entry to a Composite State is indicated in the following cases.

  1. Transition Terminating on a Substate: The absence of an Entry Point at the connection point with the substate always implies Default Entry. However the presence of an Entry Point may still imply Default Entry if the transition does not continue further within the substate.
  2. Transition Terminating on Enclosing Border: The absence of an Exit Point at the connection point with the substate always implies Default Entry. However the presence of an Exit Point may still imply Default Entry if the transition does not continue further outside the Composite State.
  3. Transition to Shallow or Deep History: Default Entry is transitioned to in the absence of a Default History Transition, when the last substate is undefined or is the Final State.

Description

There are a number of scenarios, whereby a Composite State is directed to return to it's default state. This is known as Default Entry. When a Default Entry has been specified, the Composite State transitions to it's Initial Point, automatically takes it's outgoing transition which is called an Initial Transition and terminates on a state within the Composite State's decomposition.

A Default Entry to a Composite State is indicated in the following cases.

  1. Transition Terminating on a Substate: A transition to a substate within the decomposition of a Composite State where the transition does not continue further within the decomposition of the substate, will invoke the Default Entry on that substate.
     
  2. Transition Terminating on Enclosing Border: A transition to the enclosing border of a Composite State from within it's decomposition where the transition does not continue further on outside, will invoke the Default Entry on the enclosing Composite State.
     
  3. Shallow History: A transition to Shallow History from within a Composite State will transition to and invoke the Default Entry on the last active substate of the Composite State.

    If the last active substate is undefined (the Composite State had not been previously entered) or is the Final State, then the Default Shallow History Transition will be taken. If the latter has not been specified, then the Default Entry will be invoked on the enclosing Composite State.

     
  4. Deep History: A transition to Deep History from within a Composite State will transition to it's last active substate, and will invoke Deep History on that substate and recursively so until a Simple State is reached.

    If the last active substate is undefined (the Composite State had not been previously entered) or is the Final State, then the Default Deep History Transition will be taken. If the latter has not been specified, then the Default Entry will be invoked on the enclosing Composite State.

Usage

In the first example, the model shows state S1 with two transitions to state S. If the first event touch occurs, then the Default Entry is invoked on state S which causes the Initial Transition within it's decomposition to be taken to substate SubS1. Aside from setting the starting substate of a Composite State the Initial Transition can have a Transition Action associated with it in order to initialize variables and perform other startup functions.

              

If in the second example the changed event occurs first while in state S1, the script then follows the transition to the Deep History Point within state S. At this point the last active substate is undefined, and there is no Default History Transition to take, so state S takes the Default Entry, and transitions to state SubS1.

Notes

  • If a Default Entry is indicated for a Composite State and no Initial Transition has been specified from the Initial Point, then the model is considered ill-defined, and the script is terminated.
Tags:
Home: MiceOnABeam Product Documentation Copyright © 2010-2018 MiceOnABeam Software