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 Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21605865