flowModelBuilder = new XmlFlowModelBuilder(resource.getPath(), flowRegistry.getFlowModelRegistry());
} else {
throw new IllegalArgumentException(resource
+ " is not a supported resource type; supported types are [.xml]");
}
FlowModelHolder flowModelHolder = new DefaultFlowModelHolder(flowModelBuilder);
FlowBuilder flowBuilder = new FlowModelFlowBuilder(flowModelHolder);
FlowBuilderContext builderContext = new FlowBuilderContextImpl(
resource.getId(), resource.getAttributes(), flowRegistry, this.flowBuilderServices);
FlowAssembler assembler = new FlowAssembler(flowBuilder, builderContext);
DefaultFlowHolder flowHolder = new DefaultFlowHolder(assembler);