Creating, editing, and customizing a tailored profile on IBM Rhapsody is a long and tedious task, and errors are sometimes the order of the day. But it's also an essential asset, as it makes life easier for your developers and Rhapsody users involved in the same project.
The SodiusWillert Profile Builder for IBM Rhapsody is specifically designed to simplify working with IBM Rhapsody profiles. It's a toolbox that provides you with a template-based graphical environment for creating and modifying profiles in IBM Rhapsody. This allows you to access the full power of Rhapsody profiles without having to manually modify textual properties and struggle with endless comma-separated lists.
In the first article, we explained how to create and move a profile within your IBM Rhapsody space operating with our solution. Today, we will start building out that profile using two capabilities that will help you deal with stereotypes and constraints, as well as editing and specifying drawing toolbars, icons, and graphics.
Enjoy your reading and happy profiling!
TABLE OF CONTENTS
Adding Stereotypes and Constraints to your IBM Rhapsody profiles
1. Stereotypes
2. Constraints
Editing Drawing Toolbars, Icons, and Graphics
1. How do you specify a new drawing toolbar?
2. How do you specify new icons?
3. How do you add graphics to use on diagrams?
Adding Stereotypes and Constraints to your IBM Rhapsody profiles
Not all profiles use domain-specific languages but let's presume that yours does. Now that your profile is created, you can start building out your domain-specific language by adding stereotypes and constraints to the profile.
1. Stereotypes
‘New Term’ Stereotypes are the fundamental artifacts Rhapsody uses to form a new language. Adding constraints to those stereotypes can prevent users of your profile from creating ‘illegal’ models.
The SodiusWillert Profile Builder comes with two pre-defined tables for stereotypes and constraints to make it easier to add elements specific to your domain.
When you double-click one of the two pre-defined tables, the table opens. Then you can add your new elements directly to the table by clicking the Add model element button in the toolbar (Fig.1).
All Stereotypes are based on some underlying UML term and you can choose that term easily using a drop-down list, along with other essential characteristics such as ‘is this Stereotype a New Term?’ or ‘Does this Stereotype have an alternative drawing tool’?
Rhapsody itself provides no help at all on what that property means or what its possible values are – the Profile Builder does, making it easy to add New Terms for concepts like ‘Directed Composition’
Fig. 1 – The Stereotypes Table, one of the two pre-defined table
2. Constraints
Constraints are properties of New Term Stereotypes that constrain where that element may be created, or in the case of relationships, its allowed ‘from’ and ‘to’ elements.
Our Profile Builder provides you with several features to help you manage constraints such as Owners or Aggregates more intuitively and consistently. Constraint properties are nothing more than comma-separated lists of textual strings for base terms and New Terms and as such extremely easy to get wrong when created manually. Our helpers will create and manage these lists for you.
Before we modify them, it is worth noting that the Profile Builder includes a customized Property Perspective (Fig.2) that allows locating and viewing the most-used properties in Rhapsody when building a profile. You will find it as a filter option on the Properties tab of the Features view.
Fig. 2 – The Profile Building properties perspective, Constraints tab
Let us now modify the ownership constraints for a stereotype.
How does it work?
In the Model Browser:
- Right-click on one of your stereotypes and select Profile Builder → Edit Metaclasses on Property → Model:: Stereotype:: Aggreagates.
The Metaclasses Editor is now opened (Fig. 3):
- Select the UML Tab or your profile Tab.
- Select the required terms.
Selections you make are applied immediately and the appropriate property in Rhapsody updates as you work. (Fig. 3).
Fig. 3 - The Metaclasses Editor and the immediate synchronization of changes in the Properties Tab
📺 Watch our tutorial about how to Add Stereotypes and Constraints to your profile
Editing Drawing Toolbars, Icons, and Graphics
To make IBM Rhapsody look more familiar to your users, you may want to adapt the Look and Feel of graphics and iconography of model elements in your domain-specific language. Our Profile Builder can help you replace the standard icons and graphics with your own and create custom drawing toolbars tailored to your users’ specific needs.
1. How do you specify a new drawing toolbar?
Drawing toolbars in Rhapsody provides quick access to various drawing tools and diagram elements, allowing you to create and modify diagrams efficiently. Providing custom diagram types with custom drawing toolbars is an excellent way to guide your users in building models. Drawing toolbars in Rhapsody are yet another comma-separated list. Good news, you can edit drawing toolbars using one of our Profile Builder helpers:
How does it work?
- Create a stereotype applicable to one of the base diagram types.
- Right-click on the stereotype and select Profile Builder → Stereotype Editor
ℹ️ [You can also use the same Metaclasses Editor you used previously]
- In the Stereotype Editor, select the Drawing Toolbar tab.
- Drag the elements you want on the drawing toolbar into the field on the right (Fig.4). Any changes you make are applied immediately and may be viewed in the property Model.Stereotype.DrawingToolbar
Fig. 4 – Specifying a custom drawing toolbar using Profile Builder’s Stereotype Editor
2. How do you specify new icons?
Looking to change the icon of one of your New Terms from the base UML icon into something with a more distinctive and familiar design? You can perform this task directly on the Icon Tab from the Stereotype Editor (Fig.4 and Fig.5). From here, you can select new icons that will be used in the model browser and/or the drawing toolbar.
Fig. 5 – The Stereotype Editor is ready to specify new icons
Select the icons you want by browsing them on the file system. The automation can automatically copy these into the profile folder if they are not already there. You’ll have a small preview of what the icon looks like (Fig.6). As before, any changes you make here are applied immediately to the profile.
Fig. 6 – Icons Tab from the Stereotype Editor
3. How do you add graphics to use on diagrams?
Rhapsody allows a graphic to be used on diagrams as part of / instead of the basic ‘box’ symbol. The Profile Builder also allows you to specify such a graphic. Back on the Icons tab of the Stereotype Editor, let us browse for a Diagram Graphic and look for a Bitmap (Fig.7).
Fig. 7 – Specifying a Diagram Graphic
By default, Rhapsody does not show graphics unless you manually open Display options for an element and enable it. To make this a default, open the features for the New Term Stereotype and select the Enable Image View property (Fig.8) (there are other properties to further control the look and feel). Of course, this is made much easier using the Profile Builder’s property perspective—Diagrams Tab.
Fig. 8 – Enabling the display of graphics with Profile Builder’s property perspective
F
Fig. 9 - Custom diagram with a new model element on it using the graphic
📺 Watch our tutorial about how to Edit Drawing Toolbars, Icons and Graphics
That's it for today, we hope that digging into these helpers has helped you realize it is possible to work with profiles in IBM Rhapsody in a much simpler and quicker way. In the next article, we will tackle Properties in IBM Rhapsody and see how Profile Builder helpers simplify the processes of creating and maintaining properties. Check out the next article for other great features!
➡️ The Toolkit You Need - Part 1 - Creating and Moving Profiles
➡️ Was this article helpful? Let us know and subscribe to our blog to be notified of the next release of this series!
➡️ Find out more about SodiusWillert Profile Builder for IBM Rhapsody
➡️ Contact us if you have any questions and if you’d like to get started with Profile Builder for IBM Rhapsody
Leave us your comment