13 total views, 3 views today

Method Call Activity in a Bounded Task Flow in ADF

A bounded task flow activity is capable of calling a bean method or an AppModule method directly inside the task flow. In this section, we have provided an example of ADF method call activity. The below image is the snapshot of the example; a view activity calls a bean method before navigating to another view.

061516_0542_MethodCallA1 ADF Method Call Activity in a Bounded Task Flow

IDE:

JDeveloper 12c

Steps

1. Create a ADF Application by Click File >> New >> Application >>ADF Fusion Web Application >> Click Ok >> Input application name >> Click Finish

061516_0542_MethodCallA2 ADF Method Call Activity in a Bounded Task Flow

2. Create a Bounded Task Flow by Expand, the view Controller >> Right click on WEB-INF >> Click New >> ADF Task Flow >> Input a TaskFLow name and Click Ok

061516_0542_MethodCallA3 ADF Method Call Activity in a Bounded Task Flow

3. Open the task flow we just created >> Drop two view activity and one method call activity from the component panel to the Task Flow

061516_0542_MethodCallA4 ADF Method Call Activity in a Bounded Task Flow

4. Select the Control Flow case in the component panel, Drag a line from View1 to methodCall1 and methodCall1to View2. Name the View1 to methodCall1 as toMethod and name the methodCall1 to view2 as toView as shown below

061516_0542_MethodCallA5 ADF Method Call Activity in a Bounded Task Flow

5. Right click on the methodCall1 activity and select Go to Properties >> Set the fixedOutcome to toView

061516_0542_MethodCallA6 ADF Method Call Activity in a Bounded Task Flow

6. Double click on the View1 activity >> Click Ok

061516_0542_MethodCallA7 ADF Method Call Activity in a Bounded Task Flow

7. Same way, Double click on the View2 >> Click Ok

061516_0542_MethodCallA8 ADF Method Call Activity in a Bounded Task Flow

8. Double click on the MethodCall1 >> Click New to create a new bean class >> Input Bean name and class name >> Select Page Flow score >> Click Ok

Note: we can choose existing class and method as well.

061516_0542_MethodCallA9 ADF Method Call Activity in a Bounded Task Flow

9. Text a method name and click Ok

061516_0542_MethodCallA10 ADF Method Call Activity in a Bounded Task Flow

10. A Java class with the method got created under the application sources >> input a print statement inside the method

061516_0542_MethodCallA11 ADF Method Call Activity in a Bounded Task Flow

11. pen the view1.jsff >> Drop a command button >> Right click on the button and select Go To Properties >> Select the Application Action to toMethod

061516_0542_MethodCallA12 ADF Method Call Activity in a Bounded Task Flow

12. Right click on the web-content >> Select Page >> Name it as index.jsf >> Click Ok

061516_0542_MethodCallA13 ADF Method Call Activity in a Bounded Task Flow

13. Open the index.jsf >> Drop the bounded task flow we created earlier into the page >> Select Region

061516_0542_MethodCallA14 ADF Method Call Activity in a Bounded Task Flow

Run the Application

1. Right-click on the index.jsf >> Select Run . The application will get deployed on the Integrated Weblogic server

2. The page will run on the browser >> Click the button

061516_0542_MethodCallA15 ADF Method Call Activity in a Bounded Task Flow

3. On clicking the button, the navigation calls the method and execute it then move to the next page; that is view2.jsff. As see in the below image, the output of the print statement is displayed in the WebLogic console.

061516_0542_MethodCallA16 ADF Method Call Activity in a Bounded Task Flow

4. After the method executed, the page moves to the view2.jsff. This is a blank page because we have not added any component in this page

061516_0542_MethodCallA17 ADF Method Call Activity in a Bounded Task Flow

govindan ADF Method Call Activity in a Bounded Task Flow
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 Method Call Activity in a Bounded Task Flow
Connect me
By | 2016-12-28T17:24:49+00:00 June 15th, 2016|Categories: ADF|Tags: , , , |0 Comments
Like us on Facebook.
Connect!