• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1018
  • Last Modified:

SharePoint Approval Workflow

Hi,

I have created a SharePoint Workflow which is set to start an Approval process when an item is created. This obviously gives our users the option to approve or reject a document.

What I am looking to know is if it is possible to set a loop on the item rather than ending the Workflow if it is Rejected. For example if the item is Rejected the Workflow waits for the Item Version to change (as the changes where made as requested by the approver) and it then resubmits the document for Approval.

I need to be able to set a number of Rejections before the Workflow ends. For example every time the Document is Rejected the Workflow waits for the Version to change and then sends it back for Approval up to 5 times before the Workflow ends - this allows for changes to the document, typos etc.

This sounds quite easy to do but I don't see any obvious way to specify a Rejection Limit on the Workflow as I'm quite new to SharePoint Designer and Workflows etc.

Any help would be greatly appreciated.

Thanks
Tugsol
0
Tugsol
Asked:
Tugsol
  • 5
  • 2
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

you could include a column in the list to keep track of the number of rejections. Each time the document gets rejected, increment the counter. Once the threshold is reached, end the workflow.

cheers, teylyn
0
 
TugsolAuthor Commented:
Hi Teylyn,

That sounds good. Could I get a bit more detail how to do this though? I'm pretty new to SP and Workflows.

Would the Rejection Column be a custom column that I create and call it that, or is this an existing Site Column that can be integrated into the Workflow?

How would I design my Workflow to use this? Would it be a new task each time or would it be the same task which keeps getting sent back for approval.

If you could give me an idea of how I should have the task process set up to do this that would be great. I'm guessing it would be something along the lines of what I have below?!?

If No of Rejection equal 0
  Set Workflow Status as Approved

If No of Rejections equal 1,2,3,4,5
   Email task notification to Current Item: User

Else Set Workflow Status to Rejected.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

You can create a new column in the list/library and set it to be a number.

I assume that the rejection status gets set by the person in charge of approving. They will set a field to a value. Probably a choice field with two choices, "Approved" and "Rejected". The workflow can check for the approval status, and if it is "Rejected" it can look up the column with the number of rejections and add a 1 to the value.

I'm not in front of SharePoint Designer right now, so I can just give you the logic in pseudo code. Something along the lines of

If Status = Rejected
   Rejections = Rejections + 1 ' this may actually take a few more lines of code in SPD
   If Rejections greater than 5
       Set field Status to "Rejected limit exceeded"
       end workflow
   else 
       continue workflow with approval cycle
   end of IF clause
else
   end workflow
end of IF clause

Open in new window

0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
TugsolAuthor Commented:
Hi teylyn,

No problem. I'll get a look at testing it this morning and I will let you know.

Thanks
0
 
TugsolAuthor Commented:
Hi teylyn,

I couldn't quite get that to work but I think we're on the right lines. What I have set up so far is listed below.

Else if Current Task:Outcome equal Rejected
        Calculate Current Item:Rejections plus 1 (Output to Variable: Cal Reject
         then Set Rejections to Variable: Cal Reject

         If Current Item:Rejections is greater than 5    
           Set workflow status to Rejected

         Else
                Email task notification to Current Item:Employee


When I run this Workflow and reject the current task it sends me the task notification (as the Rejections are less than 5) but it says the Task has already been completed and the Approval Process has completed.

Any ideas? I'm sure it's probably fairly simple from here.

Thanks
0
 
TugsolAuthor Commented:
I just amended my Workflow to allow me to use the Start Workflow on Item Change option.
0
 
TugsolAuthor Commented:
Correct answer.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now