Not able to pass execution variable if multi instance async is enabled


#1

Hi,

We have a process having call activity marked as sequential multi instance and we are trying to pass a JSON array from the process to the called activity. This process works perfectly fine except in the below scenario:

However, if we try to make the call activity as “Multi instance asynchronous before/after”, the JSON array execution variable is not getting passed to the multi instance call activity due to which we are getting the error as “JSONArray[0] not found”.


#2

Hi @saumyasucharita,

I guess that the serialization of the JSON array does not work correctly, i.e. the roundtrip Java object -> serialized value -> Java object does not result in the original value. You won’t notice this problem if you have no wait states in between variable access, because in that case the Java object is cached. Once you add a wait state (e.g. asynchronous continuation), the problem becomes visible, because the cached value is discarded once the wait state is reached.

I recommend to investigate in this direction. If you can share a unit test reproducing this, I am happy to take a look.

Cheers,
Thorben


#3

Hi Thorben,

Thanks for the reply !!
Will the serialization issue be resolved if we use the Camunda spin dataformat for JSON processing?

Thanks,
Saumya