- Module dossiers: attestor, authority, cli, graph, scanner - Policy assistant parameters guide - UI v2-rewire navigation rendering policy - Test suite overview update - Workflow engine requirements and tutorial series (01-08) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.3 KiB
1.3 KiB
Tutorial 8: Expressions
The expression system enables declarative logic that compiles to portable canonical JSON. All expressions are evaluable at runtime without recompilation.
Path Navigation
| Prefix | Source | Example |
|---|---|---|
start.* |
Start request fields | start.policyId |
state.* |
Mutable workflow state | state.customerName |
payload.* |
Task completion payload | payload.answer |
result.* |
Step result (by resultKey) | result.productInfo.lob |
Built-in Functions
| Function | Description | Example |
|---|---|---|
coalesce |
First non-null | coalesce(state.id, start.id, 0) |
concat |
String join | concat("Policy #", state.policyNo) |
add |
Sum | add(state.attempt, 1) |
if |
Conditional | if(state.isVip, "VIP", "Standard") |
isNullOrWhiteSpace |
Null/empty check | isNullOrWhiteSpace(state.name) |
length |
String/array length | length(state.items) |
upper |
Uppercase | upper(state.annexType) |
first |
First array element | first(state.objects) |
mergeObjects |
Deep merge | mergeObjects(state, payload) |
Variants
Next
Tutorial 9: Testing — unit test setup with recording transports.