Application Module Extension in Oracle Application R12

Posted by Manoj Madhusoodanan on Oracle Blogs See other posts from Oracle Blogs or by Manoj Madhusoodanan
Published on Sun, 24 Jun 2012 14:23:03 +0000 Indexed on 2012/06/24 15:20 UTC
Read the original article Hit count: 280

Filed under:

In this blog I will describe how to Extend Application Module.I will explain this based on my previous blog PL/SQL based EO.

 I want to extend FndUserAM to add a procedure to raise a custom business event when the FND_USER has created successfully.

Here I am using a custom business event "xxcust.oracle.apps.demo_event". Please find the code used in Business Event.

Table

Package

Following steps needs to perform.

1) Download all files pertaining to "Entity Object Based on PL/SQL" to JDEV_USER_HOME/myprojects and JDEV_USER_HOME/myclasses.If you want to see the content of source java file decompile it and save it in JDEV_USER_HOME/myprojects.

2) Create XXFndUserAM as follows.

3) Add following method to XXFndUserAMImpl.

   import oracle.apps.fnd.framework.OAException;
   import oracle.apps.fnd.framework.server.OADBTransactionImpl;
   import oracle.apps.fnd.wf.bes.BusinessEvent;
   import oracle.apps.fnd.wf.bes.BusinessEventException;

   import java.sql.Connection;

    public void raiseEvent(String userName) {
        String eventName = "xxcust.oracle.apps.demo_event";
        String eventKey = userName;
        Connection conn = ((OADBTransactionImpl)getOADBTransaction()).getJdbcConnection();
         BusinessEvent event = null;
         try{
             event = new BusinessEvent(eventName, eventKey);

             /* Setting Parameters */
             event.setStringProperty("USER_NAME",userName);
             event.setStringProperty("STATUS","User has created sucessfully");
             event.raise(conn);
             }
             catch (BusinessEventException e) {
                 throw new OAException("Exception occured when invoking web service - "+e.getMessage());
             }
             getOADBTransaction().commit();
    }

4) Create a controller which extends from xxcust.oracle.apps.fnd.user.webui.CreateFndUserCO.Call raiseEvent method from new controller.

5) Create substitution for FndUserAM.

6) Migrate following files to $JAVA_TOP.

xxcustom.oracle.apps.fnd.user.server.FndUserAMImpl.java
xxcustom.oracle.apps.fnd.user.server.XXFndUserAM.xml
xxcustom.oracle.apps.fnd.user.webui.XXCreateFndUserCO.java

8) Migrate the substitution.

9) Restart the server.

10) Personalize the page /xxcust/oracle/apps/fnd/user/webuiCreateFndUserPG and set the new controller.

11) Verify the substitution has properly applied by clicking About the Page.

12) Access the page and create a user.

You can the the result of the Business Event.


© Oracle Blogs or respective owner

Related posts about /Apps