The problem with the transmission of the exceptions in the Spring WebFlow 3
The pre-define the method throw an exception like the following:
public class MyBusinessException extends BusinessException {
private static final long serialVersionUID = -1276359772397342392L;
private Long min = null;
private Long max = null;
public static final String CODE_1 = "code.1.business.exception";
public static final String CODE_2 = "code.2.business.exception";
public MyBusinessException (String code, Exception ex) {
super(code, ex);
}
public MyBusinessException (String code) {
super(code);
}
public MyBusinessException (Long min, Long max, final String messageCode) {
super(messageCode);
this.min = min;
this.max = max;
}
public Long getMin() {
return min;
}
public Long getMax() {
return max;
}
}
The transition after the capture of an exception in webflow looks like this
<transition on-exception="MyBusinessException" to="start" >
<evaluate expression="actionService.showError(flowExecutionException)" result="flashScope.refreshError"/>
</transition>
In action showError would retrieve the message from the exception and the min and max values. How to do it. Please help.
public String showError(FlowExecutionException flowExecutionException) {
flowExecutionException.?
return "someString";
}