Interface ExtensionProvider

All Known Implementing Classes:
NoOpExtensionProvider

public interface ExtensionProvider
Provides access to workflow extensions by resolving them by type and value. ExtensionProvider is the central registry for all workflow extensions including conditions, functions, attribute registers, and validators.
Since:
1.0
See Also:
  • Method Details

    • init

      void init(WorkflowInitContext initContext)
      Initializes the extension provider. This method is called when the extension provider is registered with the workflow engine and allows the provider to set up any necessary resources.
      Parameters:
      initContext - init context containing configuration
    • getAttributeResolver

      WorkflowAttributeResolver getAttributeResolver(Attributes args)
      Returns the attribute resolver for this extension provider. The attribute resolver is responsible for resolving attribute references in workflow definitions.
      Parameters:
      args - the args to configure the resolver with
      Returns:
      the workflow attribute resolver
    • getCondition

      WorkflowCondition getCondition(String type, String value, Attributes args)
      Resolves a workflow condition by type and value.
      Parameters:
      type - the condition type (e.g., "user", "role", "custom")
      value - the condition value (e.g., "manager", "admin", "conditionId")
      args - the arguments for the condition
      Returns:
      the resolved workflow condition
    • getFunction

      WorkflowFunction getFunction(String type, String value, Attributes args)
      Resolves a workflow function by type and value.
      Parameters:
      type - the function type (e.g., "email", "database", "custom")
      value - the function value (e.g., "send", "query", "functionId")
      args - the arguments for the function
      Returns:
      the resolved workflow function
    • getAttributeRegister

      WorkflowAttributeRegister<?> getAttributeRegister(String type, String value, Attributes args)
      Resolves a workflow attribute register by type and value.
      Parameters:
      type - the register type (e.g., "database", "service", "custom")
      value - the register value (e.g., "userService", "config", "registerId")
      args - the arguments for the register
      Returns:
      the resolved workflow attribute register
    • getValidator

      WorkflowInputValidator getValidator(String type, String value, Attributes args)
      Resolves a workflow input validator by type and value.
      Parameters:
      type - the validator type (e.g., "format", "range", "custom")
      value - the validator value (e.g., "email", "1-100", "validatorId")
      args - the arguments for the validator
      Returns:
      the resolved workflow input validator
    • getPriority

      default int getPriority()
      Returns the priority of this extension provider. Higher priority providers are consulted first when resolving extensions. The default priority is 0.
      Returns:
      the priority of this extension provider