You can customize the default severity levels (such as debug, info, warning, error, fatal) by creating new and and additional levels. For this you must edit the SeverityKind Enumeration element, located in the UML Standard Profile. We do not recommend changing the UML Standard Profile. To customize severity levels After you create the custom severity level or modify the default severity, you can select it from from the drop-down list of the Severity property when specifying the validation rule properties. In the following figure the new severity level named critical can be selected as a value of the Severity property in the Specification window of validation rule (Constraint element). The value order in the Severity drop-down list is the same as they are listed in the SeverityKind Enumeration element. To edit the UML Standard Profile You can create new or modify default severity levels only if the UML Standard Profile is editable. To see how to edit the profile read the procedure above. Each Enumeration Literal created for the Enumeration element corresponds to available severity levels. To modify default severity levels (Enumeration Literals) On the right side of the Specification window, select severity level from the list: Severity levels are listed in ascending order according to severity importance. - Click the Clone button to create the same severity level. The Specification window of newly created Enumeration Literal opens. Type its unique name. To create a new severity level (Enumeration Literal) Click Close. You can define a different icon for a custom or default severity levels (Enumeration Literals). For this, you must create a new stereotype and specify its Icon and Metaclass properties. To define a new icon for the severity level (Enumeration Literals) After you define the new icon for severity level, you can apply it to custom or default severity levels (Enumeration Literals). This icon is shown when representing invalid elements of your model. To apply a new icon to a severity level
The custom severity level named critical in the drop-down list of the Severity property in the validation rule specification.Editing the UML Standard Profile
The UML Standard Profile is now editable.Creating new or modifying default severity levels
- Click to open Specification window.
- Click the Up/Down button to move the severity level up/down in the list.
- Click the Delete button to remove the selected severity level from the model.
The default severity levels are modified.
The new severity level is created and can be modified by using buttons.Defining new icon for severity level
- Select the Icon property value, click to select an image from the Image Library, or to select an image from your file system.
- Select the Metaclass property value, click and select EnumerationLiteral.
The new stereotype with a new icon is created and ready to be applied to a severity level. How to apply it >>Applying new icon for severity level
The new icon for the severity level is applied. In the figure below, the criticalIcon stereotype is applied to the new critical EnumerationLiteral element.