This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Workflow - Multiple Approvers Who All Must Complete Review

I am trying to build a workflow that tracks approval of a document by multiple parties with a workflow state transition that does not occur until all assigned reviewers have approved or rejected a document. 

For example, I would like to create an approval that looks like the workflow below. Unless I'm missing something, the OOB configuration will trigger a state transition only when all assigned reviewers have approved an assignment or when only 1 reviewer has rejected an assignment. If one reviewer rejects an assignment, the assignment disappears from the other reviewers queue.

Is there a way to make this workflow without needing a Reviewer 1, Reviewer 2, Reviewer 3... Reviewer n property on the metadata card?

Thanks!!

  • You are correct, the built-in behavior for group assignments is that if one assignee rejects, then the whole assignment is immediately rejected.

    I'm just wondering why this wouldn't work in your case. Looking at your workflow diagram, the document will return to Draft state if all approvers didn't approve  couldn't you just return there immediately after one approver rejects? This would save the other assignees who hadn't yet had time to review the document some work since the assignment disappears from their task list. Or what is the exact use case and requirement here, perhaps I'm missing something?

  • I need to be able to collect comments from multiple reviewers simultaneously. If everyone approves (i.e., has no comments, then the document can be finalized. However, if one person has comments (i.e., doesn't approve) I still need to be able to collect comments from the remaining approvers. 

  • Thanks, got it now. I think you need to create a separate assignment for each approver to do this. If the issue you are struggling with is that there can be 1N approvers, it might make sense to create the assignments programmatically: you would have one multi-select Reviewers property and when the document moves to the Submit for Approval state, your script/code would create an assignment for each user in that list (instead of using the built-in workflow actions for creating the assignments).

  • I like that idea! Can you point me in the direction of some good code that I can use? I haven't experimented with adding assignments (or other objects) using workflow scripting. 

    Thanks!

  • On second thought I don't think my suggestion would work after all: if even one of those reviewers would reject their own assignment, the object would move to the next step if an automatic state transition was configured for the rejection case.

    Here's a new attempt:

    - Create one separate assignment using the built-in workflow state action, picking up the reviewers from the Reviewers multi-select property (if it's okay that the comments are collected to the same assignment)

    - Do NOT use the normal automatic state transition option for approved/rejected assignments but instead the option "Trigger the state transition once the conditions in a user-defined script are fulfilled"

    - Script the logic for moving the object forward in the workflow when all reviewers have either approved or rejected the assignment

    Sorry for the confusion and I hope that makes sense Slight smile

  • If I understand your suggestion, I believe I tried something similar, but without the scripting. The issue I believe I'm going to run into is that with an approval assignment, as soon as one person marks the assignment as rejected, the other users listed as "Assigned to" all drop off, and the workflow will still transition. 

    I had tried using a workflow in the assignment itself to prevent that kind of transition, but alas, no luck. 

    I like your first suggestion of using scripting to create individual approval assignments for all listed users, but not allowing the document workflow to advance until all individual assignments are completed or rejected. I suspect that will require some scripting, perhaps both on the part of the object workflow, and also on the assignment workflow. 

    Thinking out loud a bit here:
    let n = number of users
    let a = number of users who have approved the assignment
    let b = number of users who have rejected the assignment
    let i = a+b

    Every time a user approves or rejects an assignment, counters associated with the primary workflow increment as appropriate. Once i = n, then the workflow can advance. If a = n, then the document is approved, otherwise the document is not approved and needs to be resubmitted with comments addressed. 

    For this to work I need to know how to use scripting to create individual assignments based on the number of users.

    Alternatively, a less elegant option would be to have Approver 1, Approver 2, Approver 3.... up to the maximum number of approvers I anticipate already be included on the metadata card for the document, then create an assignment for each of those users. If the Approver 5+ isn't populated, the assignment isn't created, and we can all go on our merry way. That may be where I settle, because that is more transparent than scripting. That being said, per your last reply, I think scripting will still be required to manage the state transition. Can you point me in the direction of that kind of scripting?

    Thanks!!

  • Hi AKmarsh Slight smile

    I realize that this is a fairly old post by now, however, we do have something in production that could potentially solve your problem in collecting multiple "comments" in various stages using only, for instance, a single reviewers and approvers property.

    We are working on allowing parallel reviews, currently, they are only sequential.

    If you did not find a solution, then be sure to reach out!

  • I have not found a solution (and haven't had time to develop one myself), so that's great to hear.

    Thanks for letting me know!

  • Hi Fred - I'd be interested in finding out more about the parallel reviews. It's come up in conversations with our clients before.

  • Me too, please share any relevant details to this.,