Interface FlowDefinitionRegistry

All Superinterfaces:
FlowDefinitionLocator
All Known Implementing Classes:
FlowDefinitionRegistryImpl

public interface FlowDefinitionRegistry extends FlowDefinitionLocator
A container of flow definitions. Extends FlowDefinitionLocator for accessing registered Flow definitions for execution at runtime.

Flow definition registries can be configured with a "parent" registry to provide a hook into a larger flow definition registry hierarchy.

Author:
Keith Donald
  • Method Details

    • getFlowDefinitionCount

      int getFlowDefinitionCount()
      Returns the number of flow definitions registered in this registry.
      Returns:
      the flow definition count
    • getFlowDefinitionIds

      String[] getFlowDefinitionIds()
      Returns the ids of the flows registered in this registry.
      Returns:
      the flow definition ids
    • getParent

      Returns this registry's parent registry.
      Returns:
      the parent flow definition registry, or null if no parent is set
    • containsFlowDefinition

      boolean containsFlowDefinition(String flowId)
      Does this registry contain a flow with the given id? More specifically, is FlowDefinitionLocator.getFlowDefinition(String) able to obtain a flow definition instance for the given id? Will ask the parent registry if the flow cannot be found in this instance.
      Parameters:
      flowId - the id of the flow to query
      Returns:
      whether a flow definition with the given id is registered
    • setParent

      void setParent(FlowDefinitionRegistry parent)
      Sets this registry's parent registry. When asked by a client to locate a flow definition this registry will query it's parent if it cannot fulfill the lookup request itself.
      Parameters:
      parent - the parent flow definition registry, may be null
    • registerFlowDefinition

      void registerFlowDefinition(FlowDefinitionHolder definitionHolder)
      Register a flow definition in this registry. Registers a "holder", not the Flow definition itself. This allows the actual Flow definition to be loaded lazily only when needed, and also rebuilt at runtime when its underlying resource changes without re-deploy.
      Parameters:
      definitionHolder - a holder holding the flow definition to register
    • registerFlowDefinition

      void registerFlowDefinition(FlowDefinition definition)
      Register a flow definition in this registry.
      Parameters:
      definition - the actual flow definition