public void setParent(FlowDefinitionRegistry parent) { super.setParent(parent); if (parent instanceof DefaultFlowRegistry) { DefaultFlowRegistry parentFlowRegistry = (DefaultFlowRegistry) parent; // link so a flow in the child registry that extends from a flow in the parent registry can find its parent flowModelRegistry.setParent(parentFlowRegistry.getFlowModelRegistry()); } } }
/** {@inheritDoc} */ @Override public void setParent(@Nullable final FlowDefinitionRegistry parent) { super.setParent(parent); if (parent instanceof DefaultFlowRegistry) { final DefaultFlowRegistry parentFlowRegistry = (DefaultFlowRegistry) parent; // Link so a flow in the child registry that extends from a flow // in the parent registry can find its parent. flowModelRegistry.setParent(parentFlowRegistry.getFlowModelRegistry()); } } }
public void setParent(FlowDefinitionRegistry parent) { super.setParent(parent); if (parent instanceof DefaultFlowRegistry) { DefaultFlowRegistry parentFlowRegistry = (DefaultFlowRegistry) parent; // link so a flow in the child registry that extends from a flow in the parent registry can find its parent flowModelRegistry.setParent(parentFlowRegistry.getFlowModelRegistry()); } } }
public void setParent(FlowDefinitionRegistry parent) { super.setParent(parent); if (parent instanceof DefaultFlowRegistry) { DefaultFlowRegistry parentFlowRegistry = (DefaultFlowRegistry) parent; // link so a flow in the child registry that extends from a flow in the parent registry can find its parent flowModelRegistry.setParent(parentFlowRegistry.getFlowModelRegistry()); } } }
public void testParentHierarchy() { testRegisterMultipleFlows(); FlowDefinitionRegistryImpl child = new FlowDefinitionRegistryImpl(); child.setParent(registry); FooFlow fooFlow = new FooFlow(); child.registerFlowDefinition(new StaticFlowDefinitionHolder(fooFlow)); assertTrue(child.containsFlowDefinition("foo")); assertTrue(child.containsFlowDefinition("bar")); assertSame(fooFlow, child.getFlowDefinition("foo")); assertEquals(barFlow, child.getFlowDefinition("bar")); }