Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel Product Administration Guide > Siebel Configurator Scripts > Siebel Configurator Script Events and Methods > BatchRequest MethodThis method is used to stack multiple configuration requests into a single request, improves performance because it is not necessary to initialize the constraint engine for each request. For example, when a user exits Siebel Configurator, you want to automatically add items A, B, remove item C and set attribute values for newly added items A and B. Without the BatchRequest method, the constraint engine is called for each configuration request such as AddItem, RemoveItem and SetAttribute. With the BatchRequest method, you can write a script that makes a single call to the constraint engine to compute the solution, which improves performance. SyntaxBatchRequest (InputArgs, OutputArgs) ExampleThis example shows one way that you can use batch request. It assumes the product is set up as follows:
The following script adds 10 red short sleeve shirts along with 10 matching hats and 15 blue short sleeve shirts along with one matching duffel bag function Cfg_InstInitialize (RootProduct) var parentPropset = TheApplication().NewPropertySet(); var outPropset = TheApplication().NewPropertySet(); var childPropset1 = TheApplication().NewPropertySet(); var childPropset2 = TheApplication().NewPropertySet(); var childPropset3 = TheApplication().NewPropertySet(); var childPropset4 = TheApplication().NewPropertySet(); var childPropset5 = TheApplication().NewPropertySet(); var childPropset6 = TheApplication().NewPropertySet(); var childPropset7 = TheApplication().NewPropertySet(); childPropset1.SetProperty("RequestType", "AddItem"); childPropset1.SetProperty("OutItemAlias","RedShirtAlias"); childPropset1.SetProperty("Parent Path","$.[T-Shirt]#1"); childPropset1.SetProperty("PortName","Team T-Shirt"); childPropset1.SetProperty("Name","Short sleeve shirt"); childPropset1.SetProperty("Quantity","10"); parentPropset.AddChild(childPropset1); childPropset2.SetProperty("RequestType","SetAttribute"); childPropset2.SetProperty("ItemAlias","RedShirtAlias"); // picks particular instance //childPropset2.SetProperty("Path","$.[T-Shirt]#1.[Team T-Shirt]#[Short sleeve shirt]"); // picks random instance childPropset2.SetProperty("Name","Color"); childPropset2.SetProperty("Value","Red"); parentPropset.AddChild(childPropset2); childPropset3.SetProperty("RequestType", "AddItem"); childPropset3.SetProperty("ItemAlias","RedShirtAlias"); // picks particular instance //childPropset3.SetProperty("Parent Path","$.[T-Shirt]#1.[Team T-Shirt]#[Short sleeve shirt] "); // picks random instance childPropset3.SetProperty("PortName","Accessories"); childPropset3.SetProperty("Name","Matching Hat"); childPropset3.SetProperty("Quantity","10"); parentPropset.AddChild(childPropset3); childPropset4.SetProperty("RequestType", "AddItem"); childPropset4.SetProperty("OutItemAlias","BlueShirtAlias"); childPropset4.SetProperty("Parent Path","$.[T-Shirt]#1"); childPropset4.SetProperty("PortName","Team T-Shirt"); childPropset4.SetProperty("Name","Short sleeve shirt"); childPropset4.SetProperty("Quantity","15"); parentPropset.AddChild(childPropset4); childPropset5.SetProperty("RequestType","SetAttribute"); childPropset5.SetProperty("ItemAlias","BlueShirtAlias"); // picks particular instance //childPropset5.SetProperty("Path","$.[T-Shirt]#1.[Team T-Shirt]#[Short sleeve shirt]"); // picks random instance childPropset5.SetProperty("Name","Color"); childPropset5.SetProperty("Value","Blue"); parentPropset.AddChild(childPropset5); childPropset6.SetProperty("RequestType", "AddItem"); childPropset6.SetProperty("ItemAlias","BlueShirtAlias"); // picks particular instance //childPropset6.SetProperty("Parent Path","$.[T-Shirt]#1.[Team T-Shirt]#[Short sleeve shirt] "); // picks random instance childPropset6.SetProperty("OutItemAlias","BlueDuffelBag"); childPropset6.SetProperty("PortName","Accessories"); childPropset6.SetProperty("Name","Matching Bag"); childPropset6.SetProperty("Quantity","1"); parentPropset.AddChild(childPropset6); childPropset7.SetProperty("RequestType","SetAttribute"); childPropset7.SetProperty("ItemAlias","BlueDuffelBag"); // picks particular instance //childPropset7.SetProperty("Path","$.[T-Shirt]#1.[Team T-Shirt]#[Short sleeve shirt].[Accessories]#[Matching Bag]") // picks random instance childPropset7.SetProperty("Name","Type"); childPropset7.SetProperty("Value","Duffel"); parentPropset.AddChild(childPropset7); |
![]() ![]() |
Siebel Product Administration Guide | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |