Interface WorkflowProvider

All Superinterfaces:
Provider
All Known Implementing Classes:
DefaultWorkflowProvider

public interface WorkflowProvider extends Provider
  • Method Details

    • getResourceTypeSelector

      ResourceTypeSelector getResourceTypeSelector(ResourceType type)
      Returns a ResourceTypeSelector for the specified resource type.
      Parameters:
      type - the resource type.
      Returns:
      the corresponding ResourceTypeSelector.
    • toModel

      Workflow toModel(WorkflowRepresentation representation)
    • getWorkflow

      Workflow getWorkflow(String id)
    • removeWorkflow

      void removeWorkflow(Workflow workflow)
    • getWorkflows

      Stream<Workflow> getWorkflows()
    • getWorkflows

      default Stream<Workflow> getWorkflows(String search, Boolean exact, Integer first, Integer max)
    • getScheduledWorkflowsByResource

      Stream<WorkflowRepresentation> getScheduledWorkflowsByResource(String resourceId)
    • toRepresentation

      WorkflowRepresentation toRepresentation(Workflow workflow)
    • updateWorkflow

      void updateWorkflow(Workflow workflow, WorkflowRepresentation rep)
    • activate

      void activate(Workflow workflow, ResourceType type, String resourceId)
    • deactivate

      void deactivate(Workflow workflow, String resourceId)
    • submit

      void submit(WorkflowEvent event)
    • runScheduledSteps

      void runScheduledSteps()
    • activateForAllEligibleResources

      void activateForAllEligibleResources(Workflow workflow)
    • migrateScheduledResources

      void migrateScheduledResources(String stepIdFrom, String stepIdTo)
      Migrates scheduled resources from one workflow step to another. The destination step might be a step in the same workflow or a step in a different workflow.
      If the resources are being migrated to a different workflow, the following conditions must be met:
      • the source and destination workflows must support the same resource type;
      • all resources must satisfy the activation conditions of the destination workflow.
      The process behaves exactly as if the resources were being activated for the first time in the destination workflow, except that the first step to be processed is the specified destination step. So, if the step is a scheduled step, the resources will be scheduled accordingly. If the step is not a scheduled step, it will run immediately.
      Parameters:
      stepIdFrom - the id of the step to migrate from.
      stepIdTo - the id of the step to migrate to.