}
private FlowScript processJobflow(Workflow.Unit unit, Set<Workflow.Unit> blockers) {
assert unit != null;
assert blockers != null;
JobflowModel model = toJobflowModel(unit);
CommandContext context = new CommandContext(
ExecutionScript.PLACEHOLDER_HOME + '/',
ExecutionScript.PLACEHOLDER_EXECUTION_ID,
ExecutionScript.PLACEHOLDER_ARGUMENTS);
Map<ExecutionPhase, List<ExecutionScript>> scripts = Maps.create();
scripts.put(ExecutionPhase.INITIALIZE, processInitializers(model, context));
scripts.put(ExecutionPhase.IMPORT, processImporters(model, context));
scripts.put(ExecutionPhase.PROLOGUE, processPrologues(model, context));
scripts.put(ExecutionPhase.MAIN, processMain(model, context));
scripts.put(ExecutionPhase.EPILOGUE, processEpilogues(model, context));
scripts.put(ExecutionPhase.EXPORT, processExporters(model, context));
scripts.put(ExecutionPhase.FINALIZE, processFinalizers(model, context));
return new FlowScript(model.getFlowId(), toUnitNames(blockers), scripts);
}