Set<ExecutionScript> executions = flow.getScripts().get(context.getPhase());
ExecutionLock lock = acquireExecutionLock(context.getBatchId());
try {
lock.beginFlow(context.getFlowId(), context.getExecutionId());
executePhase(context, executions);
lock.endFlow(context.getFlowId(), context.getExecutionId());
} finally {
lock.close();
}
}