Class WorkflowValidatorHelper

java.lang.Object
de.xima.fc.workflow.processor.logic.validation.WorkflowValidatorHelper

public final class WorkflowValidatorHelper extends Object
Utility methods for WorkflowValidator implementing custom logic required for validation.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • validateAvailability

      public static <T extends IElementKeyProviding & IWorkflowElementTypeProviding> boolean validateAvailability(DefaultWorkflowValidationContext context, T element, Object data)
      Checks whether the node or trigger is available, i.e. whether the user is allowed to make use of it.
      Type Parameters:
      T - Type of the element to check (node or trigger)
      Parameters:
      context - Current validation context.
      element - Element to check (node or trigger)
      data - Custom properties model of the element.
      Returns:
      true if valid, false if invalid.
    • validateControlFlow

      public static boolean validateControlFlow(DefaultWorkflowValidationContext context, WorkflowTask task)
      Validates the control flow of the given task. Checks that all code paths end in a return statement, and that there is no dead code.
      Parameters:
      context - Current validation context.
      task - Task to check.
      Returns:
      true if valid, false if invalid.
    • validateProcessDetails

      public static boolean validateProcessDetails(DefaultWorkflowValidationContext context, WorkflowProcess process)
      Validates the details of a process.
      Parameters:
      context - Current validation context.
      process - Process to validate.
      Returns:
      true if valid, false if invalid.
    • validateTaskDetails

      public static boolean validateTaskDetails(DefaultWorkflowValidationContext context, WorkflowTask task)
      Validates the details of a task, i.e.
      • A task must have a trigger. A task without a trigger is considered invalid.
      Parameters:
      context - Current validation context.
      task - Task to validate.
      Returns:
      true if valid, false if invalid.