works.iterative.workflow
Members list
Type members
Classlikes
One command offered (or withheld) in the entity's current state.
One command offered (or withheld) in the entity's current state.
Value parameters
- available
-
whether the gated
requiresguard passes for the caller's context - command
-
the transition's
CommandMatchlabel — the same trigger keydecidematches on - description
-
the transition's unstripped
requires.describetree — 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
decidewould return asRejection.Invalid;Nonewhen available, andNoneunderAuthEnforcement.Enforcewhen the failure is pure-auth (no data message to show)
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Affordances.type
Construction-time authorization policy for WorkflowInterpreter.decide.
Construction-time authorization policy for WorkflowInterpreter.decide.
Not a per-call flag: chosen once when the interpreter is wired to an EngineDefinition. Skip performs no auth enforcement; Enforce is reserved for applications that enforce roles.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A named command matcher — "which command" as a named PartialFunction matcher.
A named command matcher — "which command" as a named PartialFunction matcher.
Chosen over string triggers (drift), sample events (fixture drift), and ClassTag/TypeTest (breaks on parameterless enum cases, of which Poptávka has many). label is both the edge label and the projection's trigger key.
Value parameters
- label
-
stable identifier for this command match; used as the edge label / trigger key
- matcher
-
partial function defined exactly on the commands this match accepts
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ConformanceCheck.type
The runtime definition consumed by WorkflowInterpreter.decide.
The runtime definition consumed by WorkflowInterpreter.decide.
Value parameters
- stateOf
-
the entity→state projection (e.g. for Poptávka:
_.stav) - transitions
-
the transition table; order is preserved and load-bearing — first-applicable wins, mirroring an
orElsechain
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The declared event-type skeleton for an outcome.
The declared event-type skeleton for an outcome.
The conformance harness asserts set-equality between an outcome's declared emits shapes and what its real emit produces.
Value parameters
- label
-
stable identifier for this event shape
- matcher
-
partial function defined exactly on the events this shape matches
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A composable guard over entity state S.
A composable guard over entity state S.
Each guard carries:
describe— a renderableGuardDescriptiontree (consumed by diagram export)check— a pure evaluation against aGuardContext
The describe tree mirrors the evaluation structure:
And→All(flattened, matchingAnd.check's flat Conjunction accumulation)Or→Any(node-level, matchingOr.check's node-level Disjunction)
Structural mirroring guarantees the description cannot contradict evaluation.
Combinators:
and: accumulates all failing branches flatly intoGuardFailure.Conjunctionor: node-level; if both branches fail, wraps them inGuardFailure.Disjunction
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
Show all
The context available during guard evaluation.
The context available during guard evaluation.
Value parameters
- entity
-
the current entity state being guarded
- roles
-
the full set of roles held by the calling user, typed as
R— the application-supplied role type. - userId
-
the identity of the calling user (canonical
idDO-based UserId)
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Renderable description of a guard structure, consumed by Phase 4 diagram export.
Renderable description of a guard structure, consumed by Phase 4 diagram export.
Composed structurally from Guard.describe: And → All, Or → Any, leaves → Leaf. This structural correspondence guarantees the description cannot contradict evaluation.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The result of a failed guard evaluation.
The result of a failed guard evaluation.
Sum-aware: carries structural information about which guards failed and why. Unauthorized is intentionally a distinct case from Leaf so that callers (e.g. MEDECA-377, MEDECA-378) can distinguish "missing data" from "missing permission" without further refactoring.
Leaf— a data guard (Requirement) failed; carries the predicate label and message keyUnauthorized— an auth guard (RequireRoleorRequireIdentity) failedConjunction— anAndguard: all failing branches accumulated (flat, no nesting)Disjunction— anOrguard: all branches failed (node-level, two elements)
Attributes
- Companion
- object
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- enum
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
GuardFailure.type
One deterministic outcome of a Transition.
One deterministic outcome of a Transition.
Co-locates the declared skeleton (to + emits) with the real emit so they change together. emits = Nil with emit = (_, _) => Seq.empty models a no-op success outcome (e.g. Poptávka's NavrhniPL unchanged-VP branch).
Value parameters
- emit
-
real, data/payload-dependent event construction
- emits
-
declared event-type skeleton (
Nilfor a no-op outcome) - label
-
unique within its
Transition; edge label + witness key - to
-
declared target state — read by the diagram, verified by conformance
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A named predicate over entity state S.
A named predicate over entity state S.
Value parameters
- label
-
stable, language-independent identifier; used by
Guard.describefor diagram export (Phase 4) - test
-
pure boolean function applied to the entity value
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The kernel-local rejection vocabulary returned by WorkflowInterpreter.decide.
The kernel-local rejection vocabulary returned by WorkflowInterpreter.decide.
The application's adapter maps this to its own error type; the kernel itself references no application error type. Unauthorized exists for forward use (AuthEnforcement.Enforce) but is unreachable under Skip — stripAuth removes every auth leaf before evaluation.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
One (from, command) group of a workflow's engine table.
One (from, command) group of a workflow's engine table.
Groups outcomes that share a from state and a CommandMatch. classify is total by construction, so its outcomes are disjoint, exhaustive, and order-free — the footgun-free alternative to N sibling guarded transitions with hopefully-disjoint applicableWhen. classify cannot reject — rejections live entirely in requires/requiresPayload.
Value parameters
- applicableWhen
-
fail ⇒ try next transition ⇒ eventually
Unhandled - classify
-
total selection of one of
outcomesgiven the real(entity, command) - from
-
the source state
- on
-
the command matcher this transition group applies to
- outcomes
-
the declared, disjoint outcomes this transition group can classify to
- requires
-
fail ⇒
Invalid(message) - requiresPayload
-
payload-aware
requires, evaluated against(entity, command); defaults to always-pass. The one defaulted additive field landed in Phase 2 so Podání (MEDECA-382) never edits a shipped kernel type.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
Transition.type
A witness pins one (transition, outcome) edge of an EngineDefinition to a concrete (entity, command) pair so ConformanceCheck.errors can exercise the real classify/emit/ fold code against the declared shape.
A witness pins one (transition, outcome) edge of an EngineDefinition to a concrete (entity, command) pair so ConformanceCheck.errors can exercise the real classify/emit/ fold code against the declared shape.
Value parameters
- command
-
the command value to run the witness against
- entity
-
the entity value to run the witness against
- key
-
the
(from, on.label)transition key this witness targets - outcomeLabel
-
the declared outcome label expected to be selected by
classify
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
WorkflowInterpreter.type