Class WorkflowDefinitionService


  • @Component
    @Singleton
    public class WorkflowDefinitionService
    extends Object
    Service for managing workflow definitions.
    • Method Detail

      • getWorkflowDefinition

        public WorkflowDefinition getWorkflowDefinition​(String type)
        Return the workflow definition that matches the give workflow type name.
        Parameters:
        type - Workflow definition type.
        Returns:
        The workflow definition or null if not found.
      • getWorkflowDefinitions

        public List<WorkflowDefinition> getWorkflowDefinitions()
        Return all managed workflow definitions.
        Returns:
        List of workflow definitions.
      • postProcessWorkflowDefinitions

        public void postProcessWorkflowDefinitions()
        Persist all loaded workflow definitions if nflow.autoinit is false and nflow.definition.persist is true. If nflow.autoinit is true, definitions are persisted when they are added to managed definitions.
      • addWorkflowDefinition

        public void addWorkflowDefinition​(WorkflowDefinition wd)
        Add given workflow definition to managed definitions. Persist given definition if nflow.autoinit and nflow.definition.persist are true.
        Parameters:
        wd - The workflow definition to be added.
        Throws:
        IllegalStateException - When a definition with the same type has already been added.