Hi folks,
I am new to Webflow development.
I bought a course describing techniques for using Webflow, but I can’t run the sample.
On my side, I have pieces of code described like:
RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
redirectStrategy.sendRedirect(request, response, "/bankFlow?role=User&user=Mauricio");
As flow registry, I have:
<flow:flow-registry id="bankFlowRegistry">
<flow:flow-location id="bankFlow" path="bank-flow.xml"></flow:flow-location>
</flow:flow-registry>
I also have pieces like:
<action-state id="begin">
<evaluate expression="requestParameters.role=='Administrator'?'yes':'no'" />
<transition on="yes" to="showAccounts">
<set name="flowScope.user" value="requestParameters.user" />
</transition>
<transition on="no" to="accountDetails">
</transition>
</action-state>
<view-state id="accountDetails" view="/WEB-INF/Views/findAccount.jsp">
</view-state>
<view-state id="showAccounts" view="/WEB-INF/Views/listAccounts.jsp">
<on-render>
<evaluate expression="accountService.getAccounts()"
result="requestScope.accounts" />
<set name="requestScope.userName" value="flowScope.user" />
</on-render>
</view-state>
But, sadly all my tries to redirect from a Spring controller to a flow (ex: “bankFlow”), I got the error below:
org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver handleTypeMismatch
WARNING: Failed to bind request element: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type ‘java.lang.String’ to required type ‘java.lang.Integer’; nested exception is java.lang.NumberFormatException: For input string: “bankFlow”.
Please, if someone has experience with this error or can help me in any way, please contact me.
Kind regards,
Mauricio.