Question & Answer
Question
How do you use the bind stereotype to instantiate a Template class in IBM Rational Rhapsody?
Cause
You would like to instantiate a Template class using a Regular class.
Answer
Although Rational Rhapsody does not provide the <<bind>> stereotype as a predefined type, its functionality is predefined; hence, it is mandatory to manually create the <<bind>> Stereotype in the model.
You can then use the bind stereotype to instantiate a template class from a regular class in Rational Rhapsody in the following manner:
- Add a Profile to the existing project in Rational Rhapsody
Right click on Project > Add New > Profile
- Add a Stereotype to the newly created Profile
Right click on Profile > Add New > Stereotype
- Rename the Stereotype to bind
- Set the Stereotype applicable to the Dependency metaclass
- Right click on Stereotype > Features
- Navigate to the General tab and set value of property Applicable to as Dependency
- Click OK
Note: You should already have a Template class and Regular class created in the model before applying Step 5
- Create a dependency relation from the Regular class to the Template class using the Drawing toolbar
- Apply the <<bind>> Stereotype to the dependency relation between the Regular class and Template class
- Right click on Dependency relation > Features
- Navigate to General tab and value of set value of Stereotype as bind
- Click OK
Once after completion of Step 6 the Regular class is converted into a Template Instantiation class and can be verified via its Template Instantiation tab in the Features Dialog
- Instantiate the Template class by providing values to the Template class parameters in the Template Instantiation tab
- Right-click on Template Instantiation class > Features
- Navigate to Template Instantiation tab & provide values in the Value filed for the template parameters
- Click OK
[{"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":"7.6.1.1;7.6.1;7.6.0.1;7.6;7.5.3.2;7.5.3.1;7.5.3;7.5.2.1;7.5.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21591512