About Siebel Configurator Script Processing
You can write event scripts or declarations scripts. Declarations scripts contain methods that can be called by event scripts and other declarations scripts.
A script instance is created at the beginning of the associated event and destroyed at the end of the script execution. Variables defined in the declarations section of the script are meaningful only during script execution and do not persist after the script exits. For example, if a script is called because an item has changed, its variable values do not persist. The next time an item changes and the script runs again, the values of the variables from the first script execution are not available.
The events for Siebel Product Configurator script processing are listed in the following paragraphs.
EV_CFG_INSTINITIALIZED
This event is generated once for each session after the root customizable product is instantiated and before any user requests are accepted.
It triggers the execution of Cfg_InstInitialize (RootProd) of each product present in the current solution.
The input parameter of the script is always the name of Root CP.
EV_CFG_INSTCLOSED
This event is generated once for each session after the user clicks Done to end a configuration session. After this event is generated, no further processing by the Siebel Product Configurator engine occurs.
It triggers the execution of Cfg_InstPostSynchronize(RootProd) of the root CP. The input parameter of the script is always the name of the root CP.
EV_CFG_ONCONFLICT
This event is generated when the Siebel Product Configurator engine encounters a conflict.
It triggers the execution of Cfg_OnConflict(Explanation, Resolution) of the root CP.
The input parameters of the script are:
Explanation. An input string, containing a system message explaining the conflict.
Resolution. An output string, UndoLastRequest or RemoveFailedRequests, instructing the application to undo the last changes or to make the necessary modifications to resolve the conflict and preserve the last changes.
EV_CFG_CHILDITEMSELECTED
This event is generated before the Siebel Product Configurator engine computes a new solution.
It triggers the execution of Cfg_ChildItemSelected (SelectedItem) for the root CP.
The input parameter of the script is a PropSet, containing all the products whose quantities are about to change as elements:
<SelectedItem ObjName= "objname" OldQty= "oldqty" NewQty= "newqty">
This event is generated internally after the Siebel Product Configurator engine computes a new solution when detecting EV_CFG_ITEMCHANGED. It is issued together with EV_CFG_ATTRIBUTECHANGED.
It triggers the execution of Cfg_ChildItemChanged(ChangedItem) of the root CP.
The input Parameter of the script is a PropSet, containing all the products whose quantities have changed as elements:
<ChangedItem ObjName= "objname" OldQty= "oldqty" NewQty= "newqty">
This event is generated after the Siebel Product Configurator engine computes a new solution.
It triggers the execution of Cfg_ItemChanged (ProdName, OldQty, NewQty) of each product whose quantities have changed.
The input parameters of the script are:
ProdName. The name of the product.
OldQty. The quantity prior to the request.
NewQty. The resulting quantity after the request.
EV_CFG_ATTRIBUTESELECTED
This event is generated before the Siebel Product Configurator engine computes a new solution.
It triggers the execution of Cfg_AttributeSelected(ChangedItem) of each product whose attribute values are about to change.
The input parameter of the script is a PropSet containing the changed attributes as elements:
<strObjID>
<strAttrName OldVal = "oldval" NewVal = "newval" >
<strAttrName OldVal = "oldval" NewVal = "newval" >
<strAttrName OldVal = "oldval" NewVal = "newval" >
<strObjID>
This event is generated after the Siebel Product Configurator engine computes a new solution.
It triggers the execution of Cfg_AttributeChanged(ChangedItem) of each product whose attribute values have changed.
The input parameter of the script is a PropSet containing the changed attributes as elements:
<strObjID>
<strAttrName OldVal = "oldval" NewVal = "newval" >
<strAttrName OldVal = "oldval" NewVal = "newval" >
<strAttrName OldVal = "oldval" NewVal = "newval" >
<strObjID>