Appian Community and Appian Academy are being upgraded. As a part of the upgrade, Appian Community is currently in read-only mode, and user registration is disabled until August 3. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

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