Skip to main content

I have three workflows that run in parallel. In order to keep things in "sync" I have created a table called Variables - basically each workflow has a task(s), when the task is completed the workflow writes to the Variables table so the other two workflows know the status of that task.

This works great 99% of the time. We recently started seeing issues when two of the tasks get assigned to the same person. The person answers one task then immediately answers the next task. This causes both workflows to try to update the record at the same time. The first workflow is successful but the second workflow errors stating: "The workflow could not update the item, possibly because one or more columns for the item require a different type of information"

Since this is a list I cannot utilize the SharePoint Check-In/Check-Out - in which I could simply wait for the item to be Checked back in to update. Are there any other ways to catch this error?  I don't mind if the workflow has to wait a bit - I am more concerned with it crashing because of the error.

I do have Commit Pending Changes before and after the Update List Item action on both workflows but that doesn't seem to help.

Hello tast​ -

It sounds like the you will need to wait for the updates to finish (timer jobs to catch up). Are all of these workflows on the same list? Is there opportunity to consolidate them into one workflow? This would allow you to add some "Pause for..." actions after each update.

Conversely, you could put your update actions in a loop and if you encounter an error, loop back and try again after 5 minutes. The loop way may be the easiest way since you already know the error it is going to throw, you just need to catch it and evaluate it. Keep in mind that if there are other errors, that can cause issues confused.png

Hope this helps!


Thanks - These are truly separate but parallel workflows. I do not know, and it does not matter which of the tasks is answered first so if one were waiting on the other and it wasn't answered the other workflow couldn't move forward. 

We did initially have these as one complete workflow but if one of the parallel routes failed or had to be restarted for any external reason we were having to restart all routes. In order to mitigate this type of issue we chose to make them separate workflows (as often only one or two of them are even required).

The workflows run great and we have no issues aside from the one user who answers the tasks in rapid succession. So if I were to put the update in a loop how would I capture the error? I know I can capture errors on certain Integration actions but they contain an error handling section, from what I can tell the "Update Item" action has no error handling abilities so when the error occurs the workflow simply fails and that is that - the workflow no longer processes any actions after the failure.

I would love advice on better error handling if there is something I am missing.


Hi,

could you use Update Multiple Items action instead of Update Item? It has error handling section, so you can put it in a loop until it doesn't error..

Giacomo


Morning tast​ -

You could use the Update multiple items action and catch the error there. This may require a bit of testing and determining what the exact error is and will be, but once you have and able to evaluate against it, you should be good to go.

Here is a quick overview of how I would approach it:

186158_pastedImage_1.png

Hope this helps!


I have overcome this issue in the past by adding a Boolean field to the edited record called Locked. When the item is edited by one workflow it first sets the flag to Locked = True, then when the edit is done, change Locked to = False. Each workflow will False until Locked = False so they will wait in line to edit the record.


We've done something similar where we have a workflow that runs on a list that is effectively "collecting" approvals. As the workflows on the source item run, as the approvals are made, and update is made to the "collecting" list. So a row exists with a column for each of your approvals against the source list and on that item a workflow using the Wait for Item Update action sits and waits for a value to be written into each field. Only when each of those fields have had a value written into them, will the workflow on the "collecting" item progress.

Source List

Workflow Approval 1 > Update Item 1 in Collecting List (Column 1)

Workflow Approval 2 > Update Item 1 in Collecting List (Column 2)

Workflow Approval 3 > Update Item 1 in Collecting List (Column 3)

Collecting List Workflow against Item 1

Wait For Item Update (Column 1)

Wait For Item Update (Column 2)

Wait For Item Update (Column 3)

As you have 3 approvals you could stick each of those "Waits" in parallel actions and then they'd just wait for the final one to complete before moving on.

Hope this helps in some way.


Reply