@Override public Flow buildFlow(final String location, final String id) { val builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices); builder.setParent(this.loginFlowDefinitionRegistry); builder.addFlowLocation(location, id); val registry = builder.build(); return (Flow) registry.getFlowDefinition(id); }
@Bean public FlowDefinitionRegistry flowRegistry() { Map<String, Object> flowAttributes = new HashMap<>(); flowAttributes.put("foo", "bar"); flowAttributes.put("bar", 2); return getFlowDefinitionRegistryBuilder().setParent(parentRegistry()) .addFlowLocation("org/springframework/webflow/config/flow.xml", "flow", flowAttributes) .addFlowLocation("/some/path/that/is/bogus.xml") .addFlowLocationPattern("org/springframework/webflow/config/flows/*.xml") .addFlowBuilder(new FooFlowBuilder()) .addFlowBuilder(new FooFlowBuilder(), "foo2") .addFlowBuilder(new FooFlowBuilder(), "foo3", flowAttributes) .build(); }