A custom Comment extension with tagged values metadata

Gallery
Tutorial

Welcome to the much-needed custom Complaint stereotype, an extension of Comment with some additional stereotype properties for carrying metadata about a complaint as so-called tagged values:

Click on the image to view it full size
Note that our custom Stereotype is defined in a Profile, a special kind of Package for Stereotypes and their supporting elements:

Our Complaint has an Extension to the UML metaclass Comment. It has a mandatory kind of Enumeration type ComplaintKind. It also has a reporter String field, where String is a UML PrimitiveType.

And it also has an optional complainer of type Complainer, which is another custom Stereotype, in this case one that extends the UML metaclass Actor.

A Stereotype may have an optional icon Image, and the tool supports it, offering also various ways of displaying an applied Stereotype as text only, text and icon, image only etc.

The Stereotypes have been tuned using MagicDraw Customizations, a full treatment of which is beyond the scope of this trail, but note:

There are various ways of applying the Stereotypes. If you create a Comment, you can simply apply «complaint» to it and it will then show that keyword and act like a Complaint element. Or - because of the Customization - one can in fact also access it from the Create Element context menu (only for possible owners) in the model browser directly.

To apply some tagged values, open up the Specification dialog for the «complaint» Comment and under Tags you can set the tagged values corresponding to the stereotype properties.

To use the 'complainer' field you'll need to first create a «complainer», which thanks to the Customization you can via the model browser under a Package node using the Create Element context menu. Once you have a «complainer» you can select it as the 'complainer' under Tags.

We'll see next how a similar extension of Comment can be used to track a JIRA issue ticket.

Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)