then and else parts
The then and else parts introduce actions that the rule completes when an event is processed or when a condition is met.
- then
This mandatory construct introduces the part of the rule that defines the actions that are executed if the if part of a rule is satisfied. - else
This construct introduces actions that are executed if the conditions of a rule are not satisfied. - add (an object) to (a collection)
The add construct adds an item to a collection. - clear (object/collection) of (object)
The clear construct sets to null the value of an object or removes the objects of a collection. - define (variable) as (variable value)
The define construct creates a variable that you can use to perform actions on entities or events. - emit (an event)
The emit <an event> construct defines an event that the agent can emit. - new (object)
The new <object> construct creates a new instance of the specified object type. - print "(string)"
This construct logs a string, phrase, or rule name. - remove (an object) from (a list)
The remove construct removes an item from a list. - set (variable) to (value)
This construct sets the value of an entity. - set (variable) to null
The set <variable> to null construct sets the value of a variable to null. Use this construct to delete the bound entity of an agent. - for each (object) in (list)
This construct specifies the actions that must be performed for every element of a collection. - the name of this rule
This construct returns the name of the currently executed rule in the then part of a business rule.
Parent topic: Business rule language