2 Replies Latest reply: Jan 17, 2014 4:28 AM by 1065192 RSS

    Customize Oracle Workflow Approve button action

    VarunDeshmukh

      I have a requirement to add a confirmation dialog page on click of the Approve button of a Internet Expense Approval notification page.

      Like if the Expense type is of a particular type then the user must be prompted with a confirmation page. if user selects Yes then it should lead to approval and if clicks No then should come back to the Notification page where he can review the Expense Report again and proceed again for approval.

       

      Can the approval button click be customized to achieve this?

      Please help.

        • 1. Re: Customize Oracle Workflow Approve button action
          Bm

          Hi,

           

          Yes you can extend the controller of the page and handle your validation. On event of the button you can add a dialogue page which would ask the user for confirmation and then move forward if "Yes" is clicked or else "No" return back by and redirect where needed.

           

          BM

          • 2. Re: Customize Oracle Workflow Approve button action
            1065192

            Hi BM,

             

            I found the even for Approve button (pageContext.getParameter("wklEvent").equals('RR0')), but we would need to know the what are the parameters we need to pass and and what is the forwardurl for when user click the Yes button in confirmation page.  Say example  in the below code what are the parameters we would need to keep for Dialogue page and again pass into seeded process. What is the URL we need to call for when user click "Yes" butto

             

             

            public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)    {

              HashMap params = new HashMap();

              //Here what are the parameters we need to keep when user click the Yes button

             

            if(pageContext.getParameter("wklEvent").equals('RR0')){// When Approve button clkicked

              renderReqUpdateDialogPage(pageContext, params);

              }

             

             

             

              if (pageContext.getParameter("updateYesEvent") != null) {

                        pageContext.writeDiagnostics(this, "Inside updateYesEvent ",

                                                         1);

                        HashMap params = new HashMap();

                         

              pageContext.setForwardURL("OA.jsp?page=/oracle/apps/pa/webui/InvRvwProjPG",

               null,

               OAWebBeanConstants.KEEP_MENU_CONTEXT,

               null, params, true,

               OAWebBeanConstants.ADD_BREAD_CRUMB_NO,

               OAWebBeanConstants.IGNORE_MESSAGES);

                }

            }

             

             

            public void renderReqUpdateDialogPage(OAPageContext pageContext,

                                                      HashMap params) {

                    OAException mainMessage =

                        new OAException("EAP", "INV_RETURN_MSG");

                    OADialogPage dialogPage =

                        new OADialogPage(OAException.WARNING, mainMessage, null, "", "");

                    pageContext.writeDiagnostics(this,

                                                 "After OADialogPage dialogPage stmt ", 1);

                    String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);

                    String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);

                    dialogPage.setOkButtonItemName("updateYesEvent");

                    dialogPage.setOkButtonToPost(true);

                    dialogPage.setNoButtonToPost(true);

                    dialogPage.setPostToCallingPage(true);

             

             

                    dialogPage.setOkButtonLabel(yes);

                    dialogPage.setNoButtonLabel(no);

                    pageContext.redirectToDialogPage(dialogPage);

                 

             

             

            }

             

            thanks

            SS