Case History write conflict - How to mimic a 1 second wait?
Hi all, are there any ways to mimic a 1 second wait (doesn’t have to be exact) in a flow?
The Wait shape in a flow can be configured to be 1 second but ends up taking 12-15 seconds due to how it’s processed. It does solve my problem, but I want it to be 1 second so users don’t have a noticeable wait.
The issue I’ve run into is that if I’m writing a lot of data to the case history, the system doesn’t wait for those writes to complete before moving on, and in some cases, if the start of the next stage wants to write to the case history, it will write to the history in the middle of the other writes. And you get something like the below that looks out of order and can even stop some writes from happening. Adding a wait allows the writes to finish in order as configured.
Example of NO issue - Case History (Newest to Oldest):
- 12.30pm - Assigned to ABC Queue to “complete task”
- 12.30pm - Status changed to Open-Triage
- 12.30pm - Case moved from Collect to Triage via automatic transition
- 12.30pm - PropertyF updated to ‘F’
- 12.30pm - PropertyE updated to ‘E’
- 12.30pm - PropertyD updated to ‘D’
- 12.30pm - PropertyC updated to ‘C’
- 12.30pm - PropertyB updated to ‘B’
- 12.30pm - PropertyA updated to ‘A’
Example of issue - Case History (Newest to Oldest):
- 12.30pm - Status changed to Open-Triage
- 12.30pm - Case moved from Collect to Triage via automatic transition
- 12.30pm - PropertyF updated to ‘F’
- 12.30pm - PropertyE updated to ‘E’
- 12.30pm - Assigned to ABC Queue to “complete task”
- 12.30pm - PropertyC updated to ‘C’
- 12.30pm - PropertyB updated to ‘B’
- 12.30pm - PropertyA updated to ‘A’
So you can see for some reason the Queue assignment wrote to the history out of order and it stopped the PropertyD write from occurring altogether.
NOTE: I grant that this is not efficient code and I’m looking at fixing it, but wanting a band-aid in the short-term so history isn’t lost.