Hello Everybody,
I'm using Spring WebFlow 2.3.0, and I'm trying to implement correctly an Exception Handling (and as you guess, I need you help).
There is the context of my application :
- I have a JEE backed with different Server which share a Server Library.
On each server I have several flows which start usually with an <on-start>. For example :
If requestParameters.aParam is null, I will get an exception that says : map is <empty> could not map null... or something like that. (It's produced when the client come back after a session ending).<?xml version="1.0" encoding="UTF-8"?>
<flow
xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<on-start>
<set name="conversationScope.param1" value="mySpringBean.transformParam(requestParamete rs.aParam)" />
</on-start>
...
</flow>
This exception is not catched and the clients receive a HTTP Code 500.
Of course, in this method, I would like to create a "myCustomException" and raise it if the parameter is null.
I read the documentation and I guess that use a Transitional exception handling is not possible (because we are in an on-start process...). I would like a mechanism that can be used by every flows.
So I tried to implement a FlowExecutionExceptionHandler but I really can't find how does it work.
There is a person that can explain to me how to implement :
- FlowExecutionExceptionHandler which catch any exceptions raise in the flow and return a new custom error view to the client.
- a custom FlowExecutionException (how can I get the flowId, stateId ...)
and finally what I have to put in the web-xml and in the servlet.xml to initialize the FlowExecutionExceptionHandler.
Any help would be grateful.
Thanks in advance,
Gabriel.


).
Reply With Quote
