I’m reading Spring WebFlow documentation, but I don’t understand what can i do with outcome value in end-state of flow. Could You show me some practical example ? I wonder how to pass outcome variable to MVC Controller or another flow, but don’t know how.
<flow>
<end-state id="test2">
<output name="id" value="123" />
</end-state>
</flow>
You can access your output variables from the parent flow (if you have called a subflow) by using currentEvent.attributes (so in your example):
See section 3.10 Calling Subflows
You can also get them programatically in a
FlowHandlerby implementing thehandleExecutionOutcomemethod. There is an example in the docs under the “Example FlowHandler” section of 11.4 Implementing custom FlowHandlers.