Hi!
I have a service task, and i need to pass a new JSON variable, with some values from variables in in global scope of process instance.
So, the process instance has this variable in global scope:
task1Result = {“var1”: 111, “var2”: {“var3”: “2023-01-19”, “var4”: true}}
type: Json
How to build a new one, for example:
{“date”: task1Result[“var2”][“var3”], “name”: otherVariable[“prop”]}
The Extension Properties accept expressions?
Hi,
Which architecture are you using? A remote Engine? An Embedded Engine?
You can use an input mapping. An input mapping evaluates an expression to determine the value of a local variable. In your example, you can transform task1Result
into the format required by Task2.
You have different options:
- If you use Camunda in the embedded Engine setup, you can write and call a bean from within the expression
- If you have Camunda Spin, you can use it to operate on the JSON object.
Yes my friend. I think the Input/Output variable mapping will work perfectly in this case.
I completely forgot.