Please note : This help page is for an older version of Enteprise Archtiect. The latest help can be found here.

Code Generation Macros for Executable State Machines

The templates are structured as follows:

StmContextStateMachineEnum

          StmStateMachineEnum

StmContextStateEnum

          StmAllStateEnum

StmContextTransitionEnum

          StmTransitionEnum

StmContextEntryEnum

          StmAllEntryEnum

StmContextStateMachineStringToEnum

          StmStateMachineStringToEnum

StmContextStateEnumToString

          StmStateEnumToString

StmContextTransitionEnumToString

          StmTransitionEnumToString

StmContextStateNameToGuid

          StmStateNameToGuid

StmContextTransitionNameToGuid

          StmTransitionNameToGuid

StmContextDefinition

          StmStateMachineEnum

          StmAllStateEnum

          StmTransitionEnum

          StmAllEntryEnum

          StmAllRegionVariableInitialize

          StmStateWithDeferredEvent

                    StmDeferredEvent

          StmTransitionProcMapping

          StmTransitionProc

                    StmTransitionExit

                    StmTransitionEntry

                    StmTargetOutgoingTransition

                    StmTargetParentSubmachineState

          StmStateProcMapping

          StmStateProc

                    StmStateEntry

                              StmOutgoingTransition

                              StmConnectionPointReferenceEntry

                              StmParameterizedInitial

                    StmSubMachineInitial

                    StmRegionInitial

                    StmRegionDeactive

                              StmStateExitProc

          StmStateTransition

                    StmStateEvent

                              StmStateTriggeredTransition

                    StmStateCompletionTransition

                    StmSubmachineStateExitEvent

                              StmVertexOutgoingTransition

                              StmConnectionPointReferenceExitEvent

                    StmStateExitEvent

                              StmVertexOutgoingTransition

          StmAllRegionVariable

          StmStateMachineStringToEnum

          StmStateMachineRun

                    StmStateInitialData

                    StmStateMachineEntry

                              StmOutgoingTransition

          StmStateMachineRunInitial

                    StmStateMachineInitial

          StmStateMachineRuns

StmContextManager

StmSimulationManager

          StmContextInstanceDeclaration

          StmContextInstance

                    StmContextVariableRunstate

          StmContextInstanceAssociation

          StmContextInstanceClear

StmEventProxy

          StmSignalEnum

          StmContextJoinEventEnum

                    StmJoinEventEnum

          StmEventEnum

          StmSignalDefinition

                    StmSignalAttributeAssignment

                    StmSignalAttribute

          StmSignalInitialize

          StmEventStringToEnum

          StmEventEnumToString

          StmEventNameToGuid

StmConsoleManager

          StmContextInstanceDeclaration

          StmContextInstance

                    StmContextVariableRunstate

          StmContextInstanceAssociation

          StmContextInstanceClear

StmStateMachineStrongToEnum

StmInitialForTransition

StmVertextOutgoingTransition

StmSendEvent

StmBroadcastEvent

StmContextRef

Signal & Event

Macro name

Description

stmSignalVariable

The name of the Signal with the prefix 'm_' in lower case.

stmSignalName

The name of the Signal with spaces and asterixes removed.

stmSignalEnum

The name of the Signal with the prefix 'ENUM_', all upper case.

stmSignalFirstEvent

The name of the Event with the prefix 'ENUM_', all upper case.

stmSignalGuid

The GUID of the Signal.

stmEventVariable

The name of the Event with the prefix 'm_' in lower case.

stmEventName

The name of the Event with spaces and asterixes removed.

stmEventEnum

The name of the Event with the prefix 'ENUM_', all upper case.

StmEventGuid

The GUID of the Event.

stmIsSignalEvent

Is 'T' if the element is a SignalEvent.

Context

Macro name

Description

stmContextName

The name of the Class with spaces and asterixes removed.

stmContextQualName

The qualified name of the Class for which code is being generated.

stmContextVariableName

stmContextFileName

The output file name for the Class for which code is being generated.

Writing Object Runstate to State Machine Initialization

Macro name

Description

stmContextVariableRunstateName

stmContextVariableRunstateValue

stmContextHasStatemachine

Is 'T' if the current context has one or more State Machines.

stmHasHistoryPattern

Is 'T' if the State Machine has a History Pattern.

stmHasTerminatePattern

Is 'T' if the State Machine has a Terminate Pattern.

