Best Practices for Groovy Scripting
Consider the following points when planning and configuring your survivorship and agreement rules using groovy scripts:
- The Rows returned by the getRows(), getNonMasters(), and getMaster() functions is a standard Groovy Script list object, not an Oracle ADF recordset object. You must use standard Groovy methods for traversing the recordset such as for (item in list) instead of ADF functions such as reset(), first(), or hasNext().
- The responses of the getRows(), getNonMasters(), or getMaster() functions are cached for each script execution. So, the data state of row objects of your scripts don't show any changes within the scope of a script execution.
- You can't access the Resolution Request header object in your survivorship scripts. The only supported means for initializing data objects in your scripts are the input functions described in this topic.
- You can interact with custom attributes and custom child objects by using the API name for the attribute or object that was specified when the custom entity was created in Application Composer.
- The script fragments provided in this topic are intended to illustrate the syntax and usage of the Input and Output functions. Refer to the Sample Scripts section for examples of complete scripts.
- Some Best Practices for writing Groovy Scripts are available in the Performance Best Practices for Using Scripts section of Performance Best Practices for Extending Oracle CX Sales and Fusion Service (Doc ID 2170121.1) on My Oracle Support: https://support.oracle.com/epmos/faces/DocumentDisplay?id=2170121.1
- The Groovy Script templates should only be used to configure Set Master. Use of these templates for general processing extension or automation isn't supported and may cause incorrect or unpredictable behavior.