Closed saig0 closed 2 months ago
NVM, that was a problem with my intellij runner, it ran another test after adding the lines.
@saig0
I was trying the test case attached in the description for curiosity, the problem in the above test case lies in the test setup.
in the MyCustomValueMapper
provided the method unpackVal
resolves to None
while if you change it a tiny bit to match the implementation of DefaultValueMapper
as follows, The test will succeed.
override def unpackVal(value: Val, innerValueMapper: Val => Any): Option[Any] = value match {
case ValContext(c: Context) =>
Some(
c.variableProvider.getVariables.map { case (key, value) =>
value match {
case packed: Val => key -> innerValueMapper(packed)
case unpacked => key -> unpacked
}
}
)
case _ => None
}
Describe the bug
The
string()
function doesn't return the expected string representation from a context value if it contains custom value types.The problem doesn't occur with standard Java/Scala types but with custom types. See the issue here on how to reproduce the issue in Camunda 8.
To Reproduce Steps to reproduce the behavior:
Expected behavior The
string()
function returns the string representation for custom value types. It uses the configured value mapper of the engine to transform the custom types.Environment
1.17.1
8.3.2
https://github.com/camunda/zeebe/issues/15209