Skip to main content
Added Code
Source Link
Schugs
  • 1
  • 1
  • 2

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

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

Thethe issue Ii have, is that Ii want the workflow to withwait 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 BUT if everyone gives thiertheir approval early, to let it continue.

Can anyone help me on how I might get this going? I I have it working so that it can wait for all 3 approvals, or it can wait for the given time, but I want it to respond to whateverwhichever 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

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 when 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 with 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 thier approval early, let it continue.

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

Thanks in advance!

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

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

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

theThe issue iI have, is that iI want the workflow to with until EITHER all 3 teams hvaehave 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 thier approval early to, let it continue.

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

Thanks in advance!

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 with until EITHER all 3 teams hvae 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 thier 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 whatever is first.

Thanks in advance!

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 when 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 with 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 thier approval early, let it continue.

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

Thanks in advance!

Source Link
Schugs
  • 1
  • 1
  • 2

Workflow wait for task complete OR date/time

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 with until EITHER all 3 teams hvae 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 thier 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 whatever is first.

Thanks in advance!