context literal {…}
FEEL language construct
{ name: expression, name: expression }
A context is FEEL's record type, written as brace-delimited key/value entries. Later entries can refer to earlier ones by name, which makes a context literal usable as a let-binding block for breaking a long expression into named steps. Entry names may contain spaces.
Syntax elements
| Element | Type | Description |
|---|---|---|
| name | name or string | the entry key; may contain spaces |
| expression | any | the value; may reference entries defined above it |
Examples
{a: 1, b: a + 1}.b
2
Try it ↑
{customer: {name: "Anna", age: 34}}.customer.age
34
Try it ↑
{net: 100, vat: net * 0.081, gross: net + vat}.gross
108.1
Try it ↑
Related constructs
path access (.) · list projection (path on a list) · function definition
Related functions
context · context put · get entries
Defined by the OMG DMN 1.6 specification, chapter 10.3 (the FEEL grammar and semantics).