0

I have document library with 2013 workflow which starts when document “checks in” then it starts “approve task” for user who has permissions to approve/reject documents. The problem is: this user can approve/reject not only through the “approve task”. He can also approve/reject the task through the item menu. And when he does it, the item gets approved or rejected, but the workflow still waits for “approve task”. I have created another workflow to find out when the item is “approved/rejected” not through the task. This another workflow sends emails to users by mailing which shlould be created when the first workflow ends.

What can I do for task closing when user approves/rejectes file through the context menu?

0

It shouldn't matter how the user is getting to the workflow task assigned to approve or reject. It sounds like there might be an action in the workflow that is specifically setting the workflow status to the unexpected result.

What does the workflow history tell you?

I'd suggest putting in some logging in the workflow then approve one and check the values are what you are expecting to happen.

  • You understand not right. User doesn't touch task. User press approve button from item menu. – Daniel N. Feb 6 at 15:59
  • Ah, I understand now Daniel. You are using the "Content Approval" feature versus a workflow built in Designer and associated with the library. These are two separate approvals and aren't related to each other. This is why your other workflow task appears to be still waiting. The Content Approval feature is meant to be a very simple workflow. I suggest turning this off and just using a normal workflow. – gsr51 Feb 6 at 16:21
  • To turn that off go to Library Settings / Versioning Settings / Require content approval for submitted items = No – gsr51 Feb 6 at 16:22
  • Sorry but it looks like one "Content Approval" mechanism for menu buttons and my workflow. If I turn off "Content Approval" it is break what I needed from my Documents Library. ( – Daniel N. Feb 7 at 7:17
0

From the sounds of it, you don't want the user to be able to approve/reject through the item menu.

You can add CSS to the library views to prevent the user from even seeing those buttons, forcing them to go through the means you want.

If you want to do this, go the library view, edit the page, add a content editor, edit the source of the content editor, and add something to the following effect

<style>
#Ribbon.Documents.Workflow-LargeSmall-1{ display:none }
</style>

Mind you, you may need to use F12 to select the desired element to figure out its ID or CLASS that you can use to target it with CSS.

Let me know if that helps or if that is desirable.

  • Thx for answer. Maybe it is ok if user can approve through menu. I just want to stop workflow or task when user did this. Is this working for "modern view"? – Daniel N. Feb 6 at 15:56
0

I found a solution for me:

  1. I changed permissions for users who can approve from “Full Control” to “Edit”. This action removed “approve/reject” button from item menu for users who should approve. But that disallowed them to see the draft items.

  2. In Library Settings -> Versioning Settings I changed “Draft Item Security” from “Only users who can approve items” to “Only users who can edit items”.

Now approvers can see changes, and they can approve only through “approve tasks”.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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