3 Replies Latest reply on Nov 16, 2012 9:05 AM by Daniel Merchán

    Asynchronous loading of Task Flows


      Our Webcenter application allows The user has the ability to add as many task flows to a page as they desire. These task flows call web services to retrieve data which may take a while to complete. Is there anyway to load these task flows asynchronously and possibly show a loading image while the task flow is still processing?

      Would I have to use Javascript/Jquery to achieve this?

      I read that portlets render asynchronously by default, but I'm not sure I want to go through the process of converting these secured task flows to portlets, just because of the possible complexity.

      Edited by: 912202 on Nov 15, 2012 10:39 AM
        • 1. Re: Asynchronous loading of Task Flows
          Daniel Merchán

          You have to use "Activation" property of Task Flow bindings. You'll have to set Activation to conditional and set an EL Expression that returns a boolean for activate it.

          Try to follow next idea:
          - Create a boolean variable in a scope bean to manage activation (initially false). Associate this variable to activation conditional property of the Task Flow.
          - Create an ADF Phase Listener to change boolean value to true after Render phase.
          - Set Refresh property of Task Flow (in page binding like activation) to IfNeeded. It indicates to refresh every time that a property change.

          I hope this help you.


          Ref: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/taskflows_regions.htm#CHDFCHIF

          Update: It isn't a Asynchronous load, but it is solution for load page without wait all Task Flows.


          Edited by: Daniel Merchán on 15-nov-2012 22:22

          Edited by: Daniel Merchán on 15-nov-2012 22:24
          • 2. Re: Asynchronous loading of Task Flows
            Thanks for the suggestion.

            I'm just wondering if that will work in this case though, because the task flows are added to the page dynamically using the WebCenter Resource Catalog. They are not regions on a page in the normal sense, so I don't think I have access to the activation property.
            • 3. Re: Asynchronous loading of Task Flows
              Daniel Merchán

              If you are using Oracle Composer to add your Task Flows then you can do something similar, but require more work. The idea in my mind is:
              - ADF Phase Listener to change a boolean variable to "true" for activation property.
              - Change MDS pageDef for change activation properties of your Task Flows. You can achieve it with Customization Manager Task Flow (composer add-on).