IBM Support

How to perform multiple calls to startBehavior method in Rational Rhapsody

Technote (FAQ)


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


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


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.

Document information

More support for: Rational Rhapsody
General Information

Software version: 7.5.3,,, 7.6,, 7.6.1,,, 8.0, 8.0.1, 8.0.2

Operating system(s): Linux, Windows

Reference #: 1605865

Modified date: 01 May 2013

Translate this page: