Adding a Localized Business Rule Message

A message can display static text or dynamic text, based on the value of a variable.

Note: This option uses locales. It is not context-dependent. Contact your Stibo Systems representative to display additional language locales on your Web UI or workbench.

  1. Open the Edit Operation dialog for an existing JavaScript business rule. For more information, refer to the Editing a Business Rule or Function topic here.

In this example, we have selected a condition and are using the 'return' statement to display the message.

  1. On the Edit Operation dialog, for the Messages parameter, click the Edit button () to display the 'Edit messages' dialog.

  1. Click the Add message button () and add a variable name and the message text.

A variable message can include the name of the business rule or any other data that would be helpful in resolving the problem reported by the message.

A variable tag within the message text is optional. In this example, the tag is {size} and will return the value of the attribute from the bound product.

  1. Click the Translations flipper () to open it ().
  2. Click the Add translation button () to add the translated text. Multiple translations can be added. Do not translate variable tags.

  1. Click OK to close the 'Edit messages' dialog.
  2. On the Edit Operation dialog, for the JavaScript parameter, add JavaScript code to display the message. In this example, our business condition will use the 'return' statement.

  1. If you added a translation, test the results by logging in to the locale that matches the language for the message using workbench or the Web UI. For our example, we select the Danish locale.

  1. Test the business rule or run a workflow that uses it to display the translated message. For information, refer to the Testing a Business Rule topic here.