initDataSource();
populateDataBase();
persistenceListener = createFlowExecutionListener();
ClassPathResource resource = new ClassPathResource("managed-root-flow.xml", getClass());
DefaultFlowModelHolder holder = new DefaultFlowModelHolder(new XmlFlowModelBuilder(resource));
FlowModelFlowBuilder builder = new FlowModelFlowBuilder(holder);
MockFlowBuilderContext context = new MockFlowBuilderContext("managed-root-flow");
FlowAssembler assembler = new FlowAssembler(builder, context);
Flow rootFlow = assembler.assembleFlow();
ClassPathResource childFlowResource = new ClassPathResource("managed-child-flow.xml", getClass());
DefaultFlowModelHolder childFlowHolder = new DefaultFlowModelHolder(new XmlFlowModelBuilder(childFlowResource));
FlowModelFlowBuilder childFlowBuilder = new FlowModelFlowBuilder(childFlowHolder);
MockFlowBuilderContext childFlowContext = new MockFlowBuilderContext("managed-child-flow");
FlowAssembler childFlowAssembler = new FlowAssembler(childFlowBuilder, childFlowContext);
Flow childFlow = childFlowAssembler.assembleFlow();