Monday, June 17, 2019

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

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
080816_0416_ADFtaskflow2 ADF task flow exception handler - Example
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
080816_0416_ADFtaskflow3 ADF task flow exception handler - Example
4. Right click on the HandleException and mark this activity as Exception handler
080816_0416_ADFtaskflow4 ADF task flow exception handler - Example
5. Finally, the task flow will become like this
080816_0416_ADFtaskflow5 ADF task flow exception handler - Example
6. Double click on the view1 activity to create a jsff page. Add a command button  and make the action point to toException
080816_0416_ADFtaskflow6 ADF task flow exception handler - Example
7. We are done. Create a JSF page and add this bounded task flow as a region activity and run the page
080816_0416_ADFtaskflow7 ADF task flow exception handler - Example
8. The page loads on the browser. Clicking on the button will show the popup message about the exception
080816_0416_ADFtaskflow8 ADF task flow exception handler - Example

No comments:

Post a Comment