Forum Stats

  • 3,875,722 Users
  • 2,266,954 Discussions
  • 7,912,318 Comments

Discussions

How to pass URL query parameter as task flow input parameter in web center portal task flow

user8012501
user8012501 Member Posts: 153
edited Apr 6, 2018 10:05AM in WebCenter Portal

Experts,

I am working on "Studio Edition Version 12.2.1.2.0".

I have detail page where i am using URL query parameter as input parameter for my task flow.

When I use URL as <http:HOST:PORT/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?employeeID=4500444

i am looking at logs, I found below errors and I am using URL as

oracle.webcenter.portal.runtime.controller.PortalControllerRuntimeException: The AdfPortalController Failed to redirect to URL '/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?_afrMFO=0&_afrMFR=117&_afrWindowMode=2&employeeID=4500444&_afrMFS=0&_afrMFG=0&_afrMFH=784&_afrMFCI=0&_afrMFM=0&_afrMFDH=882&_afrMFC=8&_afrMT=screen&_afrLoop=1278586717879356&_afrMFW=1567&_afrFS=16&Adf-Window-Id=mrjdco7g&_afrMFDW=1567'.
at oracle.webcenter.portal.runtime.controller.impl.adf.AdfPortalController.redirect(AdfPortalController.java:257)
at oracle.webcenter.portal.runtime.controller.impl.PortalController.processErrors(PortalController.java:270)
at oracle.webcenter.portal.runtime.controller.impl.PortalController.init(PortalController.java:103)
at oracle.webcenter.portal.runtime.controller.impl.adf.AdfPortalController$Proxy$_$$_WeldClientProxy.init(Unknown Source)
at oracle.webcenter.portal.runtime.controller.impl.adf.PortalViewHandler.createView(PortalViewHandler.java:35)
at oracle.webcenter.portalframework.sitestructure.handler.CustomViewHandler.createView(CustomViewHandler.java:128)
at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:173)
at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:173)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:108)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:1011)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:359)

On task flow default method call i am reading that parameter and executing my criteria in the application module and using the same VO instance to drop as form on the top of the page and same VO instance i am dropping as table on the page.

Now everything working as expected in my local JDeveloper and thing looks perfectly fine. Now i have deployed these changes into portal there the form section is displaying the data but table i am not getting any data. It's returning empty rows.

I am not understanding what is missing. Default method is executing and i can see the data in the header of the page but the same instance as a table is not working. It's pointing to new application and everything is new for this task flow. Do I need to configuration anything in the webcenter protal for this new application configuration?

Any inputs are highly appreciate.

«1

