Class WorkflowValidationResult
- java.lang.Object
-
- de.xima.fc.workflow.processor.model.WorkflowValidationResult
-
- All Implemented Interfaces:
IWorkflowValidationResult
,Serializable
public final class WorkflowValidationResult extends Object implements IWorkflowValidationResult
POJO implementation of aIWorkflowValidationResult
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WorkflowValidationResult(Optional<IWorkflowElementValidationResult> processValidationResult, Map<UUID,IWorkflowElementValidationResult> taskValidationResults, Map<ElementKey,IWorkflowElementValidationResult> elementValidationResults, List<WorkflowValidationException> unhandledExceptions)
Creates a new POJO with the given data.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<ElementKey,IWorkflowElementValidationResult>
getElementValidationResults()
Optional<IWorkflowElementValidationResult>
getProcessValidationResult()
Map<UUID,IWorkflowElementValidationResult>
getTaskValidationResults()
List<WorkflowValidationException>
getUnhandledExceptions()
static IWorkflowValidationResult
ofError(Throwable throwable)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.workflow.processor.iface.IWorkflowValidationResult
isValid
-
-
-
-
Constructor Detail
-
WorkflowValidationResult
public WorkflowValidationResult(Optional<IWorkflowElementValidationResult> processValidationResult, Map<UUID,IWorkflowElementValidationResult> taskValidationResults, Map<ElementKey,IWorkflowElementValidationResult> elementValidationResults, List<WorkflowValidationException> unhandledExceptions)
Creates a new POJO with the given data.- Parameters:
processValidationResult
- Value returned byIWorkflowValidationResult.getProcessValidationResult()
taskValidationResults
- Value returned byIWorkflowValidationResult.getTaskValidationResults()
elementValidationResults
- Value returned byIWorkflowValidationResult.getElementValidationResults()
unhandledExceptions
- Value returned byIWorkflowValidationResult.getUnhandledExceptions()
.
-
-
Method Detail
-
getElementValidationResults
public Map<ElementKey,IWorkflowElementValidationResult> getElementValidationResults()
- Specified by:
getElementValidationResults
in interfaceIWorkflowValidationResult
- Returns:
- A map between the key of a validated workflow element and the validation result for that element. If an
element does not appear in this map, either an exception was thrown during its validation (see
IWorkflowValidationResult.getUnhandledExceptions()
, or the element was not scheduled to be validated.
-
getProcessValidationResult
public Optional<IWorkflowElementValidationResult> getProcessValidationResult()
- Specified by:
getProcessValidationResult
in interfaceIWorkflowValidationResult
- Returns:
- The validation result for the entire process, i.e. validation messages that pertain to the entire process, e.g. that the process must contain at least one task. May be empty when the process was not validated.
-
getTaskValidationResults
public Map<UUID,IWorkflowElementValidationResult> getTaskValidationResults()
- Specified by:
getTaskValidationResults
in interfaceIWorkflowValidationResult
- Returns:
- A map between the UUID of a workflow task and the validation result for that task. If a task does not
appear in this map, either an exception was thrown during its validation (see
IWorkflowValidationResult.getUnhandledExceptions()
, or the task was not scheduled to be validated.
-
getUnhandledExceptions
public List<WorkflowValidationException> getUnhandledExceptions()
- Specified by:
getUnhandledExceptions
in interfaceIWorkflowValidationResult
- Returns:
- All unhandled exception that occurred during validation. No error messages may be generated in case this contains any exceptions, however, the workflow process, task, or node should be regarded as invalid and should not be persisted.
-
ofError
public static IWorkflowValidationResult ofError(Throwable throwable)
- Parameters:
throwable
- Unhandled exception that occurred and caused the validation process to fail.- Returns:
- A new POJO with no validations results and the given unhandled exception.
-
-