Oracle Configurator Extensions:
Overview and Sample Solutions
Authors
- Abhijit Joshi
Internal
Functional Companions and Configurator Extensions
Prior to Oracle EBS Release 11.5.10, Functional Companions were used for custom functionalities in Configurator Oracle has introduced Configurator Extensions in Release 11.5.10 which replaced Functional Companions Configurator Extensions are referred with short name CX CX definitions are stored in the database
Easier to update code changes No need to bounce the middle-tier Easier to publish models
In short, Configurator Extensions are Java code that you write to perform functions that go beyond the functionality and Configurator Rules that Oracle Configurator Developer provides out of the box
Internal
Introduction of Configurator Extensions
Configurator Extensions extend the runtime Oracle Configurator with custom code through established interfaces Configurator Extension includes the following:
Class, which is the compiled Java code that implements the desired behavior, is developed outside Configurator Developer and then inserted into the CZ schema in the form of a Configurator Extension Archive Instance, which is the event-driven execution of the Java binary class at runtime Rule, to associate the Configurator Extension Class with a Configurator Model. This includes bindings between method parameters in the Java class and elements of the Model.
Internal 3
Process to create Configurator Extensions
1. 2. 3. 4. Write and Compile Java Classes In Configurator Developer, Create Configurator Extension Archive and upload the compiled Java Classes with ZIP format Add Archive to Configurator Model s Archive Path Create Configurator Extension Rule:
Associate Model Node and Class from Archive Path Associate Event and Class method Bind Method Arguments to specific Model Parameters
5. 6. Test the functionality in Model Debugger and Runtime User Interface Publish the Configurator Model
Internal
Configurator Extensions Archive
Configurator Extension Archive
Is an object in Repository Contains one or more compiled Java classes that might be used in Configurator Extension Rules Must be added to a Model s Archive Path in order to be used in a Configurator Extension Rule in that Model Can be attached in multiple Models Archive Paths Is available to parent Models that reference the Model Class Files in zip format are stored in a table CZ_ARCHIVES
Internal 5
Configurator Extensions Archive Screenshot
Internal
Configurator Extensions Archive Path
Configurator Extension Archive Path is
A setting for a Model that lists the Configurator Extension Archives to be used for Configurator Extension Rules defined in that Model A list whose order determines the order in which the Archives are searched at runtime for the Java classes that implement Configurator Extensions Like a Java class path for the Configurator Extension Rules defined in a Model With Model References, the parent Model's Archive Path is available to every referenced child Model's Archive Path
Internal 7
Configurator Extensions Archive Path (Model)
Internal
Configurator Extensions Archive Path (Model) Contd.
Internal
Configurator Extensions Rule
Configurator Extension Rule associates
A Base Node in the Model containing the rule A Java class in a Configurator Extension Archive An Instantiation Scope, for instantiable components One or more event bindings, which associate an event with a Java method with specified arguments
Internal
10
Configurator Extensions Extension Rule Screenshot
Rule Name Write Attributes Soft Options Event postCXInit, postConfigSave Java Class [Link] Method initialize, afterSave Description This method writes Soft Options data captured in Configurator UI to CZ_CONFIG_ATTRIBUTES table (Configurator Descriptive Flexfield)
Internal
11
Configurator Extensions Extension Rule Screenshot Contd.
Internal
12
Configurator Extensions Event
An event is something that occurs during a runtime configuration session, such a change in the value of a node. Events have names, such as postValueChange Every Configurator Extension Rule is triggered by an event in the runtime configuration session
Event bindings in a Configurator Extension Rule bind a configuration event to a method in the CX class A CX Rule can contain multiple event bindings, for different events and different methods An event binding specifies the information to be sent from the Model to the CX, the Argument Bindings
At runtime, Oracle Configurator signals configuration events. When one occurs, this runs all methods bound to that event if the binding is in scope
Internal
13
Configurator Extensions Event Examples
Event Group
Extension Execution
Means of Activation
Configurator Extension initialized or terminated e.g.: postCXInit, preCXTerminate Component instance is created, added, deleted, made editable or non editable, or when the component instance name is changed e.g.: postInstanceAdd, postInstanceLoad Execution of a custom-defined command e.g.: onCommand Session initialization, termination, or summary e.g.: postConfigInit, preConfigSave Validation after CIO transactions or after the value of a node changes e.g.: postValueChange
Component Instance
Custom Command
Session
Value-Related
Internal
14
Configurator Extensions Event Scopes
Scope is used to control when an extension is invoked Every Event Binding has one of three possible Scopes
Global (Anywhere in the runtime tree of the current configuration instance) Base Node (Only on the node bound to the Configurator Extension Rule) Base Node and Subtree (On the node bound to the Configurator Extension Rule and all its descendants)
The scope on an event binding specifies if it should be interested in a specific event being signaled by the Configurator
Internal
15
Configurator Extensions Argument Binding
There are four types of Bindings
System Parameter (e.g. Base Node of Rule, CX Event, Configuration) Event Parameter (e.g. changed node for postValueChange) Model Node or Property (e.g. Node in CZ Model or its property) Literal (e.g. Character string)
Internal
16
Configurator Extensions Examples: 1
Desired Functionality: Trigger a calculation when a custom button is clicked
Rule Name Query Data Extension Event onCommand (This automatically creates a Button in Configurator UI) Java Class [Link] Method QueryData Description- This method queries Custom Table to return valid value for a TextFeature
Code : Click on the following
[Link]
Internal
17
Configurator Extensions Examples: 2
Desired Functionality: Clear selections in certain node(s )based on selection change in one or more node(s)
Rule Name - Clear Field For Frame Field Changes Node - UC27 [Link] [Link] Event - postValueChange Java Class [Link] Method clearFields Description This method clears a TextFeature (KVA) if Frame Field Changes
Code : Click on the following
[Link]
Internal
18
Configurator Extensions: Tips for Developers
Bind all the CZ nodes used in JAVA method as parameters to the method for getting or setting data on the nodes Use class ConfigTransaction to begin a transaction for modifying value or state of CZ Nodes Always commit or rollback the ConfigTransaction to refresh the state of CZ nodes after completion of CX Rule. Handle the exceptions and use class InformationalMessage to show messages on Configurator UI Use Jdeveloper to write the JAVA class and make a jar file of [Link].* and attach it through the Project Setting Option.
Internal
19