Sunday Jun 24, 2012

Application Module Extension in Oracle Application R12

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.


About



Oracle Apps Technical Consultant,Bengaluru Area

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today