Creating Complex Task Flow in ADF – Part 2

In previous blog Creating Complex Task Flow in ADF – Part 1 we talked about creating bounded task flow and using ADF Train component. In this blog we will use other advanced features of ADF task flow. Such as Save Points (Explicit). It is very useful in case we need to split or delay transaction.

The Save Point capture the state of an ADF Fusion web application at a specific instance. This allows you to save application state and can be restored later.

An Explicit save point requires an end user action to enable task flow creates a save point, such as a click button. and it is available for both bounded and unbounded task flows.

I have developed sample application ComplexTaskFlow2.zip.

in ADF (12.2.1.2.0).

For implementing Save Point:

1) Preparing Task Flow to use Save Point: After creating the task flow in previous blog, Add a Method call activity to a bounded task flow to create a save point, and add Save Point Restore activity to restore application state and data associated with the created save points.

Add a task flow parameter to pass save point information for createSavePoint method.

a

2) Configuring application to use Save Point: In the Application Resources panel, Expand the Descriptors and ADF META-INF node, and open adf-config.xml.

In the overview editor, click the Controller navigation tab and then expand the Savepoints section and select the data source of data base connection:

b

A database table named ORADFCSAVPT is used to store save points information. If this database table does not exist, it is created automatically by ADF application.

3) Creating of Save Point: Use createSavePoint method to create save point and set the time to live in seconds to one month. The default value is 86400 seconds.

2

4) Restoring of Save Point: User should select the save point from a list populated programmatically then restore it by savePointRestore activity:

3.jpg

5) Removing Save Point: After the task flow’s state has been restored, Task flow invoke Save Point Restore Finalizer to execute removeSavePoint method and remove save point.

At Run time, User start registration task:

4

User click Save Later button to create save point:

14

User select save point from a list and click Restore button:

5

Task flow’s state of selected save point is restored:

666

User click Finish to save Employee registration and go back to main page.

7

Author: Ahmed Abul Khair

Senior Oracle ADF Consultant / Technical Lead

2 thoughts on “Creating Complex Task Flow in ADF – Part 2”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s