Input Mapping - undesired override

I seem to have encounter a small issue with input variables.

Basically I have a variable having value a JSON
A = {“property1” : “value”, “property2” : “value”, “property3” : [], “property4”: []}
and other variables
B = [{"someField1}:“someValue1”}, {“someField1”:“someValue2”}]
C = [{"someField2}:“someValue1”}, {“someField2”:“someValue2”}]
so B and C, are collections containing multiple json.

So on a task I have the following input mappings:
source =B
target A.property3
source =C
target A.property4

Basically I want to copy the collections B and C into the fields of A that represents collections.
But I end up, with A, with the correct fields copied, but any other properties overridden.
So I lose “property1” and “property2” from A.

I found this bug:

I thought it was related and made sure I tried a docker image of Zeebe above 0.23.0,
but it seems I still get this behavior.
Am I missing something ?

Hi @raduone

thank you for raising this up.

This behavior is expected. The input mapping will create a new local variable “A” in the scope of the task. It will not merge the fields in the existing variable “A” from the outer scope.

One option is to define all properties that you want to have:

  • A.property1 -> A.property1
  • A.property2 -> A.property2
  • B -> A.property3
  • C -> A.property4

Does this help you?

Best regards,

1 Like

@philipp.ossler Yes, that is the solution I ended up implementing.
I was expecting to be the same behavior as for output mappings,
as in the github issue, but it’s oke. It’s just a bit of overhead,
if you add some new properties that you need to remember
to add them in the mappings as well.

1 Like