while (isFlowContinued(state, status, stepExecution)) {
stateName = state.getName();
try {
logger.debug("Handling state="+stateName);
status = state.handle(executor);
stepExecution = executor.getStepExecution();
}
catch (FlowExecutionException e) {
executor.close(new FlowExecution(stateName, status));
throw e;