SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using SharePoint 2013 and I have created a calendar (based on the Standard calendar list template). After that I switched on Content Approval for this calender in the versioning Settings. After that I added a workflow (based on the Standard SharePoint 2010 Approval Workflow and selected 'Update the approval status after the workflow is completed (use this workflow to control content approval).' The workflow is also set to automatically start when a new item is created.

Now I added a new item to the list. An email is sent and a new workflow Task is created. I opened the newly created Task and click on 'Approve'. After that another email is sent and the workflow Task is set to finished. The workflow history of the item Shows that it has been approved.

But when I open the item the approval status shown here is still on 'Pending'.

In other words: although I created a workflow and activated Content approval. Although the workflow Task is finished (approved) the Content Approval state of the item is not updated - stay on 'pending'.

I can't find an error in the logs.

share|improve this question

I observed the same behaviour on SharePoint 2013 and did the following:

e.g. change

If Workflow Context:Association: Start on Item Change equals No
    if Workflow Context:Association: Start to Approve Major Version equals Yes
    or Parameter: Enable Content Approval equals Yes
        Set content approval of item that the task process is running on to Pending (run as the workflow author)

to

If Workflow Context:Association: Start on Item Change equals No
    Set content approval status to _Pending_ with _Content approval is pending_

The modified workflow doesn't consider the association properties, thus always writes the content approval status (_ModerationStatus). This works for me...

share|improve this answer

Make sure you have the site feature "Workflows can use app permissions" activated. Without it you will not be able to change the status of content approval. With it enabled your initial workflow will work like a charm.

share|improve this answer
    
Can I assume that none of the above applies to a SharePoint 2013 workflow as I don't have a Set Content Approval Status Action – westerdaled Nov 5 '14 at 17:37
    
"Set content approval status" do surely exist in SP 2013 Workflows @westerdaled :) – Robert Lindgren Jan 27 at 12:01
    
@RobertLindgren, no, that action does not exist in 2013 worfklows: msdn.microsoft.com/en-us/library/jj728659.aspx – ChrisPEditor Apr 25 at 15:32
    
Strange, pretty sure I have used it in a 2013 workflow (at the same time a wrote the comment above) – Robert Lindgren Apr 25 at 15:35
    
Like this: <local:SetModerationStatus Comments="{x:Null}" ItemId="{x:Null}" ModerationStatus="Approved">, is that not 2013 WF code? @ChrisPEditor – Robert Lindgren Apr 26 at 6:08

Late to the party I know...but I had a similar issue to this where when my workflow would hit a different stage the approval status would switch back to pending. Because I like the built in approval functionality of a list I didn't want to give that up to roll my own approval workflow, instead I wanted to keep using that built in approval but there were certain stages of my workflow where the item must have been approved to reach, however it would confuse the users to see pending in the column after they have already approved the item. Additionally I wanted my users to continue to see the stage the workflow was in. So what i did was a little hacky, however it seems to do the trick.

  1. Enable the site feature "Workflows can use app permissions"
  2. Open SPD'13 to your site, if you had it open already you may need to restart the app in order for it to detect this change to your site.
  3. Add an App Step and then set the content approval status in the current item to Approved. Essentially this will "fix" the status of approval.

There will still be a brief moment where by the status shows as pending, however once the wf hits that app step it sets it back to the appropriate status. This was a great source of frustration for me so I hope this will help someone else down the road.

So it would look something like this in SPD'13: App Step

share|improve this answer
    
This seems impossible to me. "App Step" is only a feature of SharePoint 2013 Workflows, but "Set Content Approval Status" only appears in SharePoint 2010 Workflows. :( I hope I am just missing something, because I really need to get this working! :) – Shayne May 30 '15 at 19:13
    
@Shayne I'll double check that when I go back to work, but I'm sure I took that snip right off my designer UI. – Lazy Coder May 31 '15 at 20:19
    
Boy.. I sure do hope so! I have been trying to figure out how to do a "proper" Document Set Approval Workflow for almost a FULL week now! That is my biggest complain with SharePoint. After 4-5 years of development experience, I still run into "silly" problems like this (regularly!) that take days and days to solve! – Shayne Jun 1 '15 at 23:27

Please do not check "Change item starts workflow" checkbox, and it Approves!

enter image description here I also activated "Workflows can use app permissions", but don't think it is necessary.

share|improve this answer

protected by Community Sep 4 '15 at 18:40

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.