问题
I'm trying to implement an Action in SWF but I get the same error even in the simplest example.
Error: "java.lang.IllegalStateException: No actions were executed, thus I cannot execute any state transition"
import org.springframework.webflow.execution.Action;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;
public class HelloAction implements Action {
@Override
public Event execute(RequestContext rc) throws Exception {
return new Event(this, "success");
}
I've declared the bean.
<bean id="helloAction" class="app.action.HelloAction"/>
And in flow.xml..
<action-state id="intermedio">
<action bean="helloAction"/>
<transition on="success" to="fin"/>
</action-state>
<end-state id="fin" view="final" />
It works fine if I don't use "HelloAction". But if I want to use Action in SWF, I always get the previous error.
Is something else needed?
Thanks in advance.
回答1:
<action-state id="intermedio">
<evaluate expression="helloAction.execute()">
<transition on="success" to="fin"/>
</action-state>
来源:https://stackoverflow.com/questions/15575717/spring-webflow-no-actions-were-executed