Applying ADF Task Flow

Posted by in Blog | January 11, 2012

We have been using Oracle ADF Framework to develop applications since the version 10g. ADF Task Flow was introduced in version 11. In 10g version we can only use one large task flow for navigation between pages (like in JSF application).
How to switch to the ADF Task Flow after we have somehow got used to control execution of action in pageDef files or managed-beans and how much they have helped us in the work, read below.

The most basic thing we often need is to open the page in insert mode. We used to execute this by using invokeAction in pageDef file and setting of an attribute RefreshCondition.
Using ADF Task Flow enables us to quickly see all the processes on one page. It is better after that to separate page in a separate task flow and, prior to opening page, add default activity that calls CreateInsert method.

However, nothing is ever that easy.

The existing application contains menu in page template and if we call page that is part of a separate bounded task flow, it is impossible to open another page using the menu because we enter the new task flow that does not contain actions we call from the menu. Those actions are contained in the unbounded task flow.

We can find a solution on this web page: http://marianne-horsch-adf.blogspot.com/2011/02/how-to-fix-menu-item-navigation-when.html.

This solution is not simple and quick so it might be better to use the old solution or to create fragments for current pages which we add to them as regions.

ADF Task Flows are much more useful in cases when we need to display different data on the same page dependent on the user role.  Without Task Flows, we would probably solve that problem by creating several tables based on several view objects. They would be adapted to user role and then rendered depending on it.

It would be too complex to use a number of view criteria and manage them using pageDef file. Because of that, we use ADF Task Flows. Before opening the page (the page contains only one table and only one view object), we apply view criteria dependent on user role.

At the moment, the task flow does not look too complicated but in the course of development there were a lot of changes. Task Flow made ​​it easy to remember how everything works. We could have easily changed the execution flow or deleted conditions that were not needed.

Also, one of the ADF Task Flow features is reuse.

We use certain task flows based on fragments on a number of pages, for example wizards for adding new users is on the users’ page but also on dashboard page.  Creating wizards is much easier using ADF Task Flows and train components. We can easily guide users through the necessary steps to execute some processes.

Task flow allows us to easily manage some processes, but not everything runs smooth.

What gives us the most trouble is the refresh of region that contains task flow. To activate a region you can use activation and active attribute for task-flow binding in pageDef file. Active attribute is dependent on a session scope or pageFlowScope variable that is set to true at the time of opening the popup window and when closing the popup window it is set to false.

More on this in another blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>