Siebel Business Rules Administration Guide > Integrating Rules with Siebel Runtime Events >

Integrating Rules with a Siebel Runtime Event


You can configure a rules module to execute in response to a business component runtime event. This means of executing a rules module is useful for scenarios, such as field validation and dynamic setting of field values, in which it is not necessary to access the content in the output property set that results from calling the rule.

For a list of Siebel runtime events for which rules integration is supported, see Siebel Runtime Events Supported by Rules.

In general, business component runtime events can be categorized as pre or post. Typically, rule actions provide better performance when executed in pre runtime events instead of their corresponding post events. For example, implement a rule in PreWriteRecord instead of WriteRecord when possible.

To execute a rule module in any Siebel application scenario, the rule module must be called with the Business Rule Service business service.

You must complete the following tasks before you configure a runtime event to invoke rules:

  1. Create the rules module in HaleyAuthority
  2. Deploy the rules module from HaleyAuthority
  3. Configure and activate the rules module in the Siebel client's Administration - Business Rules screen.

For information on deploying a rules module from HaleyAuthority, see Deploying Rule Modules.

Configuring a runtime event to invoke rules consists of:

  1. Configuring an action set to invoke the Business Rule Service with appropriate rule modules
  2. Associating the action set with the appropriate runtime event

For information on configuring and activating a rules module in the Administration - Business Rules screen, see Configuring and Activating a Deployed Rules Module.

To configure a runtime event to invoke rules

  1. From the Site Map in your Siebel application, choose Administration - Runtime Events > Action Sets.
  2. In the Action Sets applet, add a new action set. Use the following guidelines to enter its fields:
    Field
    Guideline

    Name

    You may want to give this a name that contains the name of the rules module that it executes, such as Account Validation Action Set.

    Start Date / End Date

    Null by default. If null, this action set becomes active when the Active field is set to TRUE.

    If a date is set in either of these fields, it restricts the dates for which the action set is active.

    Active

    Checked (TRUE) by default. If set to TRUE, the action set is active, subject to any restrictions in the Start Date and End Date fields. If not set to TRUE, the action set is not active.

    Enable Export

    Checked (TRUE) by default.

  3. In the lower Actions applet, add a new action. In the bottom More Info form applet, use the following guidelines to enter its fields:
    Field
    Guideline

    Name

    Enter an arbitrary descriptive name.

    Action Type

    Required. Select BusService from the pick list.

    Sequence

    Required.

    • If there is more than one action in this action set, then enter integer sequence numbers in the order that you intend actions to execute.
    • If this is the only action for this action set, enter any simple integer, such as 1.

    Active

    Checked (TRUE) by default. If set to TRUE, the action is active, subject to any restrictions in the Start Date and End Date fields. If not set to TRUE, the action set is not active, even if the action set is active.

     

    Start Date / End Date

    Null by default. If null, this action becomes active when the Active field is set to TRUE.

    If a date is set in either of these fields, it restricts the dates for which the action is active, within the restrictions determined by the Start Date and End Date fields of the action set.

     

    Business Service Name

    Enter Business Rule Service (case sensitive).

    This business service executes a rules module. It is seed data in the Siebel Repository.

    Business Service Method

    Enter RunRules (case sensitive, no space).

    Business Service Context

    Enter the names of the rule modules that this action executes. To specify more than one rule module, separate their names with commas.

    NOTE:  If you specify more than one rule module, then all of the specified rule modules must have the same business object.

    Each specified rule module must be already configured and activated using the procedure To configure and activate a rules module.

  4. Click Events in the link bar. In the resulting Events applet, add a new event record to which you associate the action set you created. Use the following guidelines to enter its fields.

    For more information about implementing runtime events, see Siebel Personalization Administration Guide.

    Field
    Guideline

    Name

    Not required.

    Sequence

    Required.

    • If this is not the only event that can trigger, then provide an integer sequence number for this and other such events to define the order you intend the events to be processed.
    • If this is the only event that can trigger, then provide a simple integer sequence number, such as 1.

    Object Type

    Required. Select BusComp from the pick list.

    A HaleyAuthority rules module cannot apply to Application or Applet objects.

    Object Name

    Required. From the list of values, select the business component on which this event is triggered.

    Event

    Required. Select the applicable event from the list of values.

    Subevent

    Required for some events. For example, the SetFieldValue event requires the name of the field.

    For information about events that require entering the Subevent field, see Siebel Personalization Administration Guide.

    Conditional Expression

    Adds additional control. If the conditional expression evaluates to TRUE, then the action is triggered when the event occurs.

    Action Set Name

    Required. From the list of values, select the action set that you defined in Step 2.

  5. Save the event record.

For information about Business Rule Service argument requirements for direct and indirect calling of Business Rule Service by a runtime event, see Setting the GetMoreData Input Property and Setting the PerformAction Input Property.

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