Support Article
Redirection to legacy flow fails calling forward from IC flow
SA-9851
Summary
Redirection to legacy flow(i.e. Not Defined) from IC(Interaction Controller) flow fails when using forward() in the custom servlet that is invoked for Interaction_Complete stage(of IC flow).
It gives below error in server console:
<ERROR> <Thd=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <com.chordiant.cafe.workflow.RunTask.service()> <null>
Error Messages
<ERROR> <Thd=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <com.chordiant.cafe.workflow.RunTask.service()> <null>
Steps to Reproduce
Legacy(i.e. Not Defined) flow calling IC flow through location.href and calling legacy flow on Interaction_Complete stage through a servlet. This is done through below code:
request.getRequestDispatcher(returnUrl).forward(request, response);
Root Cause
Chordiant faces framework of FS6.8.1 is appending the flow id in the HttpServletRequest. In FS6.6, FlowId has been taken from pageStateValues.
Resolution
In custom servlet added the following fix to remove the FlowId attribute from the HttpServletRequest, before doing xmlworkdispacher forward.
// Remove flow id from request attribute
if(request != null && request.getAttribute("FlowId") != null)
request.removeAttribute("FlowId");
// Remove flow id from request parameters
HttpServletRequest filteredRequest = new FilteredRequest(request);
In FilterRequest class it create a new request wrapper that will merge additional parameters into the request object without prematurely reading parameters from the original request.
Published June 12, 2015 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.