Interface WorkflowDao
-
- All Known Implementing Classes:
WorkflowDaoImpl
public interface WorkflowDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createDefaultPostFunctions(WorkflowTransitionConditionGroup transitionConditionGroup)
Creates default post-functions for the specified group of transition conditions.void
deletePostFunction(WorkflowPostFunction postFunction)
Deletes the specified post-function with all child entities.void
deleteTransitionConditionGroup(WorkflowTransitionConditionGroup transitionConditionGroup)
Deletes the specified transition condition group with all child entities.WorkflowTransition
getActiveWorkflowTransitionByName(String name)
Returns a transition from the active version of the transition model by its unique name.<C extends WorkflowCondition>
List<C>getConditions(Class<C> conditionClass, WorkflowTransitionConditionGroup conditionGroup)
WorkflowStep
getCurrentStep(WorkflowableTask task)
Returns the current step for the specified activity.WorkflowStep
getHiddenStep(WorkflowVersion version)
Returns a step with the HIDDEN status for the specified version of the transition model.WorkflowStep
getInitialStep(LOV taskType)
Returns the initial step for the transition model corresponding to the specified project and task type.WorkflowTransitionHistory
getLastTransitionHistory(WorkflowTask task)
Returns the last transition history record for the specified task.WorkflowTransitionHistory
getLastTransitionHistoryByDestinationStep(WorkflowTask task, WorkflowStep destinationStep)
Returns the last transition history record for the specified task corresponding to the transition at the specified step.WorkflowTransition
getLastWorkflowTransitionByName(String name)
Returns a transition from the latest version of the transition model by its unique name.BigDecimal
getMaxVersion(Workflow workflow)
Returns the maximum version number for the specified transition model.BigDecimal
getNextVersion(Workflow workflow, boolean majorVersion)
Returns the next version number for the specified transition model.WorkflowStep
getStepByName(WorkflowVersion version, String name)
Returns the step of the specified version of the transition model by its unique name.List<LOV>
getTaskTypesNotInWf()
Returns a list of TASK_TYPE types that do not have transition models created in the specified project.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.WorkflowTransition
getTransitionBetweenSteps(WorkflowStep sourceStep, WorkflowStep destinationStep)
WorkflowTransition
getTransitionByName(WorkflowVersion version, String name)
Returns the transition of the specified version of the transition model by its unique name.List<WorkflowTransition>
getTransitions(WorkflowStep sourceStep)
List<WorkflowTransition>
getTransitionsByName(Workflow workflow, String name)
Returns all transitions of the specified transition model whose unique names are equal to the specified one.WorkflowStep
getWorkflowStep(WorkflowTask workflowTask)
Get workflow step, assigned on workflow taskWorkflowVersion
getWorkflowVersion(WorkflowableTask task)
Returns the version of the transition model for the specified activity.boolean
isInitialStep(WorkflowStep step)
* Checks whether the specified step is the initial step for its transition model.void
setWorkflowStep(WorkflowTask workflowTask, WorkflowStep workflowStep)
Sets workflow step to workflow task
-
-
-
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 modelname
- 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 modelname
- 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 modelname
- 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 tasksourceStepTaskStatus
- initial step statusdestinationStepTaskStatus
- 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
- taskdestinationStep
- 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 modelmajorVersion
- 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 stepdestinationStep
- destination step- Returns:
- transition with specified source and destination step
-
getTransitions
List<WorkflowTransition> getTransitions(WorkflowStep sourceStep)
- Parameters:
sourceStep
- source step- Returns:
- list of transitions for current step
-
getConditions
<C extends WorkflowCondition> List<C> getConditions(Class<C> conditionClass, WorkflowTransitionConditionGroup conditionGroup)
- Parameters:
conditionClass
- class of entity related to WF_COND table specified in WorkflowSettingsconditionGroup
- condition group of conditions- Returns:
- list of conditions for a given WorkflowTransitionConditionGroup from workflow cache
-
-