IBM Support

How to access argument of an event using Rational Rhapsody in Java

Question & Answer


Question

How do you access argument of an event when it triggers a transition using IBM Rational Rhapsody in Java?

Cause

If an event has an argument, then Rational Rhapsody in C/C++ provides a pointer called params that can be used on the transition where the event occurs to get access to the argument.

However Rational Rhapsody in Java does not support pointers.

Answer

In order to access argument of an event using Rational Rhapsody in Java you can use the pointer params as shown below.

Example : params.<event argument name>

Note: A sample model has been attached to demonstrate the usage of params with Rational Rhapsody in Java

 
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.



Sample_Model.zipSample_Model.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":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21638054