Thoughts on best way to fix a race condition....?

DrewW
Mega Sage
Mega Sage

In our Change management we at times have change requests that will have 30+ approvers. We send different approval emails based on the stage that the change request is in. We are running into an issue where the system adds the approval records to the system and then updates the change requests stage, but by the time the system updates the change to the correct stage the events that cause the approval notifications has been processed and the system does not send any of the notifications because the stage is not correct (yet) for the ones that need to go out.

I have tried forcing an update to the stage and having the workflow wait a few seconds before creating the approvals but that did not work.

The "Run after bus. rules run" is selected.

Any one have any thoughts on this?

6 REPLIES 6

Earl L
Mega Guru

Are you using approval groups (Workflow>Activity definition>Approval-Group)? Not sure if this will fix this situation but seems like it might be a step in the right direction if you're not doing it already.

Earl


Yes we are. Its all about getting that actual database to update with the correct stage before the events are processed and I just can't seam to get that to happen. Not sure why.


srinivasthelu
Tera Guru

From where your triggering those events?


Thanks
Srinivas


The events are triggered from business rules.