}
protected final FlowBuilder createFlowBuilder(FlowDefinitionResource resource) {
registerDependentFlowModels();
FlowModelBuilder modelBuilder = new XmlFlowModelBuilder(resource.getPath(), flowModelRegistry);
FlowModelHolder modelHolder = new DefaultFlowModelHolder(modelBuilder);
flowModelRegistry.registerFlowModel(resource.getId(), modelHolder);
return new FlowModelFlowBuilder(modelHolder) {
protected void registerFlowBeans(ConfigurableBeanFactory flowBeanFactory) {
registerMockFlowBeans(flowBeanFactory);
}