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?
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.
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'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.
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).