We have a requirement where we update the permission for two groups 'Reviewers A' and 'Reviewers B' on the Workflow task list using the webservice and permission mask. For business reasons their permission have to be updated separately. We are facing a issue where the action works for one of the reviewer and fails in another. The permission mask is same and the task list also is same. When we tried to debug it using the Run Now option we got the below error.
<soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">The specified permission cannot be found.</errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80131600</errorcode></detail></soap:Fault>
Thanks in advance.
Does it fail on the same reviewer?
Have you tested first setting rev B and then rev A
Try adding a pause (and perhaps also a "Commit pending changes") between the 2 actions.
You may not have had all the information available for the Run Now to complete correctly. But see if adding a commit pending changes action after each permission change and run the workflow as Fernando suggested. This will force SharePoint to run it's pending batch and apply the updates.