Gosu rule execution

The hierarchy of rules in PolicyCenter mirrors a decision tree that you might diagram on paper. PolicyCenter considers the rules in a very specific order, starting with the first direct child of the root. (The first direct child is the first rule immediately following the line of the rule set.) PolicyCenter moves through the hierarchy according to the following algorithm. Recursively navigating the rule tree, it processes the parent and then its children, before continuing to the next peer of the parent.

  • Start with the first rule
  • Evaluate the rule’s conditions. If true…
    • Perform the rule’s actions
    • Start evaluating the rule’s children, starting with the first one in the list.

    You are done with the rule if a) its conditions are false, or b) its conditions are true and you processed its actions and all its child rules.

  • Move to the next peer rule in the list. If there are no more peers, then the rules at the current level in the tree are complete. After running all the rules at the top level, rule execution is complete for that rule set.

    To illustrate how to use a rule hierarchy, take the business logic used to determine the type and number of forms that a certain policy requires as an example. You would probably expect to describe a series of questions to figure out in which forms are mandatory and required by each policy. For convenience, you would want to describe these questions hierarchically. For example, if you answer question #1 as No, then skip directly to question #20 because questions #2-19 only pertain if you answered #1 as Yes.

    You might go through logic similar to the following:

    • If this is a Workers’ Compensation policy, go through a list of more detailed rules for this policy line …
      • If this is the state of Washington, [done]
      • Otherwise… If this is the state of California and business is not construction-related …

        - If payroll less than $100,000[done]

        - Else, if payroll less than $1,000,000 [done]

        - Else, if payroll more than or equal to $1,000,000 [done]

      • Otherwise, consider construction-related (high hazard) rules …

        - If the number of employees less than 50 [done]

        - Else, if the number of employees less than 150 [done]

        - Else, if the number of employees greater than or equal to 150 [done]

    • If this is a BOP policy, then go through a list of more detailed rules for this policy line …
    • If all else fails [Default], use the default rule action [done]

    You can see from this example that your decision tree follows a hierarchy that maps to the way PolicyCenter keeps rules in the hierarchy. If the first rule checks whether the policy line is Workers’ Compensation, then PolicyCenter does not need to check any of the follow-up (child) rules. (That is, unless the policy is actually a Workers’ Compensation policy.)