Package com.yworkflow.definition.model
Interface Capability
- All Superinterfaces:
CanCopy<Capability>,HasId<String>,HasParent<Capability,,State> Model<Capability,,String> Validatable
Represents a capability value associated with a specific state. Capability is simply a value that
can be associated with a state and retrieved from active states in a workflow instance. The
meaning and purpose of capabilities are determined by business needs and can represent
permissions, tags, or any other state-associated values.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(WorkflowExecutionContext context) Evaluates whether this capability is available given the current attributes.Gets the conditions that determine when this capability is available.getName()Gets the name of this capability.Gets the state ID that this capability belongs to.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
-
getName
String getName()Gets the name of this capability.- Returns:
- the capability name
-
getConditions
ConditionGroup getConditions()Gets the conditions that determine when this capability is available.- Returns:
- the conditions for this capability
-
getStateId
StateId getStateId()Gets the state ID that this capability belongs to.- Returns:
- the state ID
-
evaluate
Evaluates whether this capability is available given the current attributes.- Parameters:
context- the execution context- Returns:
- true if the capability is available, false otherwise
- Throws:
WorkflowException- if there's an error evaluating the conditions
-