Class ValidationHelper
java.lang.Object
de.xima.fc.workflow.designer.helper.ValidationHelper
UI helper utilities for running the workflow validator and extracting and converting workflow validation messages.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidperformBackgroundValidation(FlowchartModel flowchartModel, AssociatesModel associatesModel, WorkflowValidationModel validationModel, IWorkflowProvider provider) Validate the current workflow in the background while the user is editing the workflow.static IWorkflowValidationResultperformFullValidation(WorkflowProcess process, FlowchartModel flowchartModel, WorkflowValidationModel validationModel, ViewSettingsModel viewSettingsModel, IWorkflowProvider provider) Performs a full validation of the workflow and validates all elements.static voidperformInitialValidation(IWorkflowValidationEnvironmentData params, IWorkflowProvider provider, FlowchartModel flowchartModel, WorkflowProcess process, WorkflowValidationModel validationModel) Performs the initial full validation when the workflow designer is opened.
-
Method Details
-
performBackgroundValidation
public static void performBackgroundValidation(FlowchartModel flowchartModel, AssociatesModel associatesModel, WorkflowValidationModel validationModel, IWorkflowProvider provider) throws FastJsonException Validate the current workflow in the background while the user is editing the workflow. This provides incremental feedback to the user. Once they attempt to save the workflow, a full validation is performed.- Parameters:
flowchartModel- Current flowchart model.associatesModel- Current associates model.validationModel- Current validation model.provider- Workflow provider to use.- Throws:
FastJsonException- When serialized element properties could not be deserialized.
-
performFullValidation
public static IWorkflowValidationResult performFullValidation(WorkflowProcess process, FlowchartModel flowchartModel, WorkflowValidationModel validationModel, ViewSettingsModel viewSettingsModel, IWorkflowProvider provider) throws FastJsonException Performs a full validation of the workflow and validates all elements. Adds the validation messages to the flowchart. Also shows any invalid workflow elements that are hidden so the user can see the error.- Parameters:
process- Workflow process to validate.flowchartModel- Current flowchart model.validationModel- Current validation model.viewSettingsModel- Current view settings model,provider- Workflow provider to use. Can benullfor a new database provider.- Returns:
- The result of the validation.
- Throws:
FastJsonException- When serialized element properties could not be deserialized.
-
performInitialValidation
public static void performInitialValidation(IWorkflowValidationEnvironmentData params, IWorkflowProvider provider, FlowchartModel flowchartModel, WorkflowProcess process, WorkflowValidationModel validationModel) Performs the initial full validation when the workflow designer is opened.- Parameters:
params- Params for the validation process.provider- Provider to use. When not given, a new database provider is created.flowchartModel- Flowchart model to validate.process- Process to validate.validationModel- Current UI validation messages model.
-