Hi all,
currently I'm migrating from Spring 2.x, Spring Security 2.0.4 and Spring Webflow 2.0.8 to Spring 3.0.5, Spring Security 3.0.5 and Webflow 2.2.1.
I'm facing following Exception when a scoped variable is not set, but given in the flowdefinition.
In Webflow 2.0.8 a variable, which is not in scope returns NULL, now in 2.2.1 this Exception is thrown - that breaks my whole applicationCode:Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 16): Field or property 'newDocumentation' cannot be found on object of type 'org.springframework.webflow.engine.impl.RequestControlContextImpl' at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:207) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:71) at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:64) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:57) at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:97) at org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:78) ... 88 more![]()
To be more specific - here are the settings:
flowdefinition: documentation.xml
java code: DocumentationBB.javaCode:<view-state id="enterDocumentation"> <transition on="edit" to="editDocumentation"> <evaluate expression="DocumentationBB.init(SoDocumentationEDM.rowData)" result="flowScope.selectedDocumentation"/> </transition> <transition on="create" to="editDocumentation"> <evaluate expression="DocumentationBB.init(newDocumentation)" result="flowScope.selectedDocumentation"/> </transition> </view-state> <view-state id="editDocumentation"> ... </view-state>
This flowdefinition throws the SpelEvaluationException when transition 'create' should be executed (using WebFlow 2.2.1 and Spring/Security 3.0.5). With WebFlow 2.0.8 and Spring/Security 2.x - this worked without any errors.Code:public SoDocumentation init(SoDocumentation doc){ if(doc == null){ doc = new SoDocumentation(); ... } return doc; }
To get this flow working in 2.2.1 I have to change the flowdefinition as follows:
So can someone please tell me if I did something wrong or if this behaviour is a bug or a new feature?Code:<transition on="create" to="editDocumentation"> <evaluate expression="DocumentationBB.init(flowScope.newDocumentation)" result="flowScope.selectedDocumentation"/> </transition>
If this is a new feature, is it possible to tweak some settings to use the old behaviour? ...otherwise I have to rewrite all our flows.
Thanks in advance - Jan![]()


Reply With Quote