stmHasDeferredEventPattern

Is 'T' if the State Machine has a Deferred Event Pattern.

stmHasSubmachinePattern

Is 'T' if the State Machine has a Submachine Pattern.

stmHasOrthogonalPattern

Is 'T' if the State Machine has an Orthogonal Pattern.

State Machine

Macro name

Description

stmStatemachineName

The name of the State Machine with asterixes and spaces removed.

stmStatemachineEnum

The name of the State Machine plus 'ENUM_' plus the name of the State Machine in upper case.

stmStatemachineGuid

The GUID of the State Machine element.

stmStateCount

The number of State elements in the State Machine.

stmSubmachineInitialCount

The number of Initial elements in the Sub Machine State element.

stmStatemachineHasSubmachineState

Is 'T' if the State Machine has at least one Sub Machine State.

stmStatemachineInitialCount

The number of Initial elements in the State Machine.

Region

stmRegionEnum

The name of the State Region plus 'ENUM_' plus the name of the State Region in upper case.

stmRegionFQName

The fully qualified name of the State Region.

stmRegionName

The name of the State Region with spaces and asterixes removed.

stmRegionVariable

The name of the State Region with the prefix 'm_' in lower case.

stmRegionFQVariable

The fully qualified name of the State Region with the prefix 'm_' in lower case.

stmRegionGuid

The GUID of the Region.

stmRegionInitial

stmRegionIsOwnedByStateMachine

Is 'T' if the Region is owned by a State Machine.

Transition

stmTransitionEnum

The name of the Transition with the prefix 'ENUM_', plus the name of the Transition in upper case.

stmTransitionGuid

The GUID of the Transition.

stmTransitionName

The name of the Transition with spaces and asterixes removed.

stmTransitionSourceGuid

The GUID of the Source element in the Transition.

stmTransitionTargetGuid

The GUID of the Target element in the Transition.

stmTransitionVariable

The name of the Transition with the prefix 'm_' in lower case.

stmTransitionSourceVariable

stmTransitionTargetVariable

stmTransitionFQVariable

stmSourceVertexEnum

The name of the Transition's source vertex plus '_ENUM' plus the name of the Transition's source vertex in upper case.

stmTargetVertexEnum

The name of the Transition's target vertex plus '_ENUM' plus the name of the Transition's target vertex in upper case.

stmSourceIsInitial

Is 'T' if the Transition's source is an Initial.

stmSourceIsState

Is 'T' if the Transition's source is a State.

stmSourceIsEntryPoint

Is 'T' if the Transition's source is an Entry Point.

stmSourceIsExitPoint

Is 'T' if the Transition's source is an Exit Point.

stmSourceIsFork

Is 'T' if the Transition's source is a Fork.

stmSourceIsJoin

Is 'T' if the Transition's source is a Join element.

stmTargetIsFinalState

Is 'T' if the Transition's target is a Final State element.

stmTargetIsExitPoint

Is 'T' if the Transition's target is an Exit Point element.

stmTargetIsState

Is 'T' if the Transition's target is a State element.

stmTargetIsChoice

Is 'T' if the Transition's target is a Choice element.

stmTargetIsJunction

Is 'T' if the Transition's target is a Junction element.

stmTargetIsEntryPoint

Is 'T' if the Transition's target is an Entry Point element.

stmTargetIsConnectionPointReference

Is 'T' if the Transition's target is a Connection Point Reference element.

stmTargetIsFork

Is 'T' if the Transition's target is a Fork element.

stmTargetIsJoin

Is 'T' if the Transition's target is a Join element.

stmTransitionEffect

The Effect of the Transition.

stmTransitionGuard

The Guard of the Transition.

stmTransitionKind

The type or kind of the Transition.

stmTargetInitialTransition

stmTargetIsSubmachineState

Is 'T' if the Transition's target is a Submachine State.

stmSourceStateEnum

The name of the Transition's source state with the prefix '_ENUM' in upper case.

stmTargetStateEnum

The name of the Transition's target state, with the prefix '_ENUM' in upper case.

stmTargetVertexFQName

The fully qualified name of the Transition's target vertex.

stmTargetIsDeepHistory

Is 'T' if the Transition's target is a Deep History State.

stmTargetIsShallowHistory

Is 'T' if the Transition's target is a Shallow History State.

stmTargetIsTerminate

