Interface WorkflowDao

  • All Known Implementing Classes:
    WorkflowDaoImpl

    public interface WorkflowDao
    • Method Detail

      • getCurrentStep

        WorkflowStep getCurrentStep​(WorkflowableTask task)
        Returns the current step for the specified activity.
        Parameters:
        task - task
        Returns:
        current step of task
      • getHiddenStep

        WorkflowStep getHiddenStep​(WorkflowVersion version)
        Returns a step with the HIDDEN status for the specified version of the transition model.
        Parameters:
        version - version of the transition model
        Returns:
        step with the HIDDEN status
      • getInitialStep

        WorkflowStep getInitialStep​(LOV taskType)
        Returns the initial step for the transition model corresponding to the specified project and task type.
        Parameters:
        taskType - task type
        Returns:
        initial step of the transition model
      • isInitialStep

        boolean isInitialStep​(WorkflowStep step)
        * Checks whether the specified step is the initial step for its transition model.
        Parameters:
        step - step
        Returns:
        whether the specified step is the initial one
      • getStepByName

        WorkflowStep getStepByName​(WorkflowVersion version,
                                   String name)
        Returns the step of the specified version of the transition model by its unique name.
        Parameters:
        version - version of the transition model
        name - the unique name of the step
        Returns:
        step of the specified version of the transition model
      • getTransitionsByName

        List<WorkflowTransition> getTransitionsByName​(Workflow workflow,
                                                      String name)
        Returns all transitions of the specified transition model whose unique names are equal to the specified one.
        Parameters:
        workflow - transition model
        name - unique transition name
        Returns:
        list of transitions for the specified transition model
      • getTransitionByName

        WorkflowTransition getTransitionByName​(WorkflowVersion version,
                                               String name)
        Returns the transition of the specified version of the transition model by its unique name.
        Parameters:
        version - version of the transition model
        name - unique transition name
        Returns:
        transition of the specified version of the transition model
      • getLastWorkflowTransitionByName

        WorkflowTransition getLastWorkflowTransitionByName​(String name)
        Returns a transition from the latest version of the transition model by its unique name.
        Parameters:
        name - unique transition name
        Returns:
        transition of the latest version of the transition model
      • getActiveWorkflowTransitionByName

        WorkflowTransition getActiveWorkflowTransitionByName​(String name)
        Returns a transition from the active version of the transition model by its unique name.
        Parameters:
        name - unique name of the transition
        Returns:
        transition of the active version of the transition model
      • getTransition

        WorkflowTransition getTransition​(LOV taskType,
                                         LOV sourceStepTaskStatus,
                                         LOV destinationStepTaskStatus)
        Returns the transition of the active transition model corresponding to the specified task type between steps with the specified statuses.
        Parameters:
        taskType - type of task
        sourceStepTaskStatus - initial step status
        destinationStepTaskStatus - the status of the final step
        Returns:
        transition of the transition model
      • getLastTransitionHistoryByDestinationStep

        WorkflowTransitionHistory getLastTransitionHistoryByDestinationStep​(WorkflowTask task,
                                                                            WorkflowStep destinationStep)
        Returns the last transition history record for the specified task corresponding to the transition at the specified step.
        Parameters:
        task - task
        destinationStep - destination step of the transition
        Returns:
        the last transition history record
      • getLastTransitionHistory

        WorkflowTransitionHistory getLastTransitionHistory​(WorkflowTask task)
        Returns the last transition history record for the specified task.
        Parameters:
        task - task
        Returns:
        the last entry in the transition history
      • createDefaultPostFunctions

        void createDefaultPostFunctions​(WorkflowTransitionConditionGroup transitionConditionGroup)
        Creates default post-functions for the specified group of transition conditions.
        Parameters:
        transitionConditionGroup - transition condition group
      • deletePostFunction

        void deletePostFunction​(WorkflowPostFunction postFunction)
        Deletes the specified post-function with all child entities.
        Parameters:
        postFunction - post function
      • deleteTransitionConditionGroup

        void deleteTransitionConditionGroup​(WorkflowTransitionConditionGroup transitionConditionGroup)
        Deletes the specified transition condition group with all child entities.
        Parameters:
        transitionConditionGroup - transition condition group
      • getWorkflowVersion

        WorkflowVersion getWorkflowVersion​(WorkflowableTask task)
        Returns the version of the transition model for the specified activity.
        Parameters:
        task - activity
        Returns:
        version of the transition model for the specified activity
      • getTaskTypesNotInWf

        List<LOV> getTaskTypesNotInWf()
        Returns a list of TASK_TYPE types that do not have transition models created in the specified project.
        Returns:
        list of TASK_TYPE types for which transition models were not created in the specified project
      • getMaxVersion

        BigDecimal getMaxVersion​(Workflow workflow)
        Returns the maximum version number for the specified transition model.
        Parameters:
        workflow - transition model
        Returns:
        maximum version number for the specified transition model
      • getNextVersion

        BigDecimal getNextVersion​(Workflow workflow,
                                  boolean majorVersion)
        Returns the next version number for the specified transition model.
        Parameters:
        workflow - transition model
        majorVersion - should there be a next major version
        Returns:
        the next version number for the specified transition model
      • getWorkflowStep

        WorkflowStep getWorkflowStep​(WorkflowTask workflowTask)
        Get workflow step, assigned on workflow task
        Returns:
        workflow step
      • setWorkflowStep

        void setWorkflowStep​(WorkflowTask workflowTask,
                             WorkflowStep workflowStep)
        Sets workflow step to workflow task
      • getTransitionBetweenSteps

        WorkflowTransition getTransitionBetweenSteps​(WorkflowStep sourceStep,
                                                     WorkflowStep destinationStep)
        Parameters:
        sourceStep - source step
        destinationStep - destination step
        Returns:
        transition with specified source and destination step
      • getConditions

        <C extends WorkflowConditionList<C> getConditions​(Class<C> conditionClass,
                                                            WorkflowTransitionConditionGroup conditionGroup)
        Parameters:
        conditionClass - class of entity related to WF_COND table specified in WorkflowSettings
        conditionGroup - condition group of conditions
        Returns:
        list of conditions for a given WorkflowTransitionConditionGroup from workflow cache