This declarative exception handling does not work for Web Flow internal exceptions. For this special case, we had to implement a custom one FlowHandler. handleException().
Sort of:
public class CustomFlowHandler extends AbstractFlowHandler
{
@Override
public String handleException(FlowException e, HttpServletRequest request,
HttpServletResponse response)
{
if (e instanceof FlowExecutionRestorationFailureException)
{
if (e.getCause() instanceof SnapshotNotFoundException)
{
return "serverRelative:/missingSnapshot.html";
}
}
return super.handleException(e, request, response);
}
}
And in the Spring configuration file:
<bean name="your-flow-name" class="yourpackage.CustomFlowHandler"/>
source
share