Returning value (output) from web flow
I am using spring web-flow 2.0 and I need to return a variable from sub-flow to parent flow like:
<end-state id="end" >
<output name="mvViewBean" value="viewBean" />
<开发者_如何学编程;/end-state>
and use it inside my parent flow like :
<subflow-state id="updateSubflowState" subflow="mv-update" >
<on-exit>
<evaluate expression="mvService.onblabla(mvViewBean)" />
</on-exit>
</subflow-state>
Do i need to define variable definitions or something else?
Just came across this issue...The currentEvent does work, but if you indicate that you accept the variable in your updateSubflowState through a
<output name="mvViewBean" value="flowScope.mvViewBean"/>
then you will be able to access it as mvViewBean.
Yo can get the output values getting attribute in currentEvent.
<subflow-state id="updateSubflowState" subflow="mv-update" >
<on-exit>
<evaluate expression="mvService.onblabla(currentEvent.attributes.mvViewBean)" />
</on-exit>
</subflow-state>
精彩评论