assert outputDirectory != null;
assert localWorkingDirectory != null;
assert extraResources != null;
assert serviceClassLoader != null;
assert flowCompilerOptions != null;
BatchCompilerConfiguration config = new BatchCompilerConfiguration();
config.setBatchId(batchId);
config.setDataClasses(new SpiDataClassRepository());
config.setExternals(new SpiExternalIoDescriptionProcessorRepository());
config.setGraphRewriters(new SpiFlowGraphRewriterRepository());
config.setFactory(Models.getModelFactory());
config.setFlowElements(new SpiFlowElementProcessorRepository());
config.setLinkingResources(DirectFlowCompiler.createRepositories(serviceClassLoader, extraResources));
config.setOutputDirectory(outputDirectory);
config.setRootLocation(clusterWorkingLocation);
config.setRootPackageName(basePackageName);
config.setWorkflows(new SpiWorkflowProcessorRepository());
config.setServiceClassLoader(serviceClassLoader);
config.setWorkingDirectory(localWorkingDirectory);
config.setFlowCompilerOptions(flowCompilerOptions);
return config;
}