ADF Task Flow Exception Handler – Example
This section we walk through about handling ADF task flow exception. I have created an ADF task flow with a ‘view activity’ which calls a method action called ‘ Exception Handler‘ throws a JBP Exception. There is another method action called ‘handle Exception‘ in the same task flow which handles exception
Download ADFExceptionHandler
ADF Task Flow Exception Handler – Started
1. In my ViewController, I have created a Java class with the following two methods. One will throw an exception and other handles the exception
2. Right click on the Java class and select “Create Data Control”. It will expose the two above two methods to data controller
3. Created an ADF Bounded task flow with a view activity and the two exposed Java methods. Drop the two exposed methods from data control palette to the task flow and make the connection like below
4. Right click on the HandleException and mark this activity as Exception handler
5. Finally, the task flow will become like this
6. Double click on the view1 activity to create a jsff page. Add a command button and make the action point to toException
7. We are done. Create a JSF page and add this bounded task flow as a region activity and run the page
8. The page loads on the browser. Clicking on the button will show the popup message about the exception
No comments:
Post a Comment