Dear reader,
I sure hope I can describe this challenge clear enough, so bear with me, please.
I created a workflow on entity A. In this workflow, a decimal number field in related entity B should increased by a decimal number in entity A.
For this purpose I use the workflow plugin from GAP workflow essentials to calculate B.value + A.value. Next the result should be placed in B.value.
The workflow will be running over a few thousand records each week. Sounds like a walk in the park, right?
Well, if I run this process for (let's start testing on) 10 records in A, all related to the same B, I noticed that usually only 2 or 3 of the A.values are calculated/added and the rest isn't.
All I can think of is that the different calculations are happening at the same time, so with the same (or increased for the first or maybe second time) B.value.
How to alter this? How can I get these values added without this problem? It's fairly realistic that several tens of A.values will be presented for processing at the same time for the same B.
Thanks for reading along with me and maybe even for your valuable advise :)
Regards,
Jeroen
*This post is locked for comments
Honestly.. what was I thinking. Eeeeerm, embarrassing :-|
But, nevertheless, thanks for your quick response!
You have no control over whether workflow instances run in parallel or not. Also, workflows won't use pessimistic locking, so you have to expect concurrent updates.
From the calculation you describe, you could use a rollup field on entity B instead, which would avoid the issue. Rollups are recalculated periodically, but you could use a workflow with a custom workflow activity (there are pre-existing examples) to recalculate when a change occurs on entity A
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6