I created a Spring Webflow exception-handler for my application and defined it in my abstract parent flow. In this handler I add FacesMessages to display several errors in a generic way. Now i got the problem that i can't handle an exception that occures in an action-state. I try to go back to the last valid view-state or something like that (or maybe go to the start-state). Anyway, I don't want the application to crash or show a blank page.
@Override
public void handle(FlowExecutionException exception, RequestControlContext context) {
Object testState = context.getCurrentState();
if(testState instanceof ActionState){
//what to do here?
}
}
I am using Spring Webflow Version 2.3.0.RELEASE with JSF 2 on MyFaces.
Best regards, Patrick