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.

  1. In the header of Dev Studio, click Create > Technical > Message.

  2. On the Create form, enter values in the fields to define the context of the message.

    Options include:

    1. In the Label field, enter text that describes the purpose of the message.

    2. 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.

    3. In the Add to ruleset field, select the name and unlocked version of a ruleset that stores the message.

    4. To change the default identifier for the message, click Edit, and then provide a unique value in the Identifier field.
  3. Click Create and open to open the Message form.

  4. 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.

  5. Click the Details tab.

  6. 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}.

  7. In the Category list, select an option based on the type of information in the message and the expected response from the user.

  8. If the Category field is set to Warning, provide information that applications use to compute their compliance scores.

    1. In the Severity list, select the degree to which an application is adversely affected by the conditions that trigger the warning.

    2. In the Application Impact list, select the aspect of the application that is affected the most by the conditions that trigger the warning.

  9. Click Save.

  10. Click Actions > Preview to view your assembled message with default input parameter values.

You can use your message in validate rules, standard functions that support messages, and activities.