I have created a sequential approval workflow which fires when an item is created or edited. It is a two level workflow which requires approval of both manager and HR. I have implemented it. But now there is a requirement where the manager can approve the task either by editing the task item and changing the status to approve or by adding his signature in the signature field. So to achieve that I have used onWorkflowChanged functionality but I am unaware of how to use them both in the workflow. So if the manager signs the form,the manager approval task should get completed and should create HR approval task.

Can any one please help me out as to how to achieve this functionality.



Can you not start an out of the box approval task and build it into your sequential logic?

The other way would be to create some hidden fields to use them as triggers, even just a "flow" variable that works out the point in the business logic that you are currently at and has a final end point.

You could then do one of two things, you could create some small workflows with pause/wait conditions and start them in sequence, or you can set up the conditions to run in parallel within a stage. As long as the end condition for any of the scenarios "ends the workflow" you should be able to achieve this easily.

Overview here: http://talkingsharepoint.sharepoint-videos.com/sharepoint_1/SharePoint/sharepoint-designer-2010/use-a-parallel-block-to-enter-two-conditions-for-a-workflow-built-with-sharepoint-designer-2010/

  • I am using a custom sequential workflow because the workflow triggers when the item is created or edited. The problem with the designer workflow is that when I am approving or rejecting the item, the item status changes which the workflow considers as item being edited and the workflow starts again leading to an infinite loop. I solved this issue by creating a custom work flow with a task. Now my requirement is instead of manager signing and then approving the application in the task, on signing itself I need to update the status and stop the workflow. Is there any way to achieve that. – Adwaith Reddy Aug 10 '15 at 14:48
  • You can do it in the SP Designer workflow (custom yes, coded no), but forget about the normal sharepoint approval variables, use your own... then you can have full control over what is triggered. Map out what you want the flow to be and then workout how many variables you need.... you might only need one and you can validate the string in if statements "manager signed", "manager approved", "waiting approval" - that kind of idea? You'll possibly also need a couple of date/time variables and you'll need to set them based on the stage you are at and the objective. I hope that makes sense – GrantMcW Aug 10 '15 at 23:33
  • If your building something in Visual studio then maybe someone else will be able to help, that's not something I've spent much time on (yet) – GrantMcW Aug 10 '15 at 23:43
  • Thank you for suggesting this Grant. I have tried doing that in SP Designer but when ever I am updating the status in the list, the workflow is considering the status update as an item edited and it is triggering the workflow again. To avoid that I have developed a custom workflow. – Adwaith Reddy Aug 11 '15 at 15:00
  • Oh right, I'm with you. Yeah, I only triggered the workflow on item added. It should be written with the waits and pauses initiated at the start. – GrantMcW Aug 12 '15 at 0:43

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.