Using state entry and exit code |
Category: |
Toolset
Purpose: |
To warn users about the effects of using state entry and exit code in hierarchical state machines
Intended Audience: |
All ObjecTime developers
Applicable to: |
All Versions
Description: |
Caution is urged when using state entry and exit code.
It has been our experience that users can be surprised at the behaviour of their models when using state entry or exit code combined with hierarchical finite state machines.
In general transition code should be used and entry and exit code usage restricted to circumstances where its specific behaviour is desired.
As an example, assume you have a transition defined on the border of the top state (a transition from the top state border back to itself) which loops back to the top state. When such a transition is executed, the associated exit code for the current substate as well as the exit code for the top state is executed and then the entry code for the top state followed by the entry code for the substate.
Please read the sections on "Group Transitions" and "Transitions to history" in the ObjecTime Toolset Guide to understand the implications of using entry and exit code.
Limitations: |
None
See also: |
ObjecTime Toolset Guide Finite State Machines update example in $OBJECTIME_HOME/ModelExamples/RPL
Copyright © 1999, ObjecTime Limited. |