final ExecutableFlowDeserializer flowDeserializer = new DefaultExecutableFlowDeserializer(jobManager, factory);
FlowExecutionSerializer flowExecutionSerializer = new FlowExecutionSerializer(flowSerializer);
FlowExecutionDeserializer flowExecutionDeserializer = new FlowExecutionDeserializer(flowDeserializer);
FlowManager allFlows = new RefreshableFlowManager(jobManager,
flowExecutionSerializer,
flowExecutionDeserializer,
executionsStorageFile,
lastId);
jobManager.setFlowManager(allFlows);
final CountDownLatch countDown = new CountDownLatch(jobNames.size());
for(String jobName: jobNames) {
try {
final ExecutableFlow flowToRun = allFlows.createNewExecutableFlow(jobName);
if (flowToRun == null) {
System.out.printf("Job[%s] is unknown. Not running.%n", jobName);
countDown.countDown();