Sunday, May 17, 2009

Parent Action Activity in ADF Task Flow

Recently I have faced a problem, when was trying to navigate to ADF Task Flow Call activity. The problem was, that I was initiating navigation from inside the region and navigation flow was defined not in bounded region ADF Task Flow, but inside parent bounded page ADF Task Flow. This means, navigation outcome from parent ADF Task Flow was simply invisible for button I have created inside region. But as usual in most of the cases, ADF provides very elegant solution to solve problem of external navigation from inside the region. I will describe it in this post.

The problem is, that I have bounded ADF Task Flow, however main page is using region and this region can't see declared navigations from this ADF Task Flow:


Region is used on main page, this region provides table of Countries, user can select any country and navigate to Location ADF Task Flow:


And here is the answer for described problem - in order to navigate from region using navigation rule from parent ADF Task Flow, you can use Parent Action activity inside region ADF Task Flow:


Only one thing you need to do is to define parent-outcome property, or in other words - navigation outcome from parent ADF Task Flow you want to use. In my case it is child navigation outcome:


Defined parent outcome will navigate to ADF Task Flow call activity and will open locations page.

On runtime, when user will press Location button implemented in region component, navigation from parent ADF Task Flow will be triggered:


Correct list of locations is returned:


You can download sample application for this post - ADFRegionNavigation.zip.

Useful hint, when user will return to Countries table, in order to show previously selected record, set DisplayRow = selected for af:table component:

0 comments: