Product Administration Guide > Customizable Product Scripts >

Understanding Script Processing


Several events control script processing:

To write a script, you open the Script Designer and select a customizable product. You then either choose whether to write an event script, or a declarations script. Scripts in the declarations area 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 variables from the first script execution are not available.

Figure 16 shows when each event occurs during a configuration session. The Cfg_Instinitialize event occurs at the beginning of the configuration session. When the user picks an item, a new solution is generated and new baselines are set. Then the Cfg_On_Conflict event is called if there is conflict. Otherwise the Cfg_ChildItemChanged, Cfg_ItemChanged, and Cfg_AttributeChanged events are called. When the user clicks Save, Done, or updates the quote, the Cfg_InstPostSynchronize event is called.

Figure 16. Order of Event Processing

Click for full size image


 Product Administration Guide, Version 7.5 
 Published: 18 April 2003