Question

I've gone through and enabled content approval for a given document library. I've created a new 2013 list workflow and associated it with the library. I want to add an action to set the content approval field to a value. This field doesn't appear in the list of available fields to select. Lacking the set content approval status action from 2010 workflow, it is not immediately clear to me (or apparently anyone else on the internet) how to accomplish the same thing using 2013 workflow.

I am very clearly doing something wrong here. Any direction would be much appreciated.

Was it helpful?

Solution

You need to use the Workflow Interop Bridge.

  1. Create, publish and associate a 2010 workflow with a single "Approval" parameter and a single Set Content Approval action. Make sure you set the workflow start options to restrict manual and automatic start. Basically, you don't want users using this workflow directly.
  2. Use the Start a Workflow action in your 2013 workflow to start the 2010 workflow and pass in the appropriate approval parameter value.
  3. Remove the 2010 Workflow status column - after running the workflow the first time, go into the default view and remove the 2010 workflow status column. Now your user's won't even know that a second 2010 workflow is even being run.

Yes, the interop bridge seems kinda hokey! The issue is that the new Workflow Manager talks to SharePoint using the REST API, and all the content management features that are missing in 2013 workflows is based on the fact that the REST API doesn't provide the required functionality. I started going down the path of writing custom workflow actions to replace all the missing functionality in 2013 and basically couldn't.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top