I'm missing something about the use of <action-state> with custom actions. Here's my super simple custom action:
Code:
public class HelloWorldLoggingAction implements Action {
private Logger log = LoggerFactory.getLogger(HelloWorldLoggingAction.class);
public Event execute(RequestContext context) throws Exception {
log.info("Hello World!");
return new Event(this, "end");
}
}
I then define that bean in my application context file.
And my super simple flow definition:
Code:
<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">
<action-state id="HelloWorldLogging">
<evaluate expression="helloWorldLogging" />
<transition on="end" to="end" />
</action-state>
<end-state id="end" />
</flow>
However, the error I get is:
org.springframework.expression.spel.SpelEvaluation Exception: EL1008E

pos 0): Field or property 'helloWorldLogging' cannot be found on object of type 'org.springframework.webflow.engine.impl.RequestCo ntrolContextImpl'
Now, the error message itself seems perfectly reasonable. I wouldn't have expected the "helloWorldLogging" logging bean to be in the RequestControlContext but in the application context. So, I'm clearly not connecting some dots here. Can some one point me in the right direction?