Class WorkflowValidator
- java.lang.Object
-
- de.xima.fc.workflow.processor.engine.WorkflowValidator
-
- All Implemented Interfaces:
IWorkflowValidator
public class WorkflowValidator extends Object implements IWorkflowValidator
Entry point for validating the entire workflow of a project, or just parts of it (single tasks, triggers, or nodes).Use
builder(Projekt)
to create an instance of this validator.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorkflowValidator.Builder
Builder for creating aWorkflowValidator
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WorkflowValidator.Builder
builder(Mandant client, Projekt project, WorkflowVersion workflowVersion)
static WorkflowValidator.Builder
builder(Projekt project)
static WorkflowValidator.Builder
builder(WorkflowVersion workflowVersion)
IWorkflowValidationResult
validateProcess(WorkflowProcess process, EWorkflowValidationGroup... groups)
Performs a validation of an entire workflow process, including all tasks, triggers, and nodes.IWorkflowValidationResult
validateTask(WorkflowTask task, EWorkflowValidationGroup... groups)
Performs a validation of an entire workflow task, including all triggers, and nodes.
-
-
-
Method Detail
-
validateProcess
public IWorkflowValidationResult validateProcess(WorkflowProcess process, EWorkflowValidationGroup... groups)
Description copied from interface:IWorkflowValidator
Performs a validation of an entire workflow process, including all tasks, triggers, and nodes. Never throws an exception (but may throwError
s). UseIWorkflowValidationResult.getUnhandledExceptions()
to check if any unhandled exceptions occurred during validation.- Specified by:
validateProcess
in interfaceIWorkflowValidator
- Parameters:
process
- The process to validate.groups
- The type of validation to perform. If none are given, all types are performed.- Returns:
- The result of the validation.
-
validateTask
public IWorkflowValidationResult validateTask(WorkflowTask task, EWorkflowValidationGroup... groups)
Description copied from interface:IWorkflowValidator
Performs a validation of an entire workflow task, including all triggers, and nodes. Never throws an exception (but may throwError
s). UseIWorkflowValidationResult.getUnhandledExceptions()
to check if any unhandled exceptions occurred during validation.- Specified by:
validateTask
in interfaceIWorkflowValidator
- Parameters:
task
- The task to validate.groups
- The type of validation to perform. If none are given, all types are performed.- Returns:
- The result of the validation.
-
builder
public static WorkflowValidator.Builder builder(Mandant client, Projekt project, WorkflowVersion workflowVersion)
- Parameters:
client
- The client who owns the project and workflow version to validate. Must not benull
.project
- The project of the workflow to validate. Must not benull
.workflowVersion
- The workflow version to validate. Must not benull
.- Returns:
- A new validator builder with the given client, project and workflow version.
- Throws:
NullPointerException
- When the given client, project, or workflow version isnull
.
-
builder
public static WorkflowValidator.Builder builder(Projekt project)
- Parameters:
project
- The project of the workflow to validate. Must not benull
.- Returns:
- A new validator builder with the given project.
- Throws:
NullPointerException
- When the given project isnull
.
-
builder
public static WorkflowValidator.Builder builder(WorkflowVersion workflowVersion)
- Parameters:
workflowVersion
- The workflow version to validate. Must not benull
.- Returns:
- A new validator builder with the given project.
- Throws:
NullPointerException
- When the given workflow version isnull
.
-
-