Repository navigation
Release v6.23.0
A Screenplay model can now ask a system outside itself for an ability from a reaction, a workflow action or a state's entry, and say what happens for each answer.
Added
invokes <System>.<Ability>in reactions, with the ability's inputs and one branch per answer:on returned(reads$result.<field>),on failed(reads$failure.reason) andon <Outcome>for a declared outcome. (#1252)- Workflow actions invoke abilities too, with an edge per outcome and values mapped from literals, the subject or an earlier node's result (
Node.field). Acomputenode, an approval answered through an ability (via) andexpires afterparse, print and validate. - State entries invoke abilities:
entering invokes <System>.<Ability>, or a bareenteringwith a C# body. - Specifications script an ability's answer with
given <System>.<Ability> returns,answersorfailsand assert the call withthen invokes. The reference evaluator runs reactions that invoke abilities. - Diagnostics
PLAY1001toPLAY1017cover unknown targets, unmapped or mistyped inputs, unreachable or duplicate branches, values read outside their branch and abilities that answer later. - Executable semantic model v51 carries reaction, workflow-action and state-entry invocations. Models that invoke no ability keep v50 or earlier.
- The TypeScript compiler, the Monaco editor (completion, highlighting, hover), the VS Code grammar, the event model board and the MCP operation inventory (
invokedBycall sites) understand the new forms. - A
Shippingsample with a REST carrier and a chat system invoked from a reaction, a workflow and a state machine, and ability invocations in theInvoicingsample.
Changed
- Compute nodes,
approval ... via, state entry bodies, operation-phase invocations and$triggervalues are not executable yet: binding reportsPLAY0268naming issue 1252.