Package com.yworkflow.definition.model
Interface Condition
- All Superinterfaces:
CanCopy<Condition>,HasId<String>,HasParent<Condition,,Model<?, ?>> Model<Condition,,String> Validatable
- All Known Subinterfaces:
Conditions
Represents a condition that can be evaluated during workflow execution. Condition defines a
boolean expression that determines whether certain workflow operations should be available or
executed based on the current workflow state and attributes.
Conditions can be used in various contexts:
- Transition Conditions - Determine when transitions are available
- Capability Conditions - Control when capabilities are accessible
- Function Conditions - Decide when functions should execute
- Validation Conditions - Validate workflow state or input
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(WorkflowExecutionContext context, StateId currentStateId) Evaluates this condition against the given attributes and current state.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
-
evaluate
Evaluates this condition against the given attributes and current state.- Parameters:
context- the execution contextcurrentStateId- the current state ID- Returns:
- true if the condition is satisfied, false otherwise
- Throws:
WorkflowException- if there's an error evaluating the condition
-