cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Intermittent Errors Updating List Item and Setting Permissions

I have a workflow in which I must both update an item and set the item permissions. Intermittently the workflow throws an ambiguous error (e.g. "An error has occurred in [name of the workflow]"). E.g. an error occurred somewhere in this series of actions...

Series of actions in a Nintex workflow diagram

In this instance, the "Update Action" item was successful, but the item permissions were not set, and the workflow did not proceed beyond this point.

I've tried reversing the order of these actions (set permissions first, then update item) and have tried with and without the "Commit pending changes" action.

I'm speculating that either I'm stepping on my own toes (one action makes the list item unavailable for the other action) or that users are trying to update the item at the same time (making the list item unavailable), but I don't know how to diagnose this further.

Next step is to create a new text field, write something unique to it in the "Update item" action, then use it in conjunction with a "Wait for item update" action and put that in front of the "Set item permissions" action.

Is there a best practice for this?

Labels: (1)
0 Kudos
Reply
12 Replies
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

try to add pause for action after the first commit

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

Thanks for the suggestion. I've tried that and it doesn't change.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

I've been busy. Since the last post I've been trying increasingly desperate things to try and mitigate this problem, including:

  • Removing either the permission or the update action.
    • Thinking that these two were somehow interfering with each other I tried the update action only, and the permission action only.
  • Error trapping using Update Multiple Items.
    • The "Update Multiple Items" action allows for error processing. I set up a loop that would keep trying an update if it failed, up to 5 times and send me an email with error details if/when it failed. Was unable to ever "trap" an error using this method, and it appears that it's not the update action itself causing the workflow itself to error.
  • Avoid Locking Issue by Setting Permissions.
    • I tried changing item permissions first to just an admin account, and then making the update, and then changing the permissions back to normal.
  • Test to make sure the update is completed before continuing.
    • Set a variable to the item's modified datetime, then executed the update item action, then used the wait for the item to update action to wait for the modified datetime to exceed the variable before continuing.
  • Tried reversing the order of Update Item and Set Permissions.

Nothing I've tried so far makes a bit of difference. Errors continue to occur intermittently and seemingly at random and (I haven't started gathering metrics on frequency and rate) seemingly at the same rate. Every day I seem to be clearing 10-20 errors (never 2 or 3, and never 50).

My latest theory is "maybe the workflow is just too complicated" so I'm doing what I can to simplify. It's basically a series of 8 "Run if" actions, one of which is intended to run. I'm replacing the "Run if" statements with a single switch statement (does that make any difference under the hood, or just make me feel more organized when I view it?) Next I plan to break the "run if" actions into separate workflows (so my switch statement will select the right workflow to run). I have no reason to believe this will help (better to run two simpler workflows than one complex workflow) but I'm sort of at the "try anything, hope, pray" stage of troubleshooting.

Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

Have you tried just a workflow with just the update action to see how that fairs?

also as above but with static values (rather than passing in any variables)

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

I have tried just the update action alone (e.g. I've removed the permission change but within the context of the larger workflow), but not sure exactly what you mean about the static values. Some of those update actions update fields with both static values (e.g. I type in the value); some use workflow variables, and some use the values of other columns.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

so you say the workflow was failing even in the case you removed set permission action?

then it doesn't seem an interaction between the two cause problems.

can you provide any details on update item action? does it update an item which the workflow runs on? or is it an item from a different list?

what type of columns do you update? typically lookups and people fields cause such intermittent problems.

can you try to add commit changes action before update item action? - to proof check whether changes previous collected changes doesn't in fact cause problems, but are applied together with your update action.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

I'm updating the item on which the workflow is running.

Type of columns I'm updating. In one instance I'm updating:

  • 1 Single Line of Text
  • 1 User
  • 1 Datetime
  • 1 Number

I have added a Commit Changes action before the Update Item actions and will see how that goes.

Thanks for your suggestion.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

I would guess people field causes problems.

it internally behaves like lookup, and as mentioned above these can often cause problem.

could you try without that single field?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Intermittent Errors Updating List Item and Setting Permissions

Thanks so much for all of your suggestions. Errors occur even when this step is removed entirely; however, I did try removing the user field update only for a week, and there is no noticeable change. Errors continue happening at about the same rate.

0 Kudos
Accept as Solution Reply