A flow registrar that populates a flow registry from flow definitions defined
within externalized XML resources. Typically used in conjunction with a
XmlFlowRegistryFactoryBean but may also be used standalone in
programmatic fashion.
By default, a flow definition registered by this registrar will be assigned a
registry identifier equal to the filename of the underlying definition
resource, minus the filename extension. For example, a XML-based flow
definition defined in the file "flow1.xml" will be identified as "flow1" when
registered in a registry.
Programmatic usage example:
BeanFactory beanFactory = ...
FlowRegistryImpl registry = new FlowRegistryImpl();
FlowServiceLocator flowServiceLocator =
new DefaultFlowServiceLocator(registry, beanFactory);
XmlFlowRegistrar registrar = new XmlFlowRegistrar();
File parent = new File("src/webapp/WEB-INF");
registrar.addFlowLocation(new FileSystemResource(new File(parent, "flow1.xml"));
registrar.addFlowLocation(new FileSystemResource(new File(parent, "flow2.xml"));
registrar.registerFlows(locations, flowServiceLocator);
By default, a flow definition registered by this registrar will be assigned a registry identifier equal to the filename of the underlying definition resource, minus the filename extension. For example, a XML-based flow definition defined in the file "flow1.xml" will be identified as "flow1" when registered in a registry. Programmatic usage example:
BeanFactory beanFactory = ... FlowRegistryImpl registry = new FlowRegistryImpl(); FlowServiceLocator flowServiceLocator = new DefaultFlowServiceLocator(registry, beanFactory); XmlFlowRegistrar registrar = new XmlFlowRegistrar(); File parent = new File("src/webapp/WEB-INF"); registrar.addFlowLocation(new FileSystemResource(new File(parent, "flow1.xml")); registrar.addFlowLocation(new FileSystemResource(new File(parent, "flow2.xml")); registrar.registerFlows(locations, flowServiceLocator);