Pergunta

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?

Foi útil?

Solução 3

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”.

Outras dicas

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.

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top