406 total views, 1 views today

ADF Bounded Task Flow – Return Activity

Return activity is an activity in the bounded task flow, where a bounded task flow completes its control flow and return the control to the caller. We can use the RETURN activity only within the bounded task flow. In this post, a bounded task flow BTF1 is calling another bounded Task Flow BTF2 using action command. The BTF2 return backs to the caller BTF1 using the RETURN activity. The following image represents the example

053016_2330_ADFBoundedT1 ADF Bounded Task Flow – Return Activity Example

The following icon represents the RETURN activity in the bounded task flow

053016_2330_ADFBoundedT2 ADF Bounded Task Flow – Return Activity Example

Let’s begin the process,

Pre-Requisite

JDeveloper 12C

1. Create an ADF application.

A) Open JDeveloper >> Click File >> New >> Application >> Select ADF Fusion Web Application

053016_2330_ADFBoundedT3 ADF Bounded Task Flow – Return Activity Example

B) Name it ‘AppReturnDemo‘ >> Click Finish

053016_2330_ADFBoundedT4 ADF Bounded Task Flow – Return Activity Example

2. Create bounded and unbounded task flows

A) Expand the ViewController >> WebContent >> Right click on the WEB-INF >> Click New >> Select ADF Task Flow

053016_2330_ADFBoundedT5 ADF Bounded Task Flow – Return Activity Example

B) Name it task-flow-definition.xml >> Click Ok

053016_2330_ADFBoundedT6 ADF Bounded Task Flow – Return Activity Example

C) Drag and Drop a View from component >> rename it as home

053016_2330_ADFBoundedT7 ADF Bounded Task Flow – Return Activity Example

D) Create another Task Flow by Right click on the Web-INF >> Click New >> Select ADF Task Flow

053016_2330_ADFBoundedT8 ADF Bounded Task Flow – Return Activity Example

E) Name it task-flow-definition1.xml >> Click Ok

053016_2330_ADFBoundedT9 ADF Bounded Task Flow – Return Activity Example

F) Open the task-flow-definition.xml >> Drop the task-flow-deiniction1.xml inside the view >> Using the control flow case, Drag an line from home to task-flow-definition1 >> Edit the line toBTF

053016_2330_ADFBoundedT10 ADF Bounded Task Flow – Return Activity Example

G) Double click on the home in task-flow-definition.xml >> Name it home.jsff >> Click Ok

053016_2330_ADFBoundedT11 ADF Bounded Task Flow – Return Activity Example

H) Open the home.jsff >> Drop an outputText >> edit the Value as ‘Homepage inside Bounded Task Flow’

053016_2330_ADFBoundedT12 ADF Bounded Task Flow – Return Activity Example

I) Drop a command button from the component

053016_2330_ADFBoundedT13 ADF Bounded Task Flow – Return Activity Example

J) Select the commandButton >> Open the properties >> Change the Application Action to toBTF

053016_2330_ADFBoundedT14 ADF Bounded Task Flow – Return Activity Example

K) Create a JSF page by Right click on the WEB-INF >> Click New >> Click Page

053016_2330_ADFBoundedT15 ADF Bounded Task Flow – Return Activity Example

L) Name it ContainsTaskFlow.jsf >> Click Ok

053016_2330_ADFBoundedT16 ADF Bounded Task Flow – Return Activity Example

M) The jsf file Containstaskflow.jsf will get opened on the JDeveloper >> Click the source tab >> Drop the task-flow-description.xml inside
the form tag >> Select Region

053016_2330_ADFBoundedT17 ADF Bounded Task Flow – Return Activity Example

N) The ContainsTaskFlow.jsf will look like below

053016_2330_ADFBoundedT18 ADF Bounded Task Flow – Return Activity Example

3. Call another bounded task flow that uses RETURN activity

A) Open the task-flow-description1.xml >> Drop a view and name it Another >> Drop a Task Flow Return >>
Using Control Case Flow, drag a line from Another to the return activity >> Name the line as toCaller

053016_2330_ADFBoundedT19 ADF Bounded Task Flow – Return Activity Example

B) Double click on the Another >> Name it Another.jsff >> Click Ok

053016_2330_ADFBoundedT20 ADF Bounded Task Flow – Return Activity Example

C) Open the Another.jsff file >> Drop a command button from the component panel >> Change the Application action to toCaller

053016_2330_ADFBoundedT21 ADF Bounded Task Flow – Return Activity Example

D) Create a JSF File by right click on the WEB Content >>> Click New >> Select Page

053016_2330_ADFBoundedT22 ADF Bounded Task Flow – Return Activity Example

E) Name it index.jsf

053016_2330_ADFBoundedT23 ADF Bounded Task Flow – Return Activity Example

F) Open the adfc-config.xml file

053016_2330_ADFBoundedT24 ADF Bounded Task Flow – Return Activity Example

G) Drop the index.jsf and containsTaskFlow..jsf file

053016_2330_ADFBoundedT25 ADF Bounded Task Flow – Return Activity Example

H) Using Control Flow Case >> Drag a line from index to ContainsTaskFLow >> Edit it toTaskFLow

053016_2330_ADFBoundedT26 ADF Bounded Task Flow – Return Activity Example

I) Open the index.jsf file >> Click on the source tab >> Drop a command button from the components >> Edit the value to Call taskflow >> Chang the action to toTaskFlow

053016_2330_ADFBoundedT27 ADF Bounded Task Flow – Return Activity Example

4. Run and test the application

A) Right-click on the index.jsf file >> Click Run

It prompt for WebLogic configuration >> Input the details and click Start if not configured already

053016_2330_ADFBoundedT28 ADF Bounded Task Flow – Return Activity Example

Just for remember the Flow

053016_2330_ADFBoundedT29 ADF Bounded Task Flow – Return Activity Example

B) The index.jsf will get loaded on the browser >> Click the button Call Taskflow. It will load the ContainsTaskflow.jsf page, that has home.jsff

053016_2330_ADFBoundedT30 ADF Bounded Task Flow – Return Activity Example

Click the button >> It will load Another.jsff file

053016_2330_ADFBoundedT31 ADF Bounded Task Flow – Return Activity Example

C) Click the button to Caller >> It will automatically return the control to the caller

053016_2330_ADFBoundedT32 ADF Bounded Task Flow – Return Activity Example

D) The following page will get loaded because it was the caller

053016_2330_ADFBoundedT33 ADF Bounded Task Flow – Return Activity Example

053016_2330_ADFBoundedT34 ADF Bounded Task Flow – Return Activity Example

govindan ADF Bounded Task Flow – Return Activity Example
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
govindan ADF Bounded Task Flow – Return Activity Example
Connect me
Like us on Facebook.
Connect!