When uploading a document multiple times to a SharePoint Library and making use of a User/Group content type column within the Library, the process instance goes into error state on the second upload when changing the User/Group content type metadata.
For example, when the Document Event uploads a document three times within a process and changes the User/Group content type metadata with each upload, if the User/Group content type metadata is set to an empty value on the second upload, an error “Group cannot be found” occurs and the process instance will go into error state.
|Note: The circumstances described in this article are one scenario under which this issue may, or is known to occur. The description is intended to be specific to the scenario described and does not take into account all possible scenarios or circumstances.|
To reproduce this error:
- Add two AD users as SharePoint users (User A and User B)
- Ensure these two users are part of an AD Group and add this group under the People and Groups settings in SharePoint
- Create a Form Library in SharePoint
- Add a Site Content Type column of type Person or Group
- Add a column using the Site Content Type to the Form Library which was created in Step 4
- Publish an InfoPath document to the Form Library and assign rights on the parent site for the Group, and to the two users respectively.
- As per Image A figured below, build a process with three SharePoint Document Events that all upload [see Image B] the same InfoPath document to the same Form Library.
- Update the Metadata by assigning User A to the first SharePoint Document Event as per attachment [see Image C]
- Leave the second Metadata update options blank (as the default).
- Update the Metadata by assigning User B to the third SharePoint Document Event.
- Deploy the process.
- Start an instance in K2 Workspace.
- Although both users and the group have rights in SharePoint, the error stated below occurs on the second upload where the metadata is empty for the User Group Content Type column.
Fig. 1. Image A - Multiple Document Events
Fig. 2. Image B - Upload Document
Fig. 3. Image C - Document MetaData
Server was unable to process request. ---> User:MOSS2007\username
Microsoft.SharePoint.SPException: Group cannot be found. at Microsoft.SharePoint.SPUserCollection.get_Item(String loginName) at SourceCode.SharePoint.WebServices.K2SPFunctions.K2SPUsersGroupFunctions.GetUserid (SPObject spObject. String userLoginName)
This Hotfix is contained within the latest K2 Update. Install the update package to resolve the error.