SharePoint - The documents can only be viewed by workflow stakeholders

Here is the scenario:
Company users upload documents to Reusable Snippets document library, and they wish to start approval workflow after uploading the document.The document can only be viewed by owner and  assignee/reviewer.

The Versioning Settings of this document library as follows:

I start to create and edit workflow in SharePoint Designer, the workflow structure:

After I deployed it to the site, I encountered error message when I tried to log on as assignee/reviewer account to test workflow, it displayed "An unexpected error occurred." when I opened the assigned task. If I select "Any user who can read items" in Draft Item Security section of Versioning Settings, then fix permission problem, but that doesn't meet users' requirement. So I edited workflow:
I created Impersonation Step before the step Reviewer reviews snippet and provides feedback, in my case, I used same condition as assigned task to activate it, and added action Add List Item Permissions, this action only show up when moving mouse cursor inside Impersonation Step.
Click these permissions
→ Add
→ choose assignee field (this field created from previous step) and tick Approve permisssiioin.
The updated workflow:

PS. After that, I found that SharePoint created [Site_Name Workflow users] group in Site permissions.

No comments:

Post a Comment