Pages

Monday, March 11, 2013

Taskflow Template usage For Navigation


This post is about usage of taskflow template for handling navigation. Whenever I google about taskflow template, the links available used to show the exceptionHandling done through taskflow template. Wondered about other scenarios where Taskflow Template can be used. Here goes one sample for taskflow template usage.

Consider the following usecase :

Taskflow has multiple pageFragments and  other taskflow call activity. Then how to handle return from the taskflow and enter proper pageFragment or taskflow.


Each pageFragment includes another reusable pageFragment "navigation.jsff " to have links available to navigate across functionality. Sample Fragment Code :



Here goes the sample for navigation.jsff -



Now user is inside view1 of tf1 and click on ViewPersonPolicy link. One way of defining navigation is all taskflows has taskflow return activities (outcome = next action string ) defined so that it returns from the taskflow (tf1 ) and enters proper taskflow as requested.

Here comes the usage of taskflow template. Define all taskflow return activities with proper outcome in template then generate tf1, tf2, and tf3 based on that template . On clicking of any link in navigation.jsff proper taskflow return activity will be used to exit which has outcome for the requested pagefragment.

You will get more idea after looking at the application code available for download here.


DataControl Scope Shared across tabs in dynamic Tab Shell


This post is about illustration of dataControl scope sharing across tabs when using dynamic tab shell template. If you are new to dynamic tab shell template, refer to below two links : -

Dynamic Tabs UI Shell Template Functional UI Pattern ->
http://www.oracle.com/technetwork/developer-tools/adf/uishell-093084.html

A Template with Behaviour By Frank Nimphius->
http://www.oracle.com/technetwork/issue-archive/2012/12-mar/o22adf-1518265.html

What happens when you try to open multiple taskflows ( Having dataControl scope marked as shared ) in different tabs - It gets shared across tabs also.


Download the application and modify database connection to point to your HR Schema.

1. Run the First.jspx. Click on "Start First Activity". Select any department.



2. Now Click on "". You see the row currency is maintained across tabs. Both the taskflows has their datacontrol scope shared.



Try selecting the departments in one taskflow and then open the second taskflow in another tab. You will see that the same department is selected in the departments table.

Sample application can be downloaded from here.