FEEL context functions
5 built-in functions · DMN 1.6
A FEEL context is a record: named entries written as {name: value}. Most of the time you read one with a path such as customer.age. The context functions cover the cases a path cannot: a key that is only known at runtime (get value), iterating over the entries (get entries), and building a changed copy (context put, context merge). None of them modifies the original context.
Each result below was computed by the engine that runs the playground. Context literals and path access are explained in the guide to lists, filters and contexts.
All FEEL context functions at a glance
| Function | Signature | Returns |
|---|---|---|
| get value | get value(context, key) | Returns the value of the named entry, or null if the key does not exist |
| get entries | get entries(context) | Returns the context as a list of {key, value} pairs, enabling iteration over entries |
| context | context(entries) | Builds a context from a list of {key, value} pairs, the inverse of get entries |
| context put | context put(context, keys, value) | Returns a copy of the context with the entry set, added or replaced |
| context merge | context merge(contexts) | Combines a list of contexts into one; later entries overwrite earlier ones with the same key |
Function reference
Each function with its parameters, examples and edge cases.
get value(context, key)
Returns the value of the named entry, or null if the key does not exist. Useful when the key is only known at runtime.
| Parameter | Type | Description |
|---|---|---|
| context | context | the context to read |
| key | string | the entry name |
get value({foo: 123}, "foo")
get value({foo: 123}, "bar")
Related: get entries · context put
get entries(context)
Returns the context as a list of {key, value} pairs, enabling iteration over entries.
| Parameter | Type | Description |
|---|---|---|
| context | context | the context to expand |
get entries({foo: 123, bar: 456})
context(entries)
Builds a context from a list of {key, value} pairs, the inverse of get entries.
| Parameter | Type | Description |
|---|---|---|
| entries | list of contexts | a list of {key, value} pairs |
context([{key: "a", value: 1}, {key: "b", value: 2}])
Related: get entries · context put · context merge
context put(context, keys, value)
Returns a copy of the context with the entry set, added or replaced. A list of keys addresses a nested entry path.
| Parameter | Type | Description |
|---|---|---|
| context | context | the source context |
| keys | string or list of strings | entry name, or a path of names for nested contexts |
| value | any | the value to set |
context put({x: 1}, "y", 2)
context put({x: {y: 1}}, ["x", "y"], 2)
Related: context merge · get value
context merge(contexts)
Combines a list of contexts into one; later entries overwrite earlier ones with the same key.
| Parameter | Type | Description |
|---|---|---|
| contexts | list of contexts | the contexts to combine, in order |
context merge([{x: 1}, {y: 2}, {x: 3}])
Related: context put · context
How B-FEEL differs
In standard FEEL an invalid argument makes the result null. The business-friendly
B-FEEL dialect returns a type default instead. Both columns were evaluated by the same engine:
| Expression | FEEL | B-FEEL |
|---|---|---|
| get entries(null) | null | [] |
| {a: 1}.b + 1 | null | 1 |
Related guides
Every result on this page was computed by the Impulse FEEL engine 0.9.1, the interpreter that runs the playground. Last updated .
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).