I'm quite desperate with an issue regarding Nintex WF 2013 and hope someone can give ma a hint.
We have a list workflow (started at item creation, state machine, run as workflow owner).
In the initial state, after some actions are done, an email will be generated, a SharePoint web service (/_vti_bin/Lists.asmx) will be called to get context items attachments and than permissions of the context item will be set.
It is configured to remove existing permissions and to give some groups (amongst others "workflow owner" as the state machine is executed as workflow owner) "full control" and some users used in the workflow "view only" permissions.
Okay, the workflow runs fine and do exactly what we want. But sometimes it an error occurs while changing the item permissions.
I thought may be the actions above will be executed in parallel and there is a timing problem, so I added "Commit pending changes" before changing item permissions, but the error still occurs sometimes.
We extracted from ULS log file entries related to the workflow instance id, get the correlation id and extracted everything we found. And in fact, there was an error, but I do not understand it. Here it comes:
(http://servername.com/sites/sitename/Lists/eDelRequests/NewForm.aspx?Source=/sites/sitename/Lists/eD... Nintex.Workflow.NWException: Error getting context data for 'ContextItemDisplayName'. ---> System.Exception: Cannot find item with id 0 in list 'eDelRequests'. Check the user has at least read permissions. Current user: i:0#.w|domain\accountname. ---> System.ArgumentException: Item does not exist. It may have been deleted by another user. at Microsoft.SharePoint.SPList.GetItemById(String strId, Int32 id, String strRootFolder, Boolean cacheRowsetAndId, String strViewFields, Boolean bDatesInUtc, Boolean bExpandQuery) at Microsoft.SharePoint.SPList.GetItemById(String strId, Int32 id, String strRootFolder, Boolean cacheRowsetAndId, String strViewFields, Boolean bDatesInUtc) at Nintex.Workflow.NWListWorkflowContext.FBs=() --- End of inner exception stack trace --- at Nintex.Workflow.NWListWorkflowContext.FBs=() at Nintex.Workflow.CommonDataItems.GetItemDisplayName() at Nintex.Workflow.CommonDataItems.GetValue(String key, ContextDataOptions options) at Nintex.Workflow.ListWorkflowType.GetContextItemDisplayName(NWWorkflowContext ctx) at Nintex.Workflow.NWWorkflowContext.Bhs=(ContextDataOptions Bxs=, Boolean CBs=) --- End of inner exception stack trace --- (Build:3061)
I still think there is an asynchronous task which collide with set permissions action, but don't know how to solve it. May be someone have an idea.
oh, sorry. it was Nintex WF 2013...
Solved! Go to Solution.
thank you for this information. Yes, I saw this recomendation, but after the "set permissions" item happens nothing excepting a state machine change, so I ignored this.
But I will implement it and test it. The problem is, this issue occurs not every time - so it is quite difficult to test.
Do you think this could realy be the solution with "commit pending changes" action after the set permissions? Or any other ideas?
let's see if this helps. I implemented the "commit pending changes" action before and after the "set permissions" action. Hope the problem don't arise again.
If I'll get this issue again, I would try to pause instead of commit changes. But before or after the "set permission" action? Again: As after the "set permission" action nothing happens excepting state machine change, I think I should make a pause before the "set permissions" action...
What do you folks think?
nope, unfortunately adding "commit pending changes" before and after the "set item permissions" action don't solve this issue.
I will check the possibility to replace at least the "commit pending changes" with a pause action, but it is ugly to wait such a long time for the workflow...
someone else an idea?
this workaround works for me (even it is ugly)...
I build following sequence:
This version is now productive since one month and we don't received this problem yet.