How to keep track of the stage in Custom Task Process of SharePoint designer workflow

In this post I want to introduce you a technique to keep track of in which stage you are in. when you are using the Custom Task Process in SharePoint workflow designer, it is very useful to know in which assignment stage you are in and based on that information you can do some customizations, for example you can change the title of individual task, or send the notification emails or other requirements you may have.
In a series of posts, I am describing the different features of Custom Task Process in Microsoft SharePoint designer. You can see a list of link to all posts here.

 

It is better you first create the simple working example of Custom Task Process in SharePoint designer and then you can check other posts that you are interested in.

Please bear in mind that the technique I am describing here is for the workflow which we are developing through a series of posts. In our example we have a serial approval process between three parties. If you want to change this logic, for example add some parallel steps or have a combination of parallel and serial steps or change the completion criteria of the workflow, you have to tweak this technique to suit your needs.

To develop the Custom Task Process workflow and keep track of the stage, I use SharePoint Designer 2013 with SharePoint Online and SharePoint workflow engine 2010.

First you have to define a new Workflow local variable in your SharePoint designer workflow: varStage

1 workflow variable

Figure 1 – create a new workflow variable

Then you have to assign the first stage value to the varStage variable.

2-1 workflow variable

2 initial varStage

Figure 2 – prepopulate the varStage workflow local variable

then you have to go to the customization page of the custom task process by clicking on the name of the task process

3 -1 custom task process name

 

3 custom task process

Figure 3 – custom task process customization page

Then you have to click on the Change the behavior of the single task link in the custom task process customization page.

 

4 single task behavior

Figure 4 – click on the behavior of a single task

Then scroll down to the “When a task completes” section and add these criteria:

5-1 criteria

 

5-2 criteria 2

 

5-3 criteria 3

 

5-4 criteria

 

5-5 complete criteria

Figure 5 – criteria to change varStage

 

By this technique you have the stage of the custom task process in every stage in a local workflow variable called varStage, so you can use it to customize the different aspects of workflow tasks

About

MCSE, PMP, With more than 12 years experience in Microsoft technologies.

View all posts by

2 thoughts on “How to keep track of the stage in Custom Task Process of SharePoint designer workflow

  1. I want to track activity of the SharePoint workflow. Sometimes it happens that i cannot restart the WF as well. Please suggest the way to overcome these issues

    1. You can define a new column in your list and write the status of your workflow in that column. Moreover, it is possible to change the OOB workflow column to reflect the latest status of your workflow and keep track of that.
      What is the problem that you cannot restart the workflow? normally, you have to terminate the workflow and then start it again.

Leave a Reply