IBM Support

Using the IS_COMPLETED statechart macro in IBM Rhapsody

Question & Answer


Question

How do you use IS_COMPLETED statechart macro in IBM Rhapsody?

Cause

You have included the macro in your code but observe a compiler error saying the object/method is not in scope.

Answer

The IS_COMPLETED macro calls the is_completed() state operation:



which is generated within your project's statechart.

However, the is_completed() state operation is only generated if:

a) The state contains a final state



b) The CG::Class:IsCompletedForAllStates property is enabled. In which case the final state is not required.



See examples for both below:

 
Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.




IS_COMPLETED.zipIS_COMPLETED.zip

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg22014839