Is 'T' if the Transition's target is a Terminate element.

stmParentIsStateMachine

Is 'T' if the vertex is an Entry Point or Exit Point, or if the container is a State Machine.

stmSourceParentStateEnum

stmTargetParentStateEnum

stmTargetSubmachineEnum

stmTargetRegionIndex

stmIsSelfTransition

Is 'T' if the Transition's source is the same as its target.

stmHistoryOwningRegionInitialTransition

stmDefaultHistoryTransition

Vertex and State

stmVertexName

The name of the Vertex.

stmStateName

The name of the State.

stmVertexGuid

The GUID of the Vertex.

stmVertexFQName

The fully qualified name of the Vertex.

stmStateFQName

The fully qualified name of the State.

stmVertexType

The type of the vertex; one of 'State', 'FinalState', 'Pseudostate', 'ConnectionPointReference' or ' ' (empty).

stmPseudostateKind

The kind of the Pseudostate; one of 'initial', 'deepHistory', 'shallowHistory', 'join', 'fork', 'junction', 'choice', 'entryPoint', 'exitPoint' or 'terminate'.

stmPseudostateName

The name of the Pseudostate.

stmPseudostateVariable

The name of the Pseudostate with the prefix 'm_' in lower case.

stmPseudostateStateMachineName

The name of the Pseudostate State Machine.

stmPseudostateStateMachineVariable

The name of the Pseudostate State Machine with the prefix 'm_' in lower case.

stmVertexVariable

The name of the Vertex with the prefix 'm_' in lower case.

stmVertexEnum

The name of the Vertex plus '_ENUM' plus the name of the Vertex in upper case.

stmStateEnum

The name of the State plus '_ENUM' plus the name of the State in upper case.

stmConnectionPointReferenceStateName

The name of the Connection Point Reference.

stmConnectionPointReferenceStateVariable

The name of the Connection Point Reference with the prefix 'm_' in lower case.

stmConnectionPointReferenceEntryCount

stmParameterizedInitialCount

stmInitialCountForTransition

stmStateVariable

The name of the State with the prefix 'm_' in lower case.

stmStateEntryBehavior

The behavior defined for an 'entry' Action operation for a State (the text on the 'Behavior' tab for the 'entry' Action operation on the element's 'Operations' page).

stmStateEntryCode

The initial code defined for an 'entry' Action operation for a State (the text in the 'Initial Code' field on the 'Behavior' tab for the 'entry' Action operation on the element's 'Operations' page).

stmStateDoBehavior

The behavior defined for a 'do' Action operation for a State (the text on the 'Behavior' tab for the 'do' Action operation on the element's 'Operations' page).

stmStateDoCode

The initial code defined for a 'do' Action operation for a State (the text in the 'Initial Code' field on the 'Behavior' tab for the 'do' Action operation on the element's 'Operations' page).

stmStateExitBehavior

The behavior defined for an 'exit' Action operation for a State (the text on the 'Behavior' tab for the 'exit' Action operation on the element's 'Operations' page).

stmStateExitCode

The initial code defined for an 'exit' Action operation for a State (the text in the 'Initial Code' field on the 'Behavior' tab for the 'exit' Action operation on the element's 'Operations' page).

stmStateSubmachineName

The name of the Submachine.

stmStateSubmachineVariable

The name of the Submachine with the prefix 'm_' in lower case.

stmStateIsFinal

Is 'T' if the State is a FinalState.

stmStateIsSubmachineState

Is 'T' if the State is a Submachine State ('Properties' page | Advanced | 'isSubmachineState' property).

stmSubMachineEnum

The name of the Submachine followed by '_ENUM' plus the name of Submachine in upper case.

stmStateHasChildrenToJoin

stmStateIsTransitionTarget

stmThisIsSource

stmThisIsSourceState

stmStateParentIsSubmachine

Is 'T' if the State's container is a State Machine.

stmStateContainerMatchTransitionContainer

stmVertexRegionIndex

stmStateRegionCount

The number of regions in the State.

stmStateInitialCount

The number of Initial elements in the State Machine.

stmVertexContainerVariable

stmVertexParentEnum

stmStateHasUnGuardedCompletionTransition

stmStateEventHasUnGuardedTransition

stmInitialTransition

Instance Association

Macro name

Description

stmSourceInstanceName

stmTargetInstanceName

stmSourceRoleName

stmTargetRoleName