What is an Application Module in OA Framework?
Think of AM as a broker between your Client Activity and database activity. It also manages the state of database transaction.
Is extension of AM recommended by Oracle?
Not really, simple because doing so isn't upgrade safe.
But sometimes you are left with no choice, and also it is better to extend that customize.
Which example will I undertake to extend an Application Module?
In this instance, lets take an example of an iRecruitment Functionality.
iRecruitment [IRC] is a web facing application from Oracle. Let's say, that we wish to capture a record in some custom table when a invalid Logon attempt occurs on iRecruitment Login page. The validation for User Logon occurs in a class named VisitorAMImpl.class
This class can be found in $JAVA_TOP/oracle/apps/per/irc/candidateSelfService/server
If you decompile this class using jad, you will notice the below code
public String validateLogin(String s, String s1)
{
String s2 = null;
OracleCallableStatement oraclecallablestatement = null;
try
{
String s3 = "begin :1 := fnd_web_sec.validate_login( p_user => :2 ,p_pwd => :3 ); commit; end; ";
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getDBTransaction();
oraclecallablestatement = (OracleCallableStatement)oadbtransactionimpl.createCallableStatement(s3, 1);
We need to add extra logic, such that, if fnd_web_sec.validate_login returns N, then we either insert record into another table or raise a business event.
Note:- The new logic can be appended to the method of the parent class [as it is, without modifying original code, by using super.method() convention].
So we need to extend and substitute VisitorAMImpl.class?
Well, we can't substitute AM Implementation class, so we will need to substitute VisitorAM itself.
In the extend AM, do we need to write code for each and every method of AM Implementation class being extended?
Not really. You need to write the code for just that method for which you wish to incorporate new/additional logic.
What are the steps in brief, for doing so?
Step 1 [Optional].
Get a jad utility. This can be downloaded free. Just search on java decompiler jad. This will help you example the standard Oracle code.
Step 2. FTP all the files from $JAVA_TOP/oracle/apps/per/* to your PC and configure your PC for OA Framework development
Step 3. Create a new BC4J package in which the extension will reside.
Step 4. Note down the path and the properties of existing AM that we wish to extend
Step 5. Create a new AM, and specify the original AM being extended.
Step 6. Ensure that the properties of original AM are applicable for new AM too.
Step 7. Perform substitution. This will create a jpx file.
Step 8. Upload the jpx file into Database.
Step 9. Deploy the custom BC4J to $JAVA_TOP by FTP'ing all files.
In the Part-2[link here] of this article, I will provide steps with screenshots, to explain how Application Module can be extended in OA Framework.
written by Ramya , January 12, 2007
written by Anil Passi , January 12, 2007
.
.
You are Spot on Ramya, root AM should not be substituted. Hence in this example, I did not use the Root AM.
Thanks for sharing your experience.
Regards,
Anil Passi
written by Ramya , January 12, 2007
written by Anil Passi , April 20, 2007
Interesting question.
Indeed a site level personalization is created. However the substituted AM will be extending your original AM itself. This substitution will occur at site level. Which means your custom AM[which is substituted] will replace all instances of original AM at runtime. Hence all the five pages will retain the same new AM
The bottomline is that this substitution does not impact ONE SINGLE PAGE.
This substitution impacts all the regions that use that AM
Thanks,
Anil
written by Harjit , October 25, 2007
I need to Insert some records in a custom Table based on the Requisitions Selected for receipting ...when user Clicks Next/Express Receive on the Receiving screen in iProc .. should i just Create a new controller for this page.. or should i extend the AM .. as this process is a Worktrain consisting of three pages.
Harjit
written by Harjit , October 26, 2007
Tanks a lot for all you suggestions.
Here are a few more details about the changes i am trying to make:
1) Page that has to be changed is "IcxPorRcvSrchPG.xml" i.e. receiving page
2) We have to add a checkbox in the ResultsTableRN so that user can select the Requisitions that he wants zero items and close the PO. (against the Receipt tolerance which is 10%)
3) The PageLayoutRN on this page is having "oracle.apps.icx.por.rcv.server.ReceiveItemsAM" as its Application module. Is this the Root AM ? should i try extending this ..
4) How should i call the databases Package from the AM class that i extend.
Cheers!!
HS
written by harji , October 27, 2007
Thanks,.. will check it that way.... I am back with some more questions
-------------------------------------------------------------------------
Issue1: Can you please let me know how do i extend the VO that has been built in a Expert mode and the Query is also getting generated at run time i.e. is is not a statis query.
I need to add a column to such a VO ... how will i be able to do that? , will i have to put all the Query creation logic in my new VO and then make a complete query that will also be having my new Column.
-------------------------------------------------------------------------
Issue2: How can i create a check box in a already existing table region and take the Value of Selected/Not Selected from here .. and relate each selection to some other column of the Table (i.e. for each row selected (using my checkbox) i want to check the Value in OrderNumber Column for the same row)
What is a table Selection, how can i use it in this scenario.
Cheers !!
Harjit
Cheers!!
Harjit
written by Maggy , December 23, 2007
I'm trying extend the Standard Application Module (DocumentAM) from Oracle Purchasing, but I can't extend the validateLogin method. How can I know, if this AM is the Root AM in the page from the Application. And How can I extend this AM with the original functionality? Can I ?.
thank you.
| < Prev | Next > |
|---|







.
.
You are Spot on Ramya, root AM should not be substituted. Hence in this example, I did not use the Root AM.
Thanks for sharing your experience.
Regards,
Anil Passi