IBM Support

How to perform multiple calls to startBehavior method in Rational Rhapsody

Question & Answer


Question

How do you perform multiple calls to startBehavior method in IBM Rational Rhapsody?

Cause

You would like to know if it is possible and correct to call the starrtBehavior method more than once

Answer

Yes, you can make a call to startBehavior() method more than once as shown in the sample code below:


bool PDEV_User_SM:startBehavior() {                                    
bool done = true;                                                      
done &= OMReactive:startBehavior();                                    
return done;
       

In the above example class PDEV_User_SM inherits the class OMReactive which inturn contains startBehavior() method. Hence this is function overriding where in the startBehavior() method is first called by class PDEV_User_SM and if the done value is TRUE then startBehavior() is called for the OMReactive class.

Though these are calls to the same method there would have no implications or side affects in the model.

[{"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"},{"code":"PF016","label":"Linux"}],"Version":"7.5.3;7.5.3.1;7.5.3.2;7.6;7.6.0.1;7.6.1;7.6.1.1;7.6.1.2;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

swg21605865