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.
Capabilities are values that are associated with states and can be retrieved by going through all active states in a workflow instance. They are not access control mechanisms but rather flexible values that can be used for various business purposes such as permissions, tags, or other state-associated metadata.
Capabilities can be used for:
- Permissions - Tagging states with permission values
- Business Tags - Associating business-specific tags with states
- State Metadata - Storing additional information about states
- Custom Values - Any business-specific values associated with states
- 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
Conditions 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
-