
Originally Posted by
Kristof
Thanks for the quick reply!
Putting the variables in conversation-scope is idd an option.
The reason why flow B is a subflow of A is that B can be called from yet another flow C or B can even be a flow on its own too.
You're welcome and ok I see now why it is that way.

Originally Posted by
Kristof
What exactly did you mean by a flowredirect? Does this mean that flow A has ended and flow B is started with some input parameters? That would be exactly what we need here. How can we achieve this?
You can make redirects in both view-states and in end-states. If you need flow A to end before going to flow B, you should make the redirect in an end-state.
See http://static.springframework.org/sp...dler-redirects
I know that the doc does not mention flowRedirect: but it is supported in Web Flow 2 in FlowModelFlowBuilder.java:
Code:
private ViewFactory parseViewFactory(String view, String stateId, boolean endState, BinderModel binderModel) {
if (!StringUtils.hasText(view)) {
if (endState) {
return null;
} else {
view = getLocalContext().getViewFactoryCreator().getViewIdByConvention(stateId);
Expression viewId = getLocalContext().getExpressionParser().parseExpression(view,
new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class));
return createViewFactory(viewId, binderModel);
}
} else if (view.startsWith("externalRedirect:")) {
String encodedUrl = view.substring("externalRedirect:".length());
Expression externalUrl = getLocalContext().getExpressionParser().parseExpression(encodedUrl,
new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class));
return new ActionExecutingViewFactory(new ExternalRedirectAction(externalUrl));
} else if (view.startsWith("flowRedirect:")) {
String flowRedirect = view.substring("flowRedirect:".length());
Expression expression = getLocalContext().getExpressionParser().parseExpression(flowRedirect,
new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class));
return new ActionExecutingViewFactory(new FlowDefinitionRedirectAction(expression));
} else {
Expression viewId = getLocalContext().getExpressionParser().parseExpression(view,
new FluentParserContext().template().evaluate(RequestContext.class).expectResult(String.class));
return createViewFactory(viewId, binderModel);
}