Product Administration Guide > Siebel Configurator API Reference > API to Validate Customizable Products >

BatchValidate Method


There are three options for using this method:

  • LoadInstance option where the instance is already loaded in the context service. This is for validating an existing quote, order, agreement, or asset. A workflow step to load the instance into the context service should be done before calling BatchValidate.
  • LoadInstance option where the BatchValidate API will handle loading the instance into the context service. This is for validating an existing quote, order, agreement, or asset. The instance does not have to be in the context service already.
  • SetInstance option. This option allows the user to pass in the customizable product instance as a property set.
Input Arguments
  • Mode. Quote, Order, Agreement, or Asset.
  • IntObjName. The name of the integration object specified in Oracle's Siebel Tools (for example, 7.7 Quote Integration Object, 7.7 Order Entry Integration Object, 7.7 Asset Integration Object, 7.7 Service Agreement Integration Object, SIS OM Asset, SIS OM Quote, SIS OM Order).
  • ProductId. The unique identifier of the product. This ID is required when using Siebel Configurator with remote enabled.
  • ObjId. The unique identifier of the complex object header (for example, Quote Id, Asset Id, Order Id).). This is optional if the SetInstance option is used.
  • RootId. The unique identifier of the complex object root (for example, Quote Line Item Id, when Mode = Asset, Obj Id and Root Id point to Asset Id). This is optional if the SetInstance option is used.
  • InstanceName. The name of the instance being pushed to the context service. The value of this argument should be a) the name of the instance in the context service if using Option 1, b) empty if using Option 2, c) optional for Option 3.
  • SetInstance. (Optional) Specifies whether to use the SetInstance or LoadInstance option. Value can be Y or N. If set to Y, the first child property set of the input argument should be the CP instance being validated in its property set representation form. N by default.
  • DetailedExpl. (Optional) Specifies whether to return a detailed explanation if there is a conflict. Value can be Y or N. N by default.
  • AutoSync. (Optional) Specifies whether to sync changes back to db. Value can be Y or N. N by default.
  • DisablePricing. (Optional) Specifies whether to do pricing or not. Value can be Y or N. N by default.
  • OutOriginalInstance. (Optional) Specifies whether to return the original instance as a property set. Value can be Y or N. Y by default.
  • OutCompletedInstance. (Optional) Specifies whether to return the validated instance as a property set. Value can be Y or N. Y by default.
  • OutDelta. (Optional) Specifies whether to return a delta quote representing the difference between the original and validated instance as a property set. Value can be Y or N. Y by default.
  • IgnoreNewOptionalAttr (Optional). Specifies whether to ignore Optional Attributes. If the value is Y, then the output status is Valid even if optional attributes are omitted. If the value is not Y, then the status is Incomplete and an error message is displayed if optional attributes are omitted.
Output

The output of BatchValidate is a Siebel Message containing:

  • Batch Validation Status. This property returns the status of BatchValidate. The return values can be:
    • Valid. No violations were found.
    • Invalid. The engine has found and corrected errors. The engine returns Invalid only if it can make a clear decision about how to correct the errors, which is the case for:
      • All violations of the maximum quantity where the engine detects unnecessary child products and deleting these child products brings the quantity below the maximum.
    • All violations of the minimum quantity where the there is only one child product (that is, Domain = Product or Domain = Class/Dynamic Class where the domain has one product as a member). Incomplete. The engine does not have enough information to correct errors. This is true of violations of the minimum quantity where the there is more than one child product that can be used to correct the error.
  • Original Instance. A property set representation of the original instance being validated.
  • Completed Instance. A property set representation of the validated instance.
  • DeltaQuote. A property set representation of the difference between the original instance and the completed instance.
  • Generic Info. A property set containing generics and children relationship information for all ports. For example, batch validate the following three children as part of a parent product:

    Parent prod

    Child prod 1

    Child prod 2

    Child prod 3

    The generic information in batch validate output is as follows:

    <Generic_spcInfo>

    <<_6SIA-4HSO8 _6SIA-4HQ0M="01" _6SIA-4HQ0L="01" _6SIA-4HQ0K="01" />

    <<_6SIA-4HSR5 />

    <<_6SIA-4HSR6 />

    <<_6SIA-4HSR7 />

    where:

    • 6SIA-4HSO8 is the order line item ROW_ID of the Parent Product.
    • 6SIA-4HQ0M, 6SIA-4HQ0L, 6SIA-4HQ0K are the relationship ROW_IDs for the child products.

      The code mapped against the relationship ROW_ID's indicates whether the relationship has generics and children.

    • When 1st bit is set, relationship has generics
    • When 2nd bit is set, relationship has children

      for example:

    • 01. no generics, has children
    • 11. has generics, has children

      Use this code to determine minimum cardinality violations.

  • MissingRequiredAttr. A property set returning required attribute violations.
  • Error Message. A property set containing the error messages, if any, encountered during batch validation.

NOTE:  Eligibility & Compatibility is automatically enforced by BatchValidate based on the EligibilityDisplayMode parameter setting on Object Manager. There is no additional parameter needed to enforce eligibility and compatibility during batch validate.

In addition, if PRESERVE_ENGINE_AND_USER_PICKS environment variable is enabled, the value in the CFG_STATE_CD column will affect the Batch Validate result. The PRESERVE_ENGINE_AND_USER_PICKS environment variable is enabled by default for Siebel CRM version 8.1 and later.

For information about the user pick and engine pick setting in CFG_STATE_CD column, see 477087.1 (Doc ID) on My Oracle Support. This document was previously published as Siebel Alert 749.

Reset CFG_STATE_CD for all line items and attributes to user pick or leave empty if you want to preserve the content in the input instance.

Sample Code

The following code is an example of how BatchValidate can be used.

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)

{

if (MethodName == "BatchValidate_Quote")

{

var head = "8SIA-81CQ4"; //QuoteId

var item = "8SIA-81CVG"; // Line Item Id

var io = "7.7 Quote Integration Object"; // Integration Object

var s = TheApplication().GetService("Remote Complex Object Instance Service");

var inp = TheApplication().NewPropertySet();

var out = TheApplication().NewPropertySet();

inp.SetProperty("Mode","Quote");

inp.SetProperty("IntObjName", io);

inp.SetProperty("ObjId",head);

inp.SetProperty("RootId",item);

inp.SetProperty("DetailedExpl","Y");

s.InvokeMethod("BatchValidate",inp,out);

var s2 = TheApplication().GetService("EAI XML Write to File");

var inp2 = TheApplication().NewPropertySet();

var out2 = TheApplication().NewPropertySet();

inp2.SetProperty("FileName","c:\\ab.xml");

inp2.AddChild(out);

s2. InvokeMethod("WritePropSet", inp2, out2);

TheApplication().RaiseErrorText("Finished ...");

}

Product Administration Guide Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.