SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Workflow
>
Go to a previous step in a workflow.
Go to a previous step in a workflow.
- I am designing a custom workflow that needs to perform an action when an item is created (step 1), check a field in the item to see if it has been updated (step 2), go back to step 1 if the field has not been updated or go to step 3 if the field has been updated. Does anyone know how to cause the workflow to back to a previous step?
Answers
this should get the job done http://spdactivities.codeplex.com/wikipage?title=Start%20Another%20Workflow&referringTitle=Home jsut write second workflow to check this every time and use this addon to start it. OR just do the same as about and add some random field that updates to trigger a workflow on edit like i said before.
- Proposed As Answer bySteve_Kopp Thursday, November 05, 2009 10:14 PM
- Marked As Answer bybwilli03 Friday, November 06, 2009 2:45 PM
All Replies
- You shouldnt need a "go back" step just seperate them into 2 seperate workflows and have your second workflow be step 2 and 3, set a condition in step 1 if the X value Equals what your looking for peform X (action) if it doent match ntohing happens.. and next time the user changed that document the workflow will simply run again and do what you want.
Make sense? - Not really. The issue I have is when a user opens a ticket, a priority is assigned. If the priority is 1, the person who the ticket is assigned has 1 hour to resolve it. There is a Status field which has the following choices: Active, Acknowledged, Resolved, Closed. The ticket has a Deferred Till date time field that is set to 1 hour from create once the ticket is assigned to a user. After the user is assigned the workflow pauses for 1 hours. After the 1 hour pause the workflow checks the ticket status. If the status is not Resolved, it sends an escalation email, defers the ticket for another hour, and the workflow pauses for 1 hour. I then need it to loop back to check the status once the 1 hour has passed and go back through the escalation process if the status is not Resolved. The only way I see to accomplish this without being able to loop back to a previous step is to keep writing duplicate steps to check and escalate. This could also be done by writing a step that says "If status = Resolved goto Workflow 2. If status != Resolved goto Workflow 3".
Any ideas on how to accomplish this would be greatly appreciated.- Proposed As Answer bySteve_Kopp Thursday, November 05, 2009 10:12 PM
this should get the job done http://spdactivities.codeplex.com/wikipage?title=Start%20Another%20Workflow&referringTitle=Home jsut write second workflow to check this every time and use this addon to start it. OR just do the same as about and add some random field that updates to trigger a workflow on edit like i said before.
- Proposed As Answer bySteve_Kopp Thursday, November 05, 2009 10:14 PM
- Marked As Answer bybwilli03 Friday, November 06, 2009 2:45 PM
- Yeah, you can't loop in SPD workflows - it requires a Visual Studio workflow. However, instead of writing continual escalation steps that could be indefinite in number, have the workflow stop its pause, check the status, and then set a flag on a field (set field in current item) followed by stopping the workflow if it's not resolved. This will cause the workflow to re-iterate, and your first step should immediately check that flag and the status so that it can decide to pause another hour or not. Just keep iterating through until it's complete. This can be done with one workflow repeating itself until the issue is resolved.
However, this will not work if you have SP2 installed, because they fixed the issue where the workflow re-starts if a field was changed by the workflow.
SharePoint Architect || My Blog - That worked perfectly!!!! Thanks for the help!


