Solved

Workflow encountering an error in "Pause for" action. [SharePoint On-Prem]

  • 24 February 2023
  • 2 replies
  • 138 views

Badge +2

Workflow Description: When a new task is created in the "Workflow Tasks" list, a workflow is started on the item. The workflow has the following two features;

  1. Set the item permissions.
  2. Create a new item in another list, pause the workflow for 5 minutes and update the permissions of the item.

Error: The workflow is encountering a sporadic error in the "Pause for" action. This is required, as we need to give time for the item to be created, before updating the permission for the newly created item.

Additional Information: The actions mentioned above are inside an "Action Set" action, with "Run as workflow owner" ticked. The owner of the workflow has 'Site Collection Administrators' permissions.

Workflow History Error:

UpdatingItemFields is the name of the workflow.

 

Any assistance regarding this issue, is greatly appreciated! 

icon

Best answer by JeremyA 29 March 2023, 08:12

View original

2 replies

Badge +2

We have removed the workflow from the ‘Workflow Task’ list, and made the necessary changes in the main workflow which creates the task itself. 

Badge +5

Jeremy or others, you can also use a Commit Pending Changes action instead of a Pause if you’re creating just a list item (as opposed to a document with DocGen). This completes the creation of the item so that permissions can be changed.

You should retain the item ID of the newly created list item and perform a Query of the target list using the new item’s ID. This gives you a way to validate the item exists before acting on it.

Hope this helps,

Gman

Reply