3 Replies Latest reply: Nov 18, 2011 3:02 PM by 894887 RSS

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

    894887
      Hello Friends,

      I have a strange issue and I'm unable to understand why? since it is working in my Jdeveloper flowlessly, but when I deployed into Dev instance, after launching the upload process(submit) from the main page, the control never comes back from processing page, but in the background the upload/validate process performed successfully, since I checked on the server path, newly uploaded file exists.
      For eg. PVU_FILE_20111017_141019_XXCONV.csv
      I appreciate your help, please let me know where I'm having issue?

      1. On Jdev - Processing page returning the cotrol back to main page - YES
      2. On instance - Processing page returning the cotrol back to main page - NO

      Instance Details:
      Jdev path: p8431482_R12_GENERIC
      OA Framework ver: 12.1.1


      Main Page:
      Xxsmgt_ManualDataUploadPG.xml
      Xxsmgt_ManualDataUploadCO.java

      Processing Page CO
      ValidateProcessCO.java



      ===================================================
      Main page Controller : Xxsmgt_ManualDataUploadCO
      ====================================================

      public void processFormRequest(OAPageContext pageContext,
      OAWebBean webBean) {

      if (pageContext.getParameter("Submit") != null) {
      System.out.println("Xxsmgt_ManualDataUploadCO_Submit_BEGIN ");
      BlobDomain uploadedByteStream = null;
      String uFileName = null;
      DataObject fileUploadData = null;
      OAWebBeanFileUpload uploadObj = null;
      OAApplicationModule am;
      am = pageContext.getApplicationModule(webBean);
      fileUploadData = pageContext.getNamedDataObject("FileUpload");
      uploadObj =
      (OAWebBeanFileUpload)webBean.findChildRecursive("FileUpload");
      if ((uploadObj.getValue(pageContext) == null)) {
      am.invokeMethod("clearResultsTable");
      OAException expMsg = getFileNotFoundException();
      pageContext.putDialogMessage(expMsg);
      }
      if (fileUploadData != null) {
      try {
      uFileName =
      (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
      } catch (Exception ex) {
      uFileName = null;
      am.invokeMethod("clearResultsTable");
      OAException expMsg = getFileNotFoundException();
      pageContext.putDialogMessage(expMsg);
      }
      }
      if (uFileName == null) {
      am.invokeMethod("clearResultsTable");
      OAException expMsg = getFileNotFoundException();
      pageContext.putDialogMessage(expMsg);
      }
      uploadedByteStream =
      (BlobDomain)fileUploadData.selectValue(null, uFileName);

      am.getOADBTransaction().putTransientValue("uploadedByteStream", uploadedByteStream);
      am.getOADBTransaction().putTransientValue("uFileName", uFileName);

      OAMessageChoiceBean riceObj =
      (OAMessageChoiceBean)webBean.findIndexedChildRecursive("RiceObject");
      String riceObjName =
      (String)riceObj.getSelectionValue(pageContext);

      OAMessageChoiceBean pathObj =
      (OAMessageChoiceBean)webBean.findIndexedChildRecursive("DestPath");
      String pathText = (String)pathObj.getSelectionText(pageContext);

      OAProcessingPage page =
      new OAProcessingPage("usps.oracle.apps.xxsmgt.mdu.webui.ValidateProcessCO");
      page.setApplicationModuleDefName("usps.oracle.apps.xxsmgt.mdu.server.Xxsmgt_ManulaDataUploadAM");
      page.setRetainAMValue(true);
      page.setConciseMessage("Rice Object validation [Greater than 10mb files may take long time to upload].");
      page.setDetailedMessage("Rice Object Type: [" + riceObjName +
      "] </br> File Name: [" + uFileName + "].");
      page.setProcessName("Validation process is in progress! please do not close this window.");
      pageContext.forwardToProcessingPage(page);
      System.out.println("Xxsmgt_ManualDataUploadCO_Submit_END ");
      }

      }

      ==============================================================================
      Processing Page CO
      ValidateProcessCO.java
      ===============================================================================

      public class ValidateProcessCO extends OAControllerImpl {
      public static final String RCS_ID = "$Header$";
      public static final boolean RCS_ID_RECORDED =
      VersionInfo.recordClassVersion(RCS_ID, "%packagename%");

      /**
      * Layout and page setup logic for a region.
      * @param pageContext the current OA page context
      * @param webBean the web bean corresponding to the region
      */
      public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
      super.processRequest(pageContext, webBean);
      }

      /**
      * Procedure to handle form submissions for form elements in
      * a region.
      * @param pageContext the current OA page context
      * @param webBean the web bean corresponding to the region
      */
      public void processFormRequest(OAPageContext pageContext,
      OAWebBean webBean) {
      super.processFormRequest(pageContext, webBean);

      System.out.println("Xxsmgt_ValidateProcessCO_BEGIN ");
      OAApplicationModule am;
      am = pageContext.getApplicationModule(webBean);
      BlobDomain uploadedByteStream = null;
      String uFileName = null;
      OAException exceptionMsg;

      uploadedByteStream = (BlobDomain)am.getOADBTransaction().getTransientValue("uploadedByteStream");
      uFileName = (String)am.getOADBTransaction().getTransientValue("uFileName");

      try {

      Serializable[] params = { uploadedByteStream, uFileName };
      Class classType[] = { BlobDomain.class, String.class };
      exceptionMsg =
      (OAException)am.invokeMethod("ValidateAndUpload", params,
      classType);
      } catch (Exception e) {
      exceptionMsg =
      new OAException(e.getMessage().toString(), OAException.ERROR);

      am.getOADBTransaction().removeTransientValue("uploadedByteStream");
      am.getOADBTransaction().removeTransientValue("uFileName");

      pageContext.putDialogMessage(exceptionMsg);
      pageContext.forwardImmediately("OA.jsp?page=usps/oracle/apps/xxsmgt/mdu/webui/Xxsmgt_ManualDataUploadPG",
      null,
      OAWebBeanConstants.KEEP_MENU_CONTEXT,
      null, null, true,
      OAWebBeanConstants.ADD_BREAD_CRUMB_YES);
      }

      am.getOADBTransaction().removeTransientValue("uploadedByteStream");
      am.getOADBTransaction().removeTransientValue("uFileName");

      pageContext.putDialogMessage(exceptionMsg);
      pageContext.forwardImmediately("OA.jsp?page=usps/oracle/apps/xxsmgt/mdu/webui/Xxsmgt_ManualDataUploadPG",
      null,
      OAWebBeanConstants.KEEP_MENU_CONTEXT,
      null, null, true,
      OAWebBeanConstants.ADD_BREAD_CRUMB_YES);
      System.out.println("Xxsmgt_ValidateProcessCO_END ");
      }

      Edited by: 891884 on Oct 17, 2011 1:25 PM

      Edited by: 891884 on Oct 17, 2011 1:57 PM