Siebel Business Rules Administration Guide > Creating and Deploying Rules >

Best Practices for Creating and Deploying Rules


Table 5 provides best practices to follow when you create rules and rule modules.

Table 5. Best Practices for Creating Rules
Guideline
Explanation

Do not edit or add relations between the concepts that represent imported Siebel objects in the Concepts tree.

Your edited or added relations may not be consistent with the Siebel object model.

When a rule operates on a business component, it is not view-aware, and so it is not aware of the search specification on the business component in the view.

 

 

To restrict applicability to the current record, applicability statements must have context. That is, the leading conclusion should use a or an to reference fields, and the applicability statements must use the to reference the fields.

If a field in an applicability statement uses a or an to reference a field, then the rule engine may look for satisfaction of the statement from another record.

The following applicability construct applies the applicability statement to the current record only:

set "Description" of an opportunity to "Active"

Applicability:

if: the status of the opportunity is "Accepted"

Name rule modules to reflect the context in which they are implemented.

There may be many modules in your implementation. Structured naming makes identification more efficient.

For example, if a rule module is called by a business component runtime event, you could use the following construct for the module name:

business object_business component_event

A rule module that is called by the PreWriteRecord event for the Account business component of the Account business object is then named:

Account_Account_PreWriteRecord

In a set statement, put double quotes around the name of the field whose value is set.

For example, in the following statement, the Description field is set:

if an account does not have a contact then set "Description" of the account to "Needs a contact."

When writing a rule that makes a comparison to a quoted string, be careful to duplicate the quoted string exactly.

String comparisons in rules are case-sensitive and space-sensitive.

NOTE:  HaleyAuthority's validation of a rule (statement that the rule is understood) does not include any verification of quoted strings.

Before running a test case, you must add every example instance that is referenced in the test case to the test case.

If some example instances are not added to a test case, then you can get inconsistent test results.

For example, assume the following:

  • Example_expense is an example expense.
  • Example_expense_item is an expense item.
  • Example_expense has example_expense_item is a fact.
  • Example_expense is added as an example to sample_test_case, but example_expense_item is not added.

Your test results may be inconsistent because some statements recognize that example_expense_item exists, while others do not.

Siebel Business Rules Administration Guide Copyright © 2007, Oracle. All rights reserved.