ibm Rational Rhapsody 7.5 — And states in flat statechart

Statecharts && IS_COMPLETED(state) Љ Instrumentation information for FinalState is generated in the transition code (as for normal states). And states in flat statechart Code is generated for local termination of And states with the flat statechart implementation as follows: Љ The following local termination guard is added to each outgoing null transition from an And state if one of the components has a final activity. && IS_COMPLETED(AndState) In this case, the isCompleted() function of the AndState framework class is called: Љ The is Completed() operation of AndState calls the IS_COMPLETED() macro for all components that have a final activity.

This operation returns TRUE only when all components are completed. If an And state does not have components with a final activity, the operation returns TRUE in statechart mode and FALSE in activity diagram mode. The following example shows the _isCompleted() function generated for an And state named AndState , with two components, Component1 and Component2 , each of which has a final activity:

OMBoolean class_0::AndState_isCompleted() { if(IS_COMPLETED(Component1) == FALSE) return FALSE; if(IS_COMPLETED(Component2) == FALSE) return FALSE; return TRUE; } Љ Implementation of join transitions with the flat statechart implementation is the same as for the reusable statechart implementation (see And states in reusable statechart ). 734 User Guide