[
https://issues.apache.org/jira/browse/MYFACES-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe resolved MYFACES-3859.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.2.1
> Allow use the flowId as a nodeId inside the same flow
> -----------------------------------------------------
>
> Key: MYFACES-3859
> URL: https://issues.apache.org/jira/browse/MYFACES-3859
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-344
> Affects Versions: 2.2.0
> Reporter: Ludovic Pénet
> Assignee: Leonardo Uribe
> Fix For: 2.2.1
>
>
> The user reported this simple example:
> @Produces
> @FlowDefinition
> public Flow defineFlow(@FlowBuilderParameter FlowBuilder flowBuilder) {
> String flowId = "flux";
> flowBuilder.id("", flowId);
> flowBuilder.viewNode(flowId,
> "/" + flowId + "/" + flowId + ".xhtml").
> markAsStartNode();
> flowBuilder.returnNode("returnFromFlux").
> fromOutcome("#{flowScopedBean.return}");
>
> return flowBuilder.getFlow();
> }
> Please note there is a view node with the same name used by the flowId as
> nodeId. The current algorithm does not detect this case, so it is interpreted
> like if the user want to enter into the flow, causing a loop. But the code in
> transition(...) avoid the recursion and instead get out of the flow.
> It is better if we check this case and deal with it properly before enter
> into a flow.
> Please note in a normal case click to enter into a flow twice cause get out
> of the flow and enter into the flow again, which is correct. But in this
> case, the resulting flow will not have that behavior and instead the
> navigation goes to the node identified as start node without exit from the
> flow.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)