Skip to main content

OAF to ADF Integration OR EBS to ADF Integration OR Deploy ADF Page in EBS

Oracle Fusion Middleware is  demanding and very much a need of today .But there are situation or customers who still want to be in EBS but want's the advantage of Middleware functionality.
For example , customer is happy to see rich experience of ADF , but want this to be integrated with EBS. However , Oracle has developed different tools which take care of only integration.

Below is an example of integrating EBS to ADF manually without any tool.


1) Create a Page and link an OAF Controller in EBS (this will be our landing place to land on ADF).


*****Controller sample syntax************
We will write our code only in Process Request part and nothing will be required in process form request.


 public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
        logMessage(pageContext, "processRequest:STARTS");
        super.processRequest(pageContext, webBean);

        HashMap params = new HashMap();

        params.put("_userId", pageContext.getUserId());
        params.put("_sessionId", pageContext.getSessionId());
        String adfPage = pageContext.getParameter("_adfpage");

        if (adfPage != null && !adfPage.equals("")) {

            logMessage(pageContext, "adfPage value" + adfPage);
            if (adfPage.equalsIgnoreCase("PARAMETERS")) {
                params.put("_adfApp", "PARAMETERS");
                pageContext.setForwardURL("XABC_ECM_HOME", 
                                          OAWebBeanConstants.KEEP_MENU_CONTEXT, 
                                          null, params, true, 
                                          OAWebBeanConstants.ADD_BREAD_CRUMB_NO, 
                                          OAWebBeanConstants.IGNORE_MESSAGES);
            } else if (adfPage.equalsIgnoreCase("RULES")) {
                params.put("_adfApp","RULES");
                pageContext.setForwardURL("XABC_ECM_HOME", 
                                          OAWebBeanConstants.KEEP_MENU_CONTEXT, 
                                          null, params, true, 
                                          OAWebBeanConstants.ADD_BREAD_CRUMB_NO, 
                                          OAWebBeanConstants.IGNORE_MESSAGES);


******************************************************

2) Create Menu and Function

Above code will surely leave you with many queries like , what is XABC_ECM_HOME here ?
wha is PARAMETERS here ? , So let me take you to below step and see if you get the answer.

XABC_ECM_HOME is a AOL function here

with Type as 'External ADF Application'



So above XABC_ECM_HOME is a function whoch holds ADF url

I will create another function which will answer your question of the syntax
adfPage.equalsIgnoreCase("PARAMETERS")) 

Actually we had different pages in adf and they will open the function we clicked in EBS, lets say if I click PARAMETER function , it will open PARAMETER page of adf.

So it reads which function is clicked and that value defines which task of adf will be open.

So below is 1 such function created in EBS






This is a SSWA jsp function

and below is ADF Bounded task flow which basis parameter directs to another tf



3) Bean written in ADF

sample code of ADF Bean

 public String fetchHomeParam() {
        logMessages("XabciECMBean.getHome:" + "Starts");
        FacesContext fctx = FacesContext.getCurrentInstance();
        ExternalContext ectx = fctx.getExternalContext();
        //        FacesContext facesCtx = FacesContext.getCurrentInstance();
        Application app = fctx.getApplication();
        ExpressionFactory elFactory = app.getExpressionFactory();
        ELContext elContext = fctx.getELContext();
        ValueExpression ve;

        request = (HttpServletRequest)ectx.getRequest();
        response = (HttpServletResponse)ectx.getResponse();

        //Fetching URL parameters
        logMessages("USER ID:" + request.getParameter("_userId"));
        userId = Integer.parseInt(request.getParameter("_userId"));

        logMessages("SESSION ID:" + request.getParameter("_sessionId"));
        sessionId = Integer.parseInt(request.getParameter("_sessionId"));

        logMessages("ADF Application:" + request.getParameter("_adfApp"));
        adfApplication = request.getParameter("_adfApp");

        if (adfApplication.equalsIgnoreCase("LIMIT")) {
            ve = elFactory.createValueExpression(elContext, "#{sessionScope.title}", Object.class);
            ve.setValue(elContext, "Limit Definitions");
            return "LIMIT";

*********************************************************


So let me summarize , what we did.

We had different pages to be linked to ADF. for e.g a page for CAR , BIKE , BICYCLE ETC.

so we created different function for each bike, car and cycle in EBS , SSWA jsp function.
with _adfPage = 'CAR' OR _adfpage = 'BIKE' as parameter in Function definition 

secondly we created a function which lands to ADF, lets say this page as VEHICLE.

In controller we wrote , if parameter value = CAR , set forward url to VEHICLE PAGE with value appended as CAR.


Now we reached adf with value as car , in adf again we wrote a code , if it is car , then direct to task flow car..


This is my First Blog.

Please share your advise , feedback ....Please its a humble request.


Comments

Post a Comment