Interface WorkflowDefinitionRepository


public interface WorkflowDefinitionRepository
Repository interface for managing workflow definitions. WorkflowDefinitionRepository provides CRUD operations for workflow definitions, supporting persistence, retrieval, and deletion of workflow definitions with proper access control and multi-tenancy support.
Since:
1.0
See Also:
  • Method Details

    • init

      void init(ExtensionProvider extensionProvider, Properties properties)
      Initializes the repository with the necessary dependencies and configuration.
      Parameters:
      extensionProvider - the extension provider for resolving extensions
      properties - the configuration properties for the repository
    • save

      void save(WorkflowCallerContext callerContext, WorkflowDefinitionId workflowDefinitionId, WorkflowDefinition workflowDefinition)
      Saves a workflow definition to the repository.
      Parameters:
      callerContext - the context of the caller performing the operation
      workflowDefinitionId - the ID of the workflow to save
      workflowDefinition - the workflow definition to save
    • get

      Retrieves a workflow definition from the repository.
      Parameters:
      context - the context of the caller requesting the workflow
      workflowDefinitionId - the ID of the workflow to retrieve
      Returns:
      an Optional containing the workflow if found, empty otherwise
      Throws:
      WorkflowException - if there's an error retrieving the workflow
    • delete

      boolean delete(WorkflowCallerContext callerContext, WorkflowDefinitionId workflowDefinitionId)
      Deletes a workflow definition from the repository.
      Parameters:
      callerContext - the context of the caller performing the operation
      workflowDefinitionId - the ID of the workflow to delete
      Returns:
      true if the workflow was deleted, false if it didn't exist