Interface Capability

All Superinterfaces:
CanCopy<Capability>, HasId<String>, HasParent<Capability,State>, Model<Capability,String>, Validatable

public interface Capability extends Model<Capability,String>, HasParent<Capability,State>
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 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

      boolean evaluate(WorkflowExecutionContext context) throws WorkflowException
      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