ADF task flow parameter passing

This section I have described how to pass parameter from one bounded Task Flow to other. The following steps are detailed here

1. Create a bounded task flow1 (task-flow-definition1.xml) and create a string type parameter (parameter1) in that task flow.

2. Create another bounded task flow (task-flow-definition2.xml) and create a string type parameter (parameter2) in that task flow

3. create a command button in task flow1; Using ‘SetPropertyListener’ operation, set a string value to parameter1

4. Now parameter1 has a string value; Pass the parameter1 to parameter2

5. Now parameter2 got the string value; Display the value using output text component

6. Other ways to set parameter value (Programmatically & Binding)

Download Project: Application1

IDE Used:

JDeveloper 12.2.1

ADF task flow parameter passing – example

1. Create an ADF Fusion Web application: Click on File, New, Application, ADF Fusion Web Application

2. Create two bounded task flow under WEB-INF

070316_2351_Parameterpa1 ADF task flow parameter passing

3. Open the task-flow-definition1.xml, Add a view activity from the component pane and add task-flow-definition2.xml from WEB-INF. Using the control flow, create a line from view1 to task-flow2 and name the flow as toSecond.

Double click on the view1 activity and create a page view1.jsff.

070316_2351_Parameterpa2 ADF task flow parameter passing

4. Click on the Overview tab in the task-flow-definition1.xml, select Managed Beans tab and change the scope PageFLow

070316_2351_Parameterpa3 ADF task flow parameter passing

5. Select Parameters tab, Add a parameter parameter1 as Java string type. The value will be auto populated.

070316_2351_Parameterpa4 ADF task flow parameter passing

5. Open the task-flow-definition2.xml, Add a view from the component panel. Double click on the View2 and create a page view2.jsff

070316_2351_Parameterpa5 ADF task flow parameter passing

6. Click on the Overview tab, Select Managed Beans tab and change the scope to PageFlow; Click on the Parameters tab and create a parameter parameter2 as string type. The value will be auto populated.

070316_2351_Parameterpa6 ADF task flow parameter passing

7.Go to the task-flow-definition1.xml, Click on Diagram tab, Right click on the task flow and select go to properties. In the property window, select the parameter tab, pass the auto populated value of parameter1 to parameter2

070316_2351_Parameterpa7 ADF task flow parameter passing

8. Open the view1.jsff. Drop a command button to it. Drop a setPropertyListener from the component panel inside the command button. It prompts for the three parameter

From: Value of the parameter, any string value

To: The value it belongs to

Type: action

The above property tells us the value ‘Govind’ will be set to parameter1 when the button clicked

070316_2351_Parameterpa8 ADF task flow parameter passing

9. The view1.jsff is like below

 

10. Open the view2.jsff, Drop an outputText component and specify the value as parameter2. The final view.jsff will be as below

11. Create a JSF page index.jsf, Drop the task-flow-definition1xml as region activity

 

 

Run the file

The index.jsf page load on the browser. Click on the button

070316_2351_Parameterpa9 ADF task flow parameter passing

It loads the second task flow with parameter value

070316_2351_Parameterpa10 ADF task flow parameter passing

Other ways to set the Parameter value

1. Open the index.jsf file, click on tab bindings, select the task flow under Executables, Click Edit and pass the value

070316_2351_Parameterpa11 ADF task flow parameter passing

2. In the bean class, for example if there is a method call activity between the taskflow, we can set the value in that method

 

 

govindan ADF task flow parameter passing
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 task flow parameter passing
Connect me
By | 2016-12-28T17:13:20+00:00 July 3rd, 2016|Categories: ADF|Tags: , , |0 Comments
Like us on Facebook.
Connect!