Working on a WebCenter 11g Portal application, I recently ran into a challenge: when the user clicks a link in a task flow, the result of that action should be that the user is navigated to another page with a another taskflow that should display content based on context defined through the specific link that was clicked. The challenge was complicated by the fact that the taskflows had to be completely independent, of each other and of the page in which they were embedded.

The general approach with a taskflow that has a link that when clicked should result in effects outside the taskflow is to have the taskflow publish a contextual event with appropriate payload. It is then up to the page that embeds the taskflow in a region to consume and handle the event. That was the easy part.

The event handler can read the payload from the event, store values in a managed bean and navigate to the page that contains the drill-down-target-taskflow. This page has configured the input parameters for this second taskflow using EL expressions that refer to the managed bean that was populated by the event handler. Sounds straightforward, does it not?

What then is the catch in this story? It turned More >