Top Banner
Interna l Oracle Configurator Extensions: Overview and Sample Solutions Authors - Abhijit Joshi
19
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Oracle Configurator Extensions

Internal

   

Oracle Configurator Extensions:Overview and Sample Solutions

  

Authors- Abhijit Joshi

       

Page 2: Oracle Configurator Extensions

Internal 2

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

Page 3: Oracle Configurator Extensions

Internal 3

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.

Page 4: Oracle Configurator Extensions

Internal 4

Process to create Configurator Extensions

1. Write and Compile Java Classes

2. In Configurator Developer, Create Configurator Extension Archive and upload the compiled Java Classes with ZIP format

3. Add Archive to Configurator Model’s Archive Path

4. 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. Test the functionality in Model Debugger and Runtime User Interface

6. Publish the Configurator Model

Page 5: Oracle Configurator Extensions

Internal 5

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

Page 6: Oracle Configurator Extensions

Internal 6

Configurator Extensions Archive Screenshot

Page 7: Oracle Configurator Extensions

Internal 7

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

Page 8: Oracle Configurator Extensions

Internal 8

Configurator Extensions Archive Path (Model)

Page 9: Oracle Configurator Extensions

Internal 9

Configurator Extensions Archive Path (Model) Contd.

Page 10: Oracle Configurator Extensions

Internal 10

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

Page 11: Oracle Configurator Extensions

Internal 11

Configurator Extensions Extension Rule ScreenshotRule Name – Write Attributes Soft OptionsEvent – postCXInit, postConfigSaveJava Class – oracle.apps.cz.ext.SoftOptions.WriteAttributes.java Method – initialize, afterSaveDescription – This method writes Soft Options data captured in Configurator UI to

CZ_CONFIG_ATTRIBUTES table (Configurator Descriptive Flexfield)

Page 12: Oracle Configurator Extensions

Internal 12

Configurator Extensions Extension Rule Screenshot Contd.

Page 13: Oracle Configurator Extensions

Internal 13

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

Page 14: Oracle Configurator Extensions

Internal 14

Event Group

Extension Execution

Component Instance

Custom Command

Session

Value-Related

Means of Activation

Configurator Extension initialized or terminatede.g.: postCXInit, preCXTerminate

Component instance is created, added, deleted, made editable or non editable, or when the component instance name is changede.g.: postInstanceAdd, postInstanceLoad

Execution of a custom-defined commande.g.: onCommand

Session initialization, termination, or summarye.g.: postConfigInit, preConfigSave

Validation after CIO transactions or after the value of a node changese.g.: postValueChange

Configurator Extensions Event Examples

Page 15: Oracle Configurator Extensions

Internal 15

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

Page 16: Oracle Configurator Extensions

Internal 16

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)

Page 17: Oracle Configurator Extensions

Internal 17

Configurator Extensions Examples: 1

Desired Functionality: Trigger a calculation when a custom button is clickedRule Name – Query Data ExtensionEvent – onCommand (This automatically creates a Button in Configurator UI)Java Class – oracle.apps.cz.ext.SoftOptions.CustomDataMethod – QueryDataDescription- This method queries Custom Table to return valid value for a TextFeature

Code : Click on the following

Querydata.java

Page 18: Oracle Configurator Extensions

Internal 18

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 ChangesNode - UC27 MODEL.Page 1.FrameEvent - postValueChangeJava Class – oracle.apps.cz.ext.SoftOptions.CustomDataMethod – clearFieldsDescription – This method clears a TextFeature (KVA) if Frame Field Changes

Code : Click on the following

Clearfields.java

Page 19: Oracle Configurator Extensions

Internal 19

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 oracle.apps.cz.* and attach it through the Project Setting Option.