Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

Prasad Bhogle
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

Configurator Extensions

About this white paper

This paper will talk about extending Oracle Configurator functionality by using extensions/programs written using JAVA language. This makes it mandatory for a developer to have knowledge of CORE Java. Before reading this white paper, make sure you have read through articles 1-3 on Oracle Configurator on this website.

We will be discussing about writing these java extensions and using them in Configurator Extension Rules. Using Configurator extensions we can perform additional validations, defaulting of certain values etc. This white paper will talk about things which are generally required in Oracle Configurator Development and not the complicated stuff which is given in Oracle Configurator Guides as it keeps developers away thinking that extensions too difficult to understand.

Overview of Configurator Extensions

Configurator Extensions extend your runtime Oracle Configurator by attaching custom code through established interfaces. These extensions are written using JAVA Language.

The term Configurator Extension includes the following:

  • A Configurator Extension class is the Java class containing the methods that implement desired behavior
  • A Configurator Extension instance is the event-driven execution (the Java object) of the Java class at runtime
  • A Configurator Extension Rule is the set of arrangements that you Oracle Configurator Developer to associate the CX class to a Model

Installation Requirements for Developing Configurator Extensions

  • The latest version of Oracle JDeveloper
  • The latest patch release of JDK 1.4.2 for your platform

The Configuration Interface Object

Before writing Configurator extensions it is important to understand Configuration Interface Object .The Configuration Interface Object (CIO) is an API (application programming interface) that provides programs access to the Model used by a runtime Oracle Configurator,

The CIO is a top-level configuration server. The CIO is responsible for creating, saving and destroying objects representing configurations, which themselves contain objects representing Models, Components, Features, Options, Totals and Resources.

The Oracle Configuration Interface Object is written in Java, and implemented as the Java package oracle.apps.cz.cio. To use the functionality of the CIO you must import classes from this package. All Configurator objects are represented as java class e.g

Object Name

Java Class

Component

oracle.apps.cz.cio.Component

TextFeature

oracle.apps.cz.cio.TextFeature

OptionFeature

oracle.apps.cz.cio.OptionFeature

Option

oracle.apps.cz.cio.Option

BooleanFeature

oracle.apps.cz.cio.BooleanFeature

Totals

oracle.apps.cz.cio.Total

Resource

oracle.apps.cz.cio.Resource

To use this CIO objects we need to have package oracle.apps.cz.cio in classpath. You can copy the $JAVA_TOP/oracle/cz directory to desktop local directory C:\Prasad\CZ_Extension\oracle\cz and add C:\Prasad\CZ_Extension in Local JDeveloper Class Path. The java code should import these classes before using it as shown below:

package xxcz.oracle.apps.cz.extension;

import oracle.apps.cz.cio.Component;

import oracle.apps.cz.cio.TextFeature;

import oracle.apps.cz.cio.OptionFeature;

import oracle.apps.cz.cio.BooleanFeature;

import oracle.apps.cz.cio.Total;

import oracle.apps.cz.cio.Resource;

public class SampleExtension {

public SampleExtension() {

}

public void setDefaultTextValue(TextFeature CustomerItem){

try {

CustomerItem.setTextValue("Hello");

} catch (Exception e){

}

}

}

Using SQL in Configurator Extensions

With Configurator extension code, we can connect to Oracle E-Business Suite Database and perform DML actions. This is done by using java.sql package. To achieve this the import section of java extension should be as follows:

import java.sql.PreparedStatement;

import oracle.apps.cz.cio.*;

import oracle.apps.cz.cio.CIO;

import oracle.apps.cz.cio.IRuntimeNode;

import java.sql.Connection;

import java.sql.SQLException;

import java.sql.ResultSet;

import java.sql.Statement;

Within Java Configurator Runtime there is no need to write statements to connect to Oracle using JDBC as we can get handle to Connection Object as follows:

SQL Statements

public void queryData (TextFeature CustomerItem){

try {

String sql = "Select SEGMENT1 from MTL_SYSTEM_ITEMS_B ";

Connection conn = ((IRuntimeNode)CustomerItem).getConfiguration().getContext().getJDBCConnection();

Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);

ResultSet rset = stmt.executeQuery(sql);

while(rset.next()) {

}

}catch(Exception e){

}

}

Reading value for Configurator objects

