0

I'm just getting into sharepoint dev, and working on trying to create a workflow that is for "document approval" essentially.

the logic needs to be that a document is created, it gets an "approval date" (or due date). and there are 3 different teams that will give their approval.

the issue i have, is that i want the workflow to wait until EITHER all 3 teams have given approval --OR-- when the due date is there.

Think of it as a "you have until this time to give your approval" BUT if everyone gives their approval early to let it continue.

Can anyone help me on how I might get this going? I have it working that it can wait for all 3 approvals, or it can wait for the given time, but I want it to respond to whichever is first.

Thanks in advance!

-EDIT- Here is the code i have now. The parallel is set to complete with the Variable:trigger is true. But it is never getting to completed even after both tasks are marked as Approved. Thoughts? Is there a better way than this?

Stage:Request Approvals
    Assign a task to Mat Scherger (Task outcome to Variable: OPSApproval | Task ID to Variable: OPSTaskID )
    Assign a task to Mat Scherger (Task outcome to Variable: COMApproval | Task ID to Variable: COMTaskID )
    Set Workflow Status to Waiting Approvals
    Set Variable: Approved to Rejected

Transition to stage
    Go to Waiting for Approvals


Stage:Waiting for Approvals
    Set Variable: trigger to No
    The following actions will run in parallel:
        Step: Department Approvals
            Wait for Event: When an item is changed (Output to Variable: itemtrigger )
            If Variable: OPSApproval equals Approved
            and Variable: COMApproval equals Approved
                Set Variable: Approved to Approved
            Set Variable: trigger to Yes
        Step: Wait for Due Date
            Pause until 7/29/2014 9:52:00 PM
            Set Variable: Approved to Approved
            Set Variable: trigger to Yes
Transition to stage
    If Variable: Approved equals Approved
        Go to Completed
    Else
        Go to Waiting for Approvals

2 Answers 2

1

Other way is , create calculated filed to show "yes" if all 3 app rovers have approved else "no".
Then using parallel block :
1st block - wait for due date
2nd block - wait for field change in current item (newly created calculated to "yes")

last step of both workflow should be "stop / end workflow"

0

I'm assuming SharePoint 2010, but you can use the parallel blocks in order to do this. Make sure each chain stops the workflow if it completes so that the other side stops.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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