About Adding Business Rules

You can use the trigger designer and code editors in the Business Rules tab to create business rules for your business objects.

On the Business Objects page, you use the Business Rules tab to create and edit business rules for your business objects. The rules for the selected business object are grouped under the following tabs in the Business Rules tab:

  • Object Triggers
  • Field Triggers
  • Object Validators
  • Field Validators
  • Object Functions

Each tab displays a list of the existing business rules and contains a button for creating a new rule. For each business rule, you can use the Business Rule options menu to copy and delete rules or to open the editor. You can toggle the state of a rule by selecting and deselecting the Active check box.
Description of bo-rules.png follows
Description of the illustration bo-rules.png

To add a new rule for a business object, select the object for which you want to add your rule and then open the Business Rules tab. In the Business Rules tab, open the tab for the type of rule that you want to add and click the button to create a new rule, for example, New Field Trigger. When creating a rule, you need to specify a name, and, depending on the type, you might also need to specify other rule properties.

To define validation rules and object functions, you can use a code editor to write your Groovy scripts. To create triggers, you use the trigger designer, a visual editor for creating sequences that execute actions on your business objects. For additional help on writing Groovy scripts, see the Groovy Scripting Reference.