Affordance

works.iterative.workflow.Affordance
final case class Affordance(command: String, available: Boolean, description: GuardDescription, reason: Option[UserMessage])

One command offered (or withheld) in the entity's current state.

Value parameters

available

whether the gated requires guard passes for the caller's context

command

the transition's CommandMatch label — the same trigger key decide matches on

description

the transition's unstripped requires.describe tree — always the full declared guard, regardless of the auth policy the availability was computed under

reason

for an unavailable affordance, the DFS-first data-guard message of the failure — the same message decide would return as Rejection.Invalid; None when available, and None under AuthEnforcement.Enforce when the failure is pure-auth (no data message to show)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product