Race condition while appending to process variable array?

Certified Lead Developer

Hi all,
I have a doubt is there a possibility we could have a race condition problem when appending from parallel process nodes to the same pv array?

I have a following situation:

So, I am generating several documents in parallel. Some of them will be generated, some of them will be skipped (based on ContractX gateways decision). When generated, I would like to add them as a document cdt instance to the array of document cdts stored in a process variable.

So in each yellow marked script task I am using (on output tab) :


I usually didn't have problems with possible race condition. But, in theory, is this 100% safe method?

Is there a possibility multiple 'Add to docs array' nodes are executed on different process engines and execution happens exectly at the same time and there is a possibility of data loss (some items are not added to the array because 2 engines had different state of the array)?

I know there is a workaround where we can merge all parts of the array after AND joining node...


  Discussion posts and replies are publicly visible