Answers

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Mar 28, 2018 11:49PM

    Are you able to see employeeID value from your taskflow default method? Also please check  Refresh="ifNeeded" property from your taskflow region properties ( check your portal page definition )

    You can also include master and detail fragments into a single taskflow and pass parameters from container taskflow. Also use separate VO instances for header and details.

    Regards,

    DM

  • user8012501
    user8012501 Member Posts: 153
    edited Mar 30, 2018 10:29AM

    Thanks for the reply DM.

    I have 2 requirements:

    First : I have Search & Detail page. So I created 2 task flows and detail task flow one for search and another one for Detail. So once user click on search all the search results will come and on EmployeeID click they are redirecting to Detail page, I am passing the EmployeeID as input parameter to Detail page default method call. Everything working perfectly fine till here.

    Now 2nd requirement, user has to redirect to Detail page directly using URL Query parameter. So in the webcenter portal i have configured Search, Detail and URLDetail task flows. For URLDetail page, i used page parameter as #{param.employeeID}.

    Now when i using http:HOST:PORT/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?employeeID=4500444 page is rendering but nothing is working. I see logs as below

    oracle.webcenter.portal.runtime.controller.PortalControllerRuntimeException: The AdfPortalController Failed to redirect to URL '/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?_afrMFO=0&_afrMFR=117&_afrWindowMode=2&employeeID=4500444&_afrMFS=0&_afrMFG=0&_afrMFH=784&_afrMFCI=0&_afrMFM=0&_afrMFDH=882&_afrMFC=8&_afrMT=screen&_afrLoop=1278586717879356&_afrMFW=1567&_afrFS=16&Adf-Window-Id=mrjdco7g&_afrMFDW=1567'.

    at oracle.webcenter.portal.runtime.controller.impl.adf.AdfPortalController.redirect(AdfPortalController.java:257)

    at oracle.webcenter.portal.runtime.controller.impl.PortalController.processErrors(PortalController.java:270)

    at oracle.webcenter.portal.runtime.controller.impl.PortalController.init(PortalController.java:103)

    at oracle.webcenter.portal.runtime.controller.impl.adf.AdfPortalController$Proxy$_$$_WeldClientProxy.init(Unknown Source)

    at oracle.webcenter.portal.runtime.controller.impl.adf.PortalViewHandler.createView(PortalViewHandler.java:35)

    at oracle.webcenter.portalframework.sitestructure.handler.CustomViewHandler.createView(CustomViewHandler.java:128)

    at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:173)

    at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:173)

    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:108)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:1011)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:359)

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Mar 31, 2018 6:59AM

    It seems like employeeID param vale is not propagating to your taskflow. Please try below steps.

    1. Print your pageflowscope employeeID from your taskflow default method call activity

                   private static ADFLogger _logger = ADFLogger.createADFLogger(YourBeanName.class);

                  _logger.severe("employeeID : " + ADFContext.getCurrent().getPageFlowScope().get("INPUT_PARAM_NAME"));

    2. cross check your taskflow input param from portal.

    Kind Regads,

    DM

  • user8012501
    user8012501 Member Posts: 153
    edited Apr 1, 2018 9:26PM

    Thanks for your reply DM.

    Taskflow input parameter is coming fine. I am printing on the page it self. with #{pageFlowScope.EmployeeID}.

    Does webcenter supports URL Query parameters, like #{param.EmployeeID} as task flow input parameter?

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Apr 1, 2018 11:52PM

    Does webcenter supports URL Query parameters, like #{param.EmployeeID} as task flow input parameter?

         Ans : "Taskflow input parameter is coming fine. I am printing on the page it self. with #{pageFlowScope.EmployeeID}". So your answer lies in your statement

    Please login to your portal and try below url from browser address bar. If you are getting same behavior, please share your portal page's pagedefinition code.

    http:HOST:PORT/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?employeeID=4500444

    Kind Regards,

    DM

  • user8012501
    user8012501 Member Posts: 153
    edited Apr 2, 2018 11:22AM

    DM,

    As i mentioned in my earlier post, I can able to get back taskflow input parameter on to the page. Page is also rending but only half, the same taskflow working fine with master and detail. When i look at the logs i found below logs.

    I did similar requirement using only ADF application but not in the web center. So was wondering is the web center portal is supporting URL Query parameter as input parameter or not. If my page definition or something is wrong then my detail page also shouldn't work. Those both are working fine but this only causing the problem. Wondering what might be causing this problem.

    HOST:PORT/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?employeeID=4500444 page is rendering but nothing is working. I see logs as below

    oracle.webcenter.portal.runtime.controller.PortalControllerRuntimeException: The AdfPortalController Failed to redirect to URL '/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?_afrMFO=0&_afrMFR=117&_afrWindowMode=2&employeeID=4500444&_afrMFS=0&_afrMFG=0&_afrMFH=784&_afrMFCI=0&_afrMFM=0&_afrMFDH=882&_afrMFC=8&_afrMT=screen&_afrLoop=1278586717879356&_afrMFW=1567&_afrFS=16&Adf-Window-Id=mrjdco7g&_afrMFDW=1567'.

    at oracle.webcenter.portal.runtime.controller.impl.adf.AdfPortalController.redirect(AdfPortalController.java:257)

    at oracle.webcenter.portal.runtime.controller.impl.PortalController.processErrors(PortalController.java:270)

    at oracle.webcenter.portal.runtime.controller.impl.PortalController.init(PortalController.java:103)

    at oracle.webcenter.portal.runtime.controller.impl.adf.AdfPortalController$Proxy$_$$_WeldClientProxy.init(Unknown Source)

    at oracle.webcenter.portal.runtime.controller.impl.adf.PortalViewHandler.createView(PortalViewHandler.java:35)

    at oracle.webcenter.portalframework.sitestructure.handler.CustomViewHandler.createView(CustomViewHandler.java:128)

    at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:173)

    at javax.faces.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:173)

    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:108)

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Apr 2, 2018 11:18AM

    Hello user,

    As per my understanding, you have two taskflows, one for employee search and the other for employee details. Employee search is working as expected and you are passing employee ID from employee search page to employee detail page as URL param. Employee detail taskflow has an input parameter called EmployeeID and you are passing EmployeeID URL param value to EmployeeeID pageflowScope value. When you directly put the below url on browser you are getting blank page and above error printed on server logs.

    HOST:PORT/webcenter/portal/wfrportal/pages_xxxx/test/testurlqueryparamdetails?employeeID=4500444

    Please let me know if we both are in same page.

    Kind Regards,

    DM

  • user8012501
    user8012501 Member Posts: 153
    edited Apr 2, 2018 2:15PM

    Hi DM,

    Your understanding is almost correct but few changes

    1. Employee Search Task flow

    2. Employee Detail page --> Employee ID as task flow input parameter.

          2.1 Task flow default method call will read the input parameter and execute employee table and bring back the result on the page.

    Web center portal administration:

    1. Created new page and configured Employee search task flow

    2. Created another page and added employee detail task flow indent to Employee Search task flow and configured task flow input parameter there as #{sessionScope.EmployeeID}

    3. Created another page and added employee detail task flow again and indent in the search page. Now i have configured task flow input parameter as #{param.EmployeeID}

    I thought may be same task flow is two different input parameter might be causing, so i have created another employee detail task flow with almost same design even this one also giving the same problem.

    I am using the web center portal administration at the page information its giving the page direct URL, so i am using that URL with my environment specific host and port. Is that correct way to refer the page?

    pastedImage_0.png

  • user8012501
    user8012501 Member Posts: 153
    edited Apr 2, 2018 11:49PM

    DM I think i figure out the issue. I still testing on it, will confirm you once my test is success.

  • Dinil Mithra
    Dinil Mithra Member Posts: 351 Bronze Badge
    edited Apr 3, 2018 10:38AM

    Hello User,

    I have also created a sample application with your usecase and I'm sharing for you. Please download it from below url.

    https://ufile.io/vj6ie

    Kind Regards,

    DM

This discussion has been closed.