Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel Product Administration Guide > Creating Validation Rules for Customizable Products > About Creating Custom Rule Checkers > PreValidate MethodThe PreValidate method determines the list of fields and attributes that the rules checker requires and returns them to the Compound Product Validation Engine. It may optionally use the product Id to retrieve product specific data related to the rule, or other parameters that may influence the list of fields and attributes. ExampleThe Port Over-Subscription Checker business service checks that the sum of the bandwidths of the connections going into or out of a node does not exceed the bandwidth of the node. The checker has two parameters that specify the name of the Bandwidth attribute of the Node product and the name of the bandwidth of the Connection product. The rules checker requires the Network Element Type, Product Name, Node and To Node fields and the Bandwidth attributes to evaluate the rule. The method returns a property set of type Field and a property set of type Attribute containing the list of fields and attributes required by the rules checker. NOTE: This sample code is provided for instructional purposes only. Different code may be needed, depending on how your application is configured. This sample script contains some fields that may not be present in your application, because they are only available in Siebel Industry Applications. function PreValidate (Inputs, Outputs) var productId = Inputs.GetProperty("Product Id"); // Retrieve the rules checker specific parameters for (var i = 0; i < Inputs.GetChildCount(); i++) var child = Inputs.GetChild(i); throw "Unknown argument: " + child.GetType(); throw "Missing input argument 'Parameter'"; var connectionAttrib = parameter.GetProperty("Connection Attribute"); var nodeAttrib = parameter.GetProperty("Node Attribute"); // Define the fields used by this rules checker var field = TheApplication().NewPropertySet(); field.SetProperty("Network Element Type", ""); field.SetProperty("Product Name", ""); field.SetProperty("Node", ""); field.SetProperty("To Node", ""); // Define the attributes used by this rules checker var attribute = TheApplication().NewPropertySet(); attribute.SetType("Attribute"); attribute.SetProperty(connectionAttrib, ""); attribute.SetProperty(nodeAttrib, ""); // Return the required fields and attributes Related Topic |
![]() ![]() |
Siebel Product Administration Guide | Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |