checkAndPrepare(request, response, false);
String flowExecutionKey = flowUrlHandler.getFlowExecutionKey(request);
if (flowExecutionKey != null) {
try {
ServletExternalContext context = createServletExternalContext(request, response);
FlowExecutionResult result = flowExecutor.resumeExecution(flowExecutionKey, context);
handleFlowExecutionResult(result, context, request, response, flowHandler);
} catch (FlowException e) {
handleFlowException(e, request, response, flowHandler);
}
} else {
try {
String flowId = getFlowId(flowHandler, request);
MutableAttributeMap<Object> input = getInputMap(flowHandler, request);
ServletExternalContext context = createServletExternalContext(request, response);
FlowExecutionResult result = flowExecutor.launchExecution(flowId, input, context);
handleFlowExecutionResult(result, context, request, response, flowHandler);
} catch (FlowException e) {
handleFlowException(e, request, response, flowHandler);
}
}