Siebel Business Rules Administration Guide > Implementing Rules in Siebel Task-Based UI > Scenario for Using Rules to Provide Dynamic Navigation in a Siebel Task >

Testing Rule Modules


This topic is a task in the development process that is listed in Scenario for Using Rules to Provide Dynamic Navigation in a Siebel Task.

Test the rule module to confirm that it gives the expected results.

The following test uses the Business Service Administration view to test against data in an existing opportunity in the database. To confirm that the rule module assigns the correct type of quality to the opportunity, the test uses an XML file to supply the opportunity with different revenue amounts to the Business Rules Service, the prepackaged business service for making calls to the rules engine.

To test the New Lead rule module

  1. Log into the Siebel application in the same runtime environment to which you deployed the rule module.
  2. Find an existing opportunity and choose Help > About Record, then its Row Id. Also, note the revenue for this opportunity.
  3. Create an XML document with content similar to the following that includes the correct data structure to supply to the business rules service. Substitute applicable URLs and paths and the id and the revenue amount that you recorded.

    <?xml version="1.0" encoding="UTF-8"?>

    <!--Sample XML file generated by XMLSpy v2005 rel. 3 U (http://www.altova.com)-->

    <PropertySet xmlns="http://www.siebel.com/xml/BizRule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.siebel.com/xml/BizRule D:\RulesEngine\Design\Hemingway\Runtime\InputPropertySet.xsd" RuleModuleName="New Lead" GetMoreData="Y" PerformAction="Y">

       <BusCompList>

          <BusComp Name="Opportunity" Id="6-48ZVH">

          </BusComp>

       </BusCompList>

    </PropertySet>

  4. Save the file as, for example, NewLead_Input.xml where you can find it easily.
  5. If necessary, log back into the Siebel application and navigate to the Business Service Administration Screen > Business Service Test View.
  6. Create a new parent record and assign the following values:

    Service Name = Business Rule Service

    Method = RunRules

    Iterations = 1

  7. In the Input Arguments applet, click the Load From File button, select the file created in Step 3, and choose the Run on One Input button from the Simulator applet.

    An output argument record is created.

  8. Select the output argument record and click the Save to File button. When you are prompted to save the file, choose Open to show the results from the rule invocation.

    The correct evaluation should be made, depending on the revenue amount in your chosen Opportunity record. The opportunity must evaluate as Excellent, Very High, or Default, and the Quality field must be set to 1-Excellent, 2-Very High, or 3-High, respectively.

    Your output should have a similar structure to the following XML example:

    <?xml version="1.0" encoding="UTF-8" ?>

    <?Siebel-Property-Set EscapeNames="true"?>

    <PropertySet>

      <DerivationList>

        <Derivation BusCompId="6-48ZVH" BusCompName="Opportunity">

          <Value>Excellent</Value>

        </Derivation>

      </DerivationList>

      <SetFieldValueList>

        <SetFieldValue BusCompId="6-48ZVH" BusCompName="Opportunity">

          <Field Name="Quality">1-Excellent</Field>

        </SetFieldValue>

      </SetFieldValueList>

    </PropertySet>

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