Refresh Taskflow region from page.


Refresh ADF taskflow region is a common use case in most of the ADF applications. There are few ways to refresh taskflow using programmatic approach and declarative approach.

Using ADF internal API to refresh taskflow region is one of the anti pattern and oracle is not recommending to use this approach.

I am big fan of declarative approach and that saves development  time and easy for code maintenance.

I would recommend below declarative approach to refresh/reinitialize ADF taskflows.

1. Create a variable called "myViewTFRefreshFlag" in base page's page definition under executables --> variables with boolean type and default value="false".


 

2. Create  an attribute definition value under bindings using "myViewTFRefreshFlag" variable.



3. Open your taskflow and create an input parameter called "refreshFlag" with 'Boolean' type.



4.  Drag and drop your taskflow in base page and change refresh property to "ifNeeded" from page definition.



5. Trigger taskflow refresh action from your page using button or link by changing the value of "myViewTFRefreshFlag1" attribute using af:setPropertyListener.




Download application here