Package com.vdoc.sdk.commons.utils
Class WorkflowUtils
java.lang.Object
com.vdoc.sdk.commons.utils.WorkflowUtils
Utility class for workflows
- Author:
- wtoscer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckLifeCycleStatusCompatibility(int parentLifeCycleStatus, int childLifeCycleStatus) Check if the two life cycle status are compatible for creationstatic IWorkflowgetChildWorkflow(IWorkflowModule workflowModule, IWorkflowContainer workflowContainer, IWorkflow parentWorkflow) Get a workflow for a parentWorkflow, depends on the lifecycle statusstatic IWorkflowgetWorkflow(IWorkflowModule workflowModule, IWorkflowContainer workflowContainer) Return the IWorkflow with lifecycle status closest to PRODUCTION (EXPIRED status is considered as low as UNKNOWN)
-
Constructor Details
-
WorkflowUtils
public WorkflowUtils()
-
-
Method Details
-
getChildWorkflow
public static IWorkflow getChildWorkflow(IWorkflowModule workflowModule, IWorkflowContainer workflowContainer, IWorkflow parentWorkflow) throws WorkflowModuleException Get a workflow for a parentWorkflow, depends on the lifecycle status- Parameters:
workflowModule- the workflow moduleworkflowContainer- the child workflow containerparentWorkflow- the parent workflow- Returns:
- the child workflow
- Throws:
WorkflowModuleException- on error
-
checkLifeCycleStatusCompatibility
public static boolean checkLifeCycleStatusCompatibility(int parentLifeCycleStatus, int childLifeCycleStatus) Check if the two life cycle status are compatible for creation- Parameters:
parentLifeCycleStatus- the parent's lifecycle statuschildLifeCycleStatus- the child's lifecycle status- Returns:
- true if the lifecycles are compatible, false if not
-
getWorkflow
public static IWorkflow getWorkflow(IWorkflowModule workflowModule, IWorkflowContainer workflowContainer) throws WorkflowModuleException Return the IWorkflow with lifecycle status closest to PRODUCTION (EXPIRED status is considered as low as UNKNOWN)- Parameters:
workflowModule- the workflow moduleworkflowContainer- the workflow container- Returns:
- the workflow
- Throws:
WorkflowModuleException- on error
-