Describe the bug
The context() function doesn't work for a list value that contains a custom context. This is the case when the function is invoked in Camunda 8 with a process variable as the argument. See the details in the issue: https://github.com/camunda/camunda/issues/12740.
The function works fine if it is invoked with a list literal.
To Reproduce
Steps to reproduce the behavior:
Add the following test to BuiltinContextFunctionsTest and run it
Verify that the test fails with the message: the evaluation didn't returned 'Map(a -> 1)' but 'null'
ScalaTest
it should "return a context with entries from a custom context" in {
evaluateExpression(
expression = """context(list)""",
variables = Map(
"list" -> List(
ValContext(
new MyCustomContext(
Map(
"key" -> "a",
"value" -> 1
)
)
)
)
)
) should returnResult(Map("a" -> 1))
}
Expected behavior
I can invoke the context() function with a list that a custom context.
Describe the bug The
context()
function doesn't work for a list value that contains a custom context. This is the case when the function is invoked in Camunda 8 with a process variable as the argument. See the details in the issue: https://github.com/camunda/camunda/issues/12740.The function works fine if it is invoked with a list literal.
To Reproduce Steps to reproduce the behavior:
BuiltinContextFunctionsTest
and run itthe evaluation didn't returned 'Map(a -> 1)' but 'null'
ScalaTest
Expected behavior I can invoke the
context()
function with a list that a custom context.Environment