This discussion is archived
7 Replies Latest reply: Dec 6, 2012 10:27 PM by aravindan.v RSS

Question on Forwarding from OAProcessing Page.

aravindan.v Newbie
Currently Being Moderated
Hi all,

I have a customization in which I am using OAProcessingPage to be displayed with a long running DB procedure call in the processFormRequest.

The DB procedure takes about 8 minutes to complete. I am able to see the changes in the DB and a successful exit from the DB procedure. however, the page seems to be stuck in the OAProcessingPage itself, instead of moving back to another page as coded in the controller.

Page A calls the OAProcessingPage and in the processFormRequest of OAProcessingPage I have mentioned a forwardImmediately call to page A. I had also put some debug messages on the controllers of both the pages. I could see that the control returns to Page A, ie. The processRequest method Page A has got executed after returning from OAProcessingPage. However, the page has not got refreshed.

The session timeout profile option is 30 mins and hence I believe this is not because the session timed out. Could anybody throw some light on this? Please let me know if any more information is required.
  • 1. Re: Question on Forwarding from OAProcessing Page.
    Sushant Sharma Expert
    Currently Being Moderated
    Hi,

    Refer below threads:

    Re: Processing Page Error
    Please Urgent: OAF Processing page control never returns to main page!!!

    --Sushant                                                                                                                                                                                                                                                                                                                                                                                       
  • 2. Re: Question on Forwarding from OAProcessing Page.
    aravindan.v Newbie
    Currently Being Moderated
    Hi Sushant,

    Thanks for the reply. Unfortunately, my issue is a quite different from the suggested forum questions.

    1. I am able to run the code from Jdev, without any issues.
    2. I am able to run the page after deploying to instance and in cases when the DB procedure completes early (under 3 minutes ) the main page gets displayed without issues.
    3. The issue occurs only in case the DB procedure takes a long time (in my case about 6 to 8 mins).

    As I had mentioned earlier, the page forward from Processing Page to the main Page occurs successfully. This, I can confirm from the debug message that I put in the process request of the main page. But the screen is still stuck with the OA processing page. Any idea why this fails only in case of long running processes?

    My understanding is that if control comes to the ProcessRequest of the page, it means the page is getting loaded newly and so will get refreshed on the browser too. Am I missing something here?

    Thanks,
    Aravindan.
  • 3. Re: Question on Forwarding from OAProcessing Page.
    aravindan.v Newbie
    Currently Being Moderated
    Hi all,

    Could any one help me out with this?

    Thanks,
    Aravindan.
  • 4. Re: Question on Forwarding from OAProcessing Page.
    shreevat Pro
    Currently Being Moderated
    Can you post your code (both - call to processing page and the call back to main page)?

    Thanks
    Shree
  • 5. Re: Question on Forwarding from OAProcessing Page.
    aravindan.v Newbie
    Currently Being Moderated
    This is the code:

    In the Main Page: Call to OA Processing Page

    DataObject fileUploadData =
    pageContext.getNamedDataObject("bpaUploadFile");
    if (fileUploadData != null) {
    OAProcessingPage processPage =
    new OAProcessingPage("oracle.apps.xxpo.bpa.upload.webui.XxPoBpaProcessCO");
    processPage.setConciseMessage("BPA Validation Process Monitor.");
    processPage.setDetailedMessage("BPA Validation Process currently Running. Please wait ... ");
    processPage.setProcessName("BPA Validation");
    pageContext.putSessionValueDirect("pFileData", fileUploadData);

    pageContext.forwardToProcessingPage(processPage);

    }

    In the OAProcessigPage: ProcessFormRequest:

    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    {
    super.processFormRequest(pageContext, webBean);
    DBTransaction dbtxn = pageContext.getApplicationModule(webBean).getOADBTransaction();
    HttpSession httpSession = pageContext.getRenderingContext().getHttpSession();
    System.out.println("httpSession : inactive interval in Processing PG "+httpSession.getMaxInactiveInterval());
    System.out.println("Inside Process CO Process Form Request");
    try{     
    String message = uploadBpaFile(pageContext, webBean);
    System.out.println("After Calling uploadBpaFile");
    if(isEmpty(message))
    {
    pageContext.putDialogMessage(new OAException("Template data has been validated with below results",
    OAException.CONFIRMATION));
    XxPoBpaUploadAMImpl am = (XxPoBpaUploadAMImpl)pageContext.getApplicationModule(webBean);

    Object SessionUploadIdObj = pageContext.getSessionValue("UploadIdRef");
    String SessionUploadId = null;
    if (SessionUploadIdObj != null)
    SessionUploadId = SessionUploadIdObj.toString();
    Serializable[] parameters = { SessionUploadId };
    System.out.println(" SessionUploadId "+SessionUploadId);
    System.out.println("Before Calling xxValidateControlFile");
    am.invokeMethod("xxValidateControlFile", parameters);
    System.out.println("After Calling xxValidateControlFile");
    }
    else{
    System.out.println("Message Not Empty : message : "+message);
    }
    }
    catch(OAException e)
    {
    pageContext.putDialogMessage(e);
    pageContext.forwardImmediately("XX_BPA_UPLOAD",
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES);
    }
    System.out.println("Before Calling forwardImmediately");
    pageContext.forwardImmediately("XX_BPA_UPLOAD",
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES);

    }

    Some more information:

    1. XX_BPA_UPLOAD - the registered function name for the main page
    2. In the processRequest of the main page, I had put an SOP. In case of the long running DB procedure, I could see the SOP string, in the instance's standard output stream file. That means that forwardImmediately happens successfully and the main page's processRequest is also being called. However, the browser screen is still showing the dreaded ticking clock!

    Thanks,
    Aravindan.
  • 6. Re: Question on Forwarding from OAProcessing Page.
    aravindan.v Newbie
    Currently Being Moderated
    Hi all,

    I've been doing some tests on this by creating a simple page that forwards to OAProcessingPage and calls the dbms_lock.sleep procedure. What I could see is that if I have the sleep time as 5 minutes, ie 300 seconds, the page refreshes back to main page after completing 5 minutes. For any value beyond 300 seconds, the page is not refreshed, although the processRequest of the main page is getting executed.

    I would like to know if there is any value in the server configuration that sets the session time out? I mean anything other than the ICX_SESSION_TIMEOUT profile option value. As this value is set to 30 minutes and I believe this is not the value that is affecting the page refresh.

    Any help on this will be appreciated.

    thanks,
    Aravindan.
  • 7. Re: Question on Forwarding from OAProcessing Page.
    aravindan.v Newbie
    Currently Being Moderated
    There is a configuration on Apache that controls this timeout. this was set to 5 minutes and hence we were facing the issue.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points