State Object
States are used to represent the significant modes of a process within its state transition diagram (STD). States may have actions associated with them which are implemented when the process occupies the state. Specifically a set of actions called enter executives may be specified to occur when a process enters a state; similarly, a second set of actions called exit executives may be specified to occur at the moment that the process leaves a state.
Each state has an attribute called “status” which is used to designate the state as forced or unforced. An unforced state is one in which a process can remain after having been invoked to respond to an interrupt. A forced state is one which is necessarily traversed without any simulation time elapsing. Thus unforced states are blocking points for a process model and actually represent persistent conditions of the process, whereas forced states are instantaneously completed and exited. See Chapter 5 “Process Domain” on page 165 for more information on forced and unforced states.
Figure 1: Graphical Representation of an Unforced State

The following table lists the built-in attributes of the state object.
Table 1: State Object Built-In Attributes
| Name | Data Type |
|---|---|
| enter executives | textlist |
| exit executives | textlist |
| name | string |
| status | enumerated |
enter executives
Specifies a series of actions that a process implements when it occupies a state. The enter executives of a state are always executed as soon as the state is entered by the process. The enter executives are specified as C or C++ statements. All C/C++ statements are valid, including procedure calls.
| Editing | Simulation | |
|---|---|---|
| Data Type | textlist | not applicable |
| Access | read/write | not applicable |
| Default Value | (empty) | |
| Units | None | |
| Constraints | any valid C or C++ statements |
exit executives
Specifies a series of actions that a process implements when it exits a state. Exit executives are specified as C or C++ statements. All C or C++ statements are valid, including procedure calls.
Exit executives are usually used only in unforced states to implement a response to an interrupt. In forced states, exit executive statements are equivalent to the same statement placed at the end of the enter executives, because forced states do not separate the execution of the two executive blocks.
| Editing | Simulation | |
|---|---|---|
| Data Type | textlist | not applicable |
| Access | read/write | not applicable |
| Default Value | (empty) | |
| Units | None | |
| Constraints | any valid C or C++ statements |
name
This attribute is a text string used to specify a name for a state. It is used for visual and organizational purposes only, and does not have any effect on the behavior of a process model. This attribute lets you label a state so that it is easier to identify its purpose, which is useful for debugging or animation.
| Editing | Simulation | |
|---|---|---|
| Data Type | string | not applicable |
| Access | read/write | not applicable |
| Default Value | “st_n” (n is an integer) | |
| Units | ||
| Constraints |
status
This attribute designates a state as forced or unforced. If a state is forced, the enter executives will be executed, followed by the exit executives, and then a transition will be made to another state. However, if a state is unforced, the state will execute the enter executives and then block, thereby releasing control to the Simulation Kernel, allowing it to execute new events and possibly also to advance the simulation clock. When the process gets invoked again, the exit executives of that state will then be executed before transitioning to the next state. All process models must contain at least one unforced state.
In the Process Editor, forced states are green (or black, for monochrome displays), and unforced states are red (or white, for monochrome displays).
| Editing | Simulation | |
|---|---|---|
| Data Type | enumerated | not applicable |
| Access | read/write | not applicable |
| Default Value | unforced | |
| Units | ||
| Constraints |