Creating a message
You can create a message to display text with run-time values to users. By using messages instead of static text, you can avoid maintaining a set of strings for each possible context and user locale in your application.
- In the header of Dev Studio, click .
- In the Label field, enter text that describes the purpose of the message.
- In the Apply to field, press the Down Arrow key and select the
class that defines the scope of the message. The class controls which rules the message can use. It also controls which rules can call the message.
- In the Add to ruleset field, select the name and unlocked version of a ruleset that stores the message.
- Optional: To change the default identifier for the message, click Edit, and then provide a unique value in the Identifier field.
- Click Create and open to open the Message form.
- Optional: To include run-time values in your message, define input parameters.
Do not define more than one Raw input parameter because the tab delimited items in this type can be interpreted as values for other input parameters. Always put this type of parameter in the last position of the parameter list.
For more information about input parameters, see Defining the input parameters of a rule.
- Click the Details tab.
- In the Category list, select an option based on the type of information in the message and the expected response from the user.
- Optional: If the Category field is set to Warning,
provide information that applications use to compute their compliance scores.
- In the Severity list, select the degree to which an application is adversely affected by the conditions that trigger the warning.
- In the Application Impact list, select the aspect of the application that is affected the most by the conditions that trigger the warning.
- If the Category field is set to Error, in
the Classification field, select the type of error message.The classification is required for error messages used by automations; otherwise, it is optional. To create a new classification, create a field value of type pyErrorClassification.
- In the Message field, enter the text of the message.
You can reference input parameters by using the following format:
Rule {1} was processed on the {2} thread with data from page {3}.
- Click Save.
- Click Actions > Preview to view your assembled message with default input parameter values.
Previous topic Messages Next topic Finding messages in your application