Package com.yworkflow.definition.model
Interface Validator
- All Superinterfaces:
CanCopy<Validator>,HasId<String>,HasParent<Validator,,Model<?, ?>> Model<Validator,,String> Validatable
Represents a validator that can verify workflow inputs or state. Validator provides a way to
validate data before it's processed by the workflow engine, ensuring data integrity and business
rule compliance.
Validators are used throughout the workflow system to validate inputs, state transitions, and business rules. They can be attached to various workflow elements to ensure that only valid data is processed.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetArgs()Gets the arguments to pass to the validator.getName()Gets the name of this validator.getType()Gets the type of validator to use.getValue()Gets the value or identifier for the validator.voidverify(WorkflowExecutionContext context) Verifies the given attributes against this validator's rules.Methods inherited from interface com.yworkflow.definition.model.base.HasParent
withParentMethods inherited from interface com.yworkflow.definition.model.base.Model
getExtensions, getParent, getProperties, getPropertyDifferenceMethods inherited from interface com.yworkflow.definition.model.validation.Validatable
validate
-
Method Details
-
verify
Verifies the given attributes against this validator's rules.- Parameters:
context- the execution context- Throws:
WorkflowException- if validation fails
-
getType
String getType()Gets the type of validator to use.- Returns:
- the validator type
-
getValue
String getValue()Gets the value or identifier for the validator.- Returns:
- the validator value
-
getArgs
Attributes getArgs()Gets the arguments to pass to the validator.- Returns:
- the arguments for the validator
-
getName
String getName()Gets the name of this validator.- Returns:
- the validator name
-