Rule structure

Every Gosu rule has the following basic syntax:

IF {some conditions}

THEN {do some actions}

Each Gosu rule divides the rule functionality into different blocks of code, with a specific label. The following table summarizes each of these parts.

Rule block

Description

USES

A list of packages or classes that this rule uses. For example:
  • uses java.util.HashSet
  • uses gw.lang.reflect.IType

CONDITION

A Boolean expression (that is, a series of questions connected by AND and OR logic that evaluates to TRUE or FALSE). For example:

(This is an auto claim) AND (the policy includes collision coverage)

It is also possible to insert a statement list, instead of a simple expression. For example:
  • var o = new HashSet<IType>() {A, B, C, ...}
  • return o.contains(typeof(...))

The CONDITION block must contain a return statement that returns a Boolean value.

ACTION

A list of actions to take. For example:

  • Mark the renewal as flagged
  • Add an activity for the underwriter to follow up

The best way to add rules to the rule set structure is to right-click in the Studio rule pane. After you do this, Studio opens a window opens containing a tree of options from which to select. As you use the right-click menu, PolicyCenter gives you access to conditions and actions that are appropriate for the type of your current rule.