2

am new to SharePoint and I'm working on a workflow which has the following steps:

Document is uploaded
First approver (employee) approves
Second approver (manager) has the ability either to approve, reject or reassign the task
If the manger reassigns the task to the employee, the employee reviews the comments and then approved the document

Now the reassignment is not an option for the employee. At the same time the task should be given back to the manager to Approve. Once he approves the work flow should be completed.

How I can achieve that by having a loop of reassignment and making sure that the workflow ends only when the manger approves?

  • Is this SP2010 or SP2013 and is this being created in SPD or VS? – spguy May 28 '16 at 2:43
  • Isharepoint is 2013 Am using SP 2013 But the workflow is using sp 2010 workflow – jenn May 28 '16 at 3:58
1

Ideally you should use an SP2013 workflow in order to use the loop activity.

If you are restricted to SP2010 workflows then one way to do this is to create a sub workflow, which is started by the "Start another workflow" activity.

Essentially:

  • Document is uploaded: Workflow 1 starts
  • Call approval workflow 2
  • Run approval logic
  • if you need to reassign, call workflow 1 again.

Make sure you have clear exit clauses and stop the workflows when conditions are met

You can build in some conditional logic to each of the workflows to identify what elements have to run, but that is one way of creating a loop in SP2010

  • can you explain more... – jenn May 28 '16 at 10:05
  • Based on the example you gave I can't really elaborate more than that, have you tried to run a loop using what I suggested? Your conditional logic should go into your second workflow and you may want to use some hidden fields to calculate what stage of the approval process you are at e.g. If approval status = x, and possible options could be referred to employee, returned to manager, approved. Short of writing the code for you I'm not sure what else to add to that. – GrantMcW Jun 2 '16 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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