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.
1. Create a ADF Application by Click File >> New >> Application >>ADF Fusion Web Application >> Click Ok >> Input application name >> Click Finish
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
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
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
5. Right click on the methodCall1 activity and select Go to Properties >> Set the fixedOutcome to toView
6. Double click on the View1 activity >> Click Ok
7. Same way, Double click on the View2 >> Click Ok
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.
9. Text a method name and click Ok
10. A Java class with the method got created under the application sources >> input a print statement inside the method
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
12. Right click on the web-content >> Select Page >> Name it as index.jsf >> Click Ok
13. Open the index.jsf >> Drop the bounded task flow we created earlier into the page >> Select Region
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
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.
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
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 🙂