Class WorkflowUtils

java.lang.Object
com.vdoc.sdk.commons.utils.WorkflowUtils

public class WorkflowUtils extends Object
Utility class for workflows
Author:
wtoscer
  • 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 module
      workflowContainer - the child workflow container
      parentWorkflow - 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 status
      childLifeCycleStatus - 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 module
      workflowContainer - the workflow container
      Returns:
      the workflow
      Throws:
      WorkflowModuleException - on error