public void readObjectData(TextFeature textItem,
OptionFeature optionItem,
BooleanFeature booleanItem
){
try {
String textItemData = textItem.getTextValue();
String optionItemData = ((Option)optionItem.getSelectedOption()).getName();
double booleanItemData = booleanItem.getValue();
if (booleanItemData >= 1.0){
//True
}else{
//false
}
}catch(Exception e){
}

Displaying Information OR Error Messages related to Validation

<<Import Section>>
import oracle.apps.cz.cio.*;

<<Code Section>>

public void showMessage(OptionFeature sampleFeature)
{
String msg1 = "This is Sample Log Message";
InformationalMessage imsg1 = new InformationalMessage(msg1,frame);
sampleFeature.getConfiguration().addInformationalMessage(imsg1);
}


Selecting/De-Selecting Option Feature

public void SetOptionValues (OptionFeature currentFeature,String currentValue)
{
//Set selected options within the model
try{
((Option)currentFeature.getChildByName(currentValue)).select();
}catch( Exception e) {
}
}


public void deSelectField (OptionFeature currentField){
if (currentField.getSelectedOption() != null){
try {
currentField.getSelectedOption().deselect();
} catch (Exception e){
}
}
}

Capturing Additional Information (Non-BOM Information) in Configurator

We can capture additional information for a given configuration by defining Configurator Descriptive Flexfield. This data is stored in CZ_CONFIG_ATTRIBUTES table. You can refer to Oracle Configurator Methodologies Guide to get the code of WriteAttributes.java and Attributes.java and use it as a part of your project. These java classes are used to write captured data in CZ_CONFIG_ATTRIBUTES table.

Setting Up Configuration Extension Rules

  • Build the java classes you have developed and create a zip file with complete class directory.
  • Please note this zip file (e.g. xxcz.zip should have the complete directory structure i.e. xxcz/oracle/apps/cz/ext.
  • Create a Configuration ExtensionArchive in Oracle Configurator Developer
a1
  • Specify the JAVA Class Jar/Zip file
  • Assign this newly created Configurator Extension Archive to your MODEL
 
a5
After Selecting the necessary archive the General Tab for given Model will look like

a7

Create Configurator Extension Rules

Creating Configurator Extension Rule is a multi-step process viz.
  • Create Rule
  • Choose Model Node
  • Choose Java Class
  • Create Binding-Binding is assigning methods in selected to java class to specific configurator events. Events are similar to triggers in forms. There events which are used frequently are as follows:
    • OnCommand- Creates a Push Button in User Interface and java method gets executed after clicking the button
    • postValueChange- Similar to when validate item in forms i.e. whenever value of selected object changes this event will fire
    • postConfigSave- This event will get fire after saving the configuration. e.g. writeattributes.class is attached whenever we need to save Configurator DFF information
    • OnInstanceLoad- Initialize variables
While creating binding you will see only those Model Nodes which as having same type as java method arguments/parameters. e.g. if java method has OptionFeature as parameter then Oracle Configurator Developer will allow only OptionFeature type of nodes to be selected in binding.
EventScope can be Global,Base Node or Base Node Subtree. This is similar to form level, block level and item level triggers in Oracle Forms. e.g. postValue Change event is selected for
  • If Eventscope is Global then any object is Configurator instance changes, this event will fire.
  • If its Eventscope is Base Node then any item with Base Model Node of Rule changes then a given event will fire.
  • If Base Node Subtree event scope is selected then event will fire only for selected node and its sub-nodes.
 

Some more important points:

  • Every time an event fire, configurator runtime creates a new instance of Java class and calls individual methods. So we cannot use global/class level variables.
  • We can use Static variables which are bit dangerous as one value shared/modified by various instances of java class.

Conclusion:

I hope this article would have given you a breif idea about how to write configurator extension in Java. We can use these to for validation e.g by using postValueChange Event etc. With this we can plug-in any business logic to validate the configuration.


Prasad Bhogle

Comments   

+1 #1 Sam Daniel 2008-06-15 06:27
Hello Prasad,

The article is a really good one. i need one information on Configurator Extensions and rules migrations. If i have about 1000 Rules, what is the easilest method to import the CX's and Rules and avoid creating manually. Kindly let me know if there is any process.

Regar ds,
Sam.
Quote
+1 #2 Josphin Chellappa 2008-07-08 02:43
Hi,

All your articles pertaining to configurator was very good and very useful.

This is the first time I work on Configurator module.

I feel, it would be better if u give a live example of a Configurator from the start (creating an item) to the end (Publishing the configurator)
Quote
0 #3 ManSa 2008-07-10 02:50
Can you please tell me, why Configurator Developer is unable to publish the User Interface & product rules from owning Oracle instance to another Oracle instance. The moment i publish it to remote instance it cuts off the local connection. Can u pls suggest is there any other way to accomplish this.
Quote
0 #4 shatagni 2008-07-10 06:20
Hi
The iformation which is u given is very good. I am working on configurator module i need to import the data to confgurator tables. i didnt find any API for that. Could you please advice me how we can do the data population to configurator tables. This configurator we are creating from Quote form.

Thanks
S hatagni
Quote
0 #5 Vikram simha 2008-08-11 10:43
Hi Prasad,

My company is trying to configurate ERP system and couple of custom applications. Can you please advice on this and help me with this. My e-mail address is
Quote
0 #6 Maan 2008-09-17 01:14
Hi
I am working on a project and that requires that we create a custom form /screen using JDev and take some inputs(gas components and concentrations) from the user.Then according to the inputs we conduct validations and get the required result(gas mixture) from the database.Now for this Gas mixture we will be having a BOM created ,so now we want the CONFIGURATOR UI to open so that we can apply rules on the BOM model being retrived from the previous validations.
To do this i actually want to know if it is possible to call configurator UI from a JDEV UI screen .And if it is possible what are the APIs used for it.
Quote
0 #7 Khalid Odeh 2008-09-23 14:16
Thanks for good articles, I want you help and consultancy in Oracle Configurator ASAP.
Please send me your contact so I can call you.

Regards,
Quote
0 #8 Sudheer Ravikanti 2008-11-03 07:19
Hi Prasad,

Your article is very good.

We have few requirements from Customer on the version 11.5.9

• Develop a prototype that imports our Model Structure and Rules Master into OCD.

• Evaluate an Oracle base model, supporting functional companions and database impacts to develop recommendations that improve system performance. Develop applicable technical specifications.

• Evaluate instance management framework to develop recommendations that improve ability to manage change control while minimizing redundant master data.

Any best practices pertaining to the above 3 requirement would be very helpful
Quote
0 #9 aVishnu 2008-11-11 08:40
Hi Prasad,

The articles on Oracle Configurator are really helpful. I am trying to understand more on the Single Model Migration part in 11.5.10. Can you please help. Can contact me at

thanks,
V
Quote
0 #10 Kapil S 2009-06-29 12:09
Hi,
I have an extension tht gets kicked in when a new config gets saved.
This part works fine from the config screen while creating bom, here we are inserting error messages in a debug table for testing..

But when our another customization which gets node values from a legacy modifies and saves the configuration from Order Management Module (extension again gets kicked in here!!) but our debug messages are not inserted. CZ & APPS both have rights on our table.

Are we missing something do we have to put a java file or jar file again somewhere??
Quote
0 #11 Disha Sathye 2009-08-29 10:55
I have a configurator extension in place, which defaults some nodes based on the common data form in Sales Order.
Now I am trying to default multiple types of nodes like the Boolean Feature, Integer Feature, Option Feature, etc.
The problem is, after defaulting the values of any one type, i.e., Boolean, Integer or Option, the call ends abruptly. No error,
exception is raised. It simply moves to the next level to do the defaulting. None of the function calls are getting completed
succe ssfully. Can you figure out why this may be happening?
Quote
0 #12 Gokul King 2009-09-29 17:54
If a model has both products and services can R12 product configurtor support it?
Quote
-1 #13 Test 2010-08-19 11:35
Test11111111111 111111111111111 111111111111111 111111111111111 111111111111111 111111111111
Quote
0 #14 Aaron_G 2010-08-19 11:38
Hey,

Great article, I want to ask a question -
We have attributes in the configurator that are currently created as "Option Feature", they have lots of values and are hard to maintain this way.
Is there a way to have the drop-down list of this attribute be based on an SQL query from the DB ? If so, please advise,

I would appreciate any comment,
Thanks !
Aaron
Quote
0 #15 Jayden 2010-10-09 09:24
How to restrict / show error message when the ordering qty is not x5 or x10 or x15 or x20 or x25 and so on?
Each ordering of PTO Model must be bundled of x5. Appreciate your advice, tq!
Quote
-1 #16 Saurabh Jaiswal 2010-11-02 02:58
Hi,

We have a requirement in Configurator Extension where there is an Option Feature which has 2 values "Yes" and "NO"

The minimum selection property for that OptionFeature is set to 1.

I have one method which gets fired when some temperature value changes using a rule.
The method has code to do some changes on the page including deselecting the above mentioned OptionFeature.
Now, the value whether "YES" or "NO" gets deselected and none of the options are chosen, but i am not getting the "Unsatisfied" * mark for this OptionFeature Node.

Please help with some function, i have searched the CZ Javadoc and tried many methods like
unset(), setstate(IState .LFALSE) etc....
None Worked.

Please help.

Regards
Saurabh Jaiswal
Quote
0 #17 EffieAllen 2011-06-27 16:02
When you're in uncomfortable position and have got no money to move out from that, you would have to take the home loans. Because that would aid you unquestionably. I take credit loan every single year and feel great because of that.
Quote
+1 #18 GT 2011-08-31 01:34
What? Machan? Enjoy madi
Quote
+1 #19 keXiong 2015-12-01 09:30
The picture cannot be displayed,can you send me a document for this.
Quote
0 #20 AAjofhh 2021-06-25 09:49
http://clck.ru/Vhqmh http://clck.ru/Vhqt2 http://clck.ru/VhqvQ http://clck.ru/VhqvL http://clck.ru/Vhqv8 http://clck.ru/Vhqu9 http://clck.ru/VhquK http://clck.ru/Vhqva http://clck.ru/Vhqub http://clck.ru/VhqvG http://clck.ru/VhquM http://clck.ru/VhqvS http://clck.ru/VhquR http://clck.ru/Vhqvg http://clck.ru/Vhqu3 http://clck.ru/Vhqv2 http://clck.ru/VhqvU http://clck.ru/VhquT http://clck.ru/Vhquh http://clck.ru/Vhqu5 http://clck.ru/VhquD http://clck.ru/VhquP http://clck.ru/Vhqum http://clck.ru/VhqvN http://clck.ru/VhqvC http://clck.ru/VhquX http://clck.ru/Vhqvc http://clck.ru/VhqvJ http://clck.ru/Vhquy http://clck.ru/VhqvW http://clck.ru/Vhqvi http://clck.ru/VhqvE http://clck.ru/VhquV http://clck.ru/Vhquf http://clck.ru/VhquF http://clck.ru/Vhqvk http://clck.ru/Vhqu7 http://clck.ru/VhquZ http://clck.ru/VhqvY http://clck.ru/Vhqud http://clck.ru/Vhqv6 http://clck.ru/Vhquj http://clck.ru/Vhqvn http://clck.ru/VhquB http://clck.ru/Vhqv4 http://clck.ru/VhquH http://clck.ru/Vhqve http://clck.ru/Vhquo http://clck.ru/Vhquw http://clck.ru/Vhquu http://clck.ru/Vhquq http://clck.ru/Vhqus http://clck.ru/VhqxL http://clck.ru/VhqxJ http://clck.ru/VhqxQ http://clck.ru/VhqxN http://clck.ru/VhqwK http://clck.ru/VhqxU http://clck.ru/VhqwT http://clck.ru/Vhqws http://clck.ru/VhqwF http://clck.ru/VhqxY http://clck.ru/VhqwR http://clck.ru/Vhqvv http://clck.ru/Vhqxc http://clck.ru/VhqwM http://clck.ru/Vhqwq http://clck.ru/VhqxS http://clck.ru/VhqwP http://clck.ru/VhqwH http://clck.ru/Vhqvt http://clck.ru/Vhqvz http://clck.ru/Vhqw7 http://clck.ru/VhqwD http://clck.ru/Vhqx4 http://clck.ru/Vhqwm http://clck.ru/Vhqx2 http://clck.ru/VhqxW http://clck.ru/Vhqw5 http://clck.ru/Vhqwh http://clck.ru/VhqxC http://clck.ru/Vhqw3 http://clck.ru/Vhqw9 http://clck.ru/VhqwB http://clck.ru/Vhqwu http://clck.ru/VhqwV http://clck.ru/Vhqx6 http://clck.ru/VhqwX http://clck.ru/Vhqwf http://clck.ru/Vhqwy http://clck.ru/VhqwZ http://clck.ru/Vhqwo http://clck.ru/Vhqwd http://clck.ru/Vhqwj http://clck.ru/VhqxE http://clck.ru/Vhqwb http://clck.ru/Vhqvx http://clck.ru/Vhqxa http://clck.ru/VhqxA http://clck.ru/Vhqww http://clck.ru/VhqxG http://clck.ru/Vhqx8 http://clck.ru/VhqzJ http://clck.ru/Vhqyy http://clck.ru/Vhqxe http://clck.ru/VhqyH http://clck.ru/Vhqxz http://clck.ru/Vhqys http://clck.ru/Vhqz2 http://clck.ru/Vhqy9 http://clck.ru/VhqyB http://clck.ru/Vhqyd http://clck.ru/Vhqz6 http://clck.ru/VhqyD http://clck.ru/Vhqyf http://clck.ru/Vhqy5 http://clck.ru/VhqyF http://clck.ru/VhqyM http://clck.ru/VhqyP
dfrpdzcvcxbnyep nys
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner