private Flow calculateTargetFlow(FacesContext facesContext, String outcome, FlowHandler flowHandler, List<Flow> activeFlows, String toFlowDocumentId) { Flow targetFlow = null; if (toFlowDocumentId != null) { targetFlow = flowHandler.getFlow(facesContext, toFlowDocumentId, outcome); } if (targetFlow == null && !activeFlows.isEmpty()) { for (Flow currentFlow : activeFlows) { targetFlow = flowHandler.getFlow(facesContext, currentFlow.getDefiningDocumentId(), outcome); if (targetFlow != null) { break; } } } if (targetFlow == null) { targetFlow = flowHandler.getFlow(facesContext, "", outcome); } return targetFlow; }
private Flow calculateFlowCallTargetFlow(FacesContext facesContext, FlowHandler flowHandler, FlowCallNode flowCallNode, Flow currentFlow) { Flow targetFlow = null; // " ... Let flowId be the value of its calledFlowId property and flowDocumentId // be the value of its calledFlowDocumentId property. .." // " ... If no flowDocumentId exists for the node, let it be the string // resulting from flowId + "/" + flowId + ".xhtml". ..." // -=Leonardo Uribe=- flowDocumentId is inconsistent, waiting for answer of the EG, // for not let it be null. String calledFlowDocumentId = flowCallNode.getCalledFlowDocumentId(facesContext); if (calledFlowDocumentId == null) { calledFlowDocumentId = currentFlow.getDefiningDocumentId(); } targetFlow = flowHandler.getFlow(facesContext, calledFlowDocumentId, flowCallNode.getCalledFlowId(facesContext)); if (targetFlow == null && !"".equals(calledFlowDocumentId)) { targetFlow = flowHandler.getFlow(facesContext, "", flowCallNode.getCalledFlowId(facesContext)); } return targetFlow; }
@Override public void clientWindowTransition(FacesContext context) { Map<String, String> requestParamMap = context.getExternalContext().getRequestParameterMap(); String toFlowDocumentId = requestParamMap.get(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME); String flowId = requestParamMap.get(FLOW_ID_REQUEST_PARAM_NAME); if (null != toFlowDocumentId) { // don't use *this*, due to decoration FlowHandler fh = context.getApplication().getFlowHandler(); Flow sourceFlow = fh.getCurrentFlow(context); Flow targetFlow = null; FlowCallNode flowCallNode = null; // if this is not a return... if (null != flowId && !FlowHandler.NULL_FLOW.equals(toFlowDocumentId)) { targetFlow = fh.getFlow(context, toFlowDocumentId, flowId); if (null != targetFlow && null != sourceFlow) { flowCallNode = sourceFlow.getFlowCall(targetFlow); } } else { String maxReturnDepthStr = requestParamMap.get(FLOW_RETURN_DEPTH_PARAM_NAME); int maxReturnDepth = Integer.valueOf(maxReturnDepthStr).intValue(); FlowDeque<Flow> flowStack = getFlowStack(context); flowStack.setMaxReturnDepth(context, maxReturnDepth); } fh.transition(context, sourceFlow, targetFlow, flowCallNode, context.getViewRoot().getViewId()); } }
@Override public void clientWindowTransition(FacesContext context) { Map<String, String> requestParamMap = context.getExternalContext().getRequestParameterMap(); String toFlowDocumentId = requestParamMap.get(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME); String flowId = requestParamMap.get(FLOW_ID_REQUEST_PARAM_NAME); if (null != toFlowDocumentId) { // don't use *this*, due to decoration FlowHandler fh = context.getApplication().getFlowHandler(); Flow sourceFlow = fh.getCurrentFlow(context); Flow targetFlow = null; FlowCallNode flowCallNode = null; // if this is not a return... if (null != flowId && !FlowHandler.NULL_FLOW.equals(toFlowDocumentId)) { targetFlow = fh.getFlow(context, toFlowDocumentId, flowId); if (null != targetFlow && null != sourceFlow) { flowCallNode = sourceFlow.getFlowCall(targetFlow); } } else { String maxReturnDepthStr = requestParamMap.get(FLOW_RETURN_DEPTH_PARAM_NAME); int maxReturnDepth = Integer.parseInt(maxReturnDepthStr); FlowDeque<Flow> flowStack = getFlowStack(context); flowStack.setMaxReturnDepth(context, maxReturnDepth); } fh.transition(context, sourceFlow, targetFlow, flowCallNode, context.getViewRoot().getViewId()); } }
@Override public void clientWindowTransition(FacesContext context) { Map<String, String> requestParamMap = context.getExternalContext().getRequestParameterMap(); String toFlowDocumentId = requestParamMap.get(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME); String flowId = requestParamMap.get(FLOW_ID_REQUEST_PARAM_NAME); if (null != toFlowDocumentId) { // don't use *this*, due to decoration FlowHandler fh = context.getApplication().getFlowHandler(); Flow sourceFlow = fh.getCurrentFlow(context); Flow targetFlow = null; FlowCallNode flowCallNode = null; // if this is not a return... if (null != flowId && !FlowHandler.NULL_FLOW.equals(toFlowDocumentId)) { targetFlow = fh.getFlow(context, toFlowDocumentId, flowId); if (null != targetFlow && null != sourceFlow) { flowCallNode = sourceFlow.getFlowCall(targetFlow); } } else { String maxReturnDepthStr = requestParamMap.get(FLOW_RETURN_DEPTH_PARAM_NAME); int maxReturnDepth = Integer.parseInt(maxReturnDepthStr); FlowDeque<Flow> flowStack = getFlowStack(context); flowStack.setMaxReturnDepth(context, maxReturnDepth); } fh.transition(context, sourceFlow, targetFlow, flowCallNode, context.getViewRoot().getViewId()); } }
public static String getFlowMapKey(FacesContext facesContext, FlowReference flowReference) { Flow flow = null; if (flowReference.getDocumentId() == null) { flow = facesContext.getApplication().getFlowHandler().getFlow( facesContext, "", flowReference.getId()); } else { flow = facesContext.getApplication().getFlowHandler().getFlow( facesContext, flowReference.getDocumentId(), flowReference.getId()); } if (flow != null) { return FlowUtils.getFlowMapKey(facesContext, flow); } return null; }
@Override public void clientWindowTransition(FacesContext context) { Map<String, String> requestParamMap = context.getExternalContext().getRequestParameterMap(); String toFlowDocumentId = requestParamMap.get(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME); String flowId = requestParamMap.get(FLOW_ID_REQUEST_PARAM_NAME); if (null != toFlowDocumentId) { // don't use *this*, due to decoration FlowHandler fh = context.getApplication().getFlowHandler(); Flow sourceFlow = fh.getCurrentFlow(context); Flow targetFlow = null; FlowCallNode flowCallNode = null; // if this is not a return... if (null != flowId && !FlowHandler.NULL_FLOW.equals(toFlowDocumentId)) { targetFlow = fh.getFlow(context, toFlowDocumentId, flowId); if (null != targetFlow && null != sourceFlow) { flowCallNode = sourceFlow.getFlowCall(targetFlow); } } else { String maxReturnDepthStr = requestParamMap.get(FLOW_RETURN_DEPTH_PARAM_NAME); int maxReturnDepth = Integer.parseInt(maxReturnDepthStr); FlowDeque<Flow> flowStack = getFlowStack(context); flowStack.setMaxReturnDepth(context, maxReturnDepth); } fh.transition(context, sourceFlow, targetFlow, flowCallNode, context.getViewRoot().getViewId()); } }
FlowHandler fh = ctx.getApplication().getFlowHandler(); if (null != outcome) { result.isFlowEntryFromExplicitRule = null != fh.getFlow(ctx, toFlowDocumentId, convertToViewIdToFlowOrNodeId(ctx, result));
FlowHandler fh = ctx.getApplication().getFlowHandler(); if (null != outcome) { result.isFlowEntryFromExplicitRule = null != fh.getFlow(ctx, toFlowDocumentId, convertToViewIdToFlowOrNodeId(ctx, result));
FlowHandler fh = ctx.getApplication().getFlowHandler(); if (null != outcome) { result.isFlowEntryFromExplicitRule = null != fh.getFlow(ctx, toFlowDocumentId, convertToViewIdToFlowOrNodeId(ctx, result));
FlowHandler fh = ctx.getApplication().getFlowHandler(); if (null != outcome) { result.isFlowEntryFromExplicitRule = null != fh.getFlow(ctx, toFlowDocumentId, convertToViewIdToFlowOrNodeId(ctx, result));
Flow flow = flowHandler.getFlow(facesContext, reference.getDocumentId() == null ? "" : reference.getDocumentId(), reference.getId()); if (flow == null)
Flow newFlow = flowHandler.getFlow(context, toFlowDocumentId, fromAction);
Flow newFlow = flowHandler.getFlow(context, toFlowDocumentId, fromAction);
Flow newFlow = flowHandler.getFlow(context, toFlowDocumentId, fromAction);
Flow newFlow = flowHandler.getFlow(context, toFlowDocumentId, fromAction);