Pergunta

Currently, I have an approval task process that assigns a task to an entire group. But only one member of the group has to approve, while it takes two to reject.

I edited the task process completion step to check for any approvals in the task list, unless that task itself was changing the status to approve.

My question is I'm not sure how to check the Workflow Tasks List for an approval related to that specific process. I didn't see a Workflow ID, but not a Task Process ID I could sort by.

Second. The Task process deletes the remaining task assignments since it only requires one approval from the group to complete the task process. I'm all ears for a better implementation.

Foi útil?

Solução

I understand you want approval workflow on a item and approval task is assigned to group. the item is considered approved when any one person in the group approves it but considered rejected only if two persons reject it.

Assuming you start a new custom workflow in SHarepoint Designer, following the pseudo code below should help you.

  1. You may leverage "Start Approval Process" action and assign it to a group {ApproverGroup}.
  2. Create workflow variables: {RejectCount} and {FirstRejectedBy}
  3. Manipulate Approval Task process in steps below:
  4. Choose "Change Behavior of Single Task" with logic like:

if currentTask.Outcome = Approved

set IsItemApproved = yes

else if currentTask.Outcome = Rejected and {RejectCount} = 0

set {rejectCount} = 1

set {FirstRejectedBy} = currentTask.modifiedBy

use "append Task" action and assign task to {ApproverGroup}

else if currentTask.Outcome = Rejected and RejectCount = 1 and
currentTask.modifiedBy = {FirstRejectedBy}

send email (action) to currentTask.modifiedBy that you have already rejected

use "append Task" action and assign task to {ApproverGroup}

else if currentTask.Outcome = Rejected and RejectCount = 1

set IsItemApproved = no

  1. Finally, modify "completion condition" of the approval task process so that it is based on value of {IsItemApproved}, not based on count of remaining and pending tasks.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top