Hi all!
How to evaluate a nested variable in expression using FEEL json?
eg., eval $z
{
“z”: “($x = ‘a’) or ($x = ‘b’ and $y = ‘c’)”,
“x”: “a”,
“y”: “c”
}
note: the value of ‘z’ in json is an expression and it can be dynamic
Hi all!
How to evaluate a nested variable in expression using FEEL json?
eg., eval $z
{
“z”: “($x = ‘a’) or ($x = ‘b’ and $y = ‘c’)”,
“x”: “a”,
“y”: “c”
}
note: the value of ‘z’ in json is an expression and it can be dynamic
Hi @Yogapriya - this expression only works if x
and y
are already defined before the expression is called. If they were already defined, it would return a context (object) that looked like:
{
"z": True,
"x": "a",
"y": "c"
}
You can think of this expression almost like a function: it takes an “input”, then returns a value based on that input.
From your other topic, you’re trying to figure out how to get your exclusive gateway to work. I think trying to model it with BPMN would be a good first step, then share the model here and we can better assist with how to get the needed result.
(Side note: the $
isn’t needed to reference a variable in FEEL.)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.