Requirement: Generally, almost all stage-gate project processes require the project to be baselined after a certain point in the process, commonly after planning is completed. The idea here is to build in a check, to see whether a baseline has been set or not, before moving to the next stage (or) starting the next step in the process.
I have to confess. The inspiration for this blog post came from this Nintex tutorial. If you are using Nintex, check the tutorial out. With Nintex, they show how one could use the Query Project Server option to query project server data, to check for the baseline.
I wanted to see if this could be done via the SharePoint Designer 2013 Workflow in Project Server 2013.
So, lets get started.
Step 1: Create the Custom fields to check for Baseline
To start off, we will create two custom fields, one to check for the baseline at the Task Level, and one to check for Project Level Baseline.
Create a Task Level Custom field, a Number field, as below. Make sure you set it to roll-up as SUM for Summary rows. We will call this field Baseline Check.
Next create a Project Level Custom field, we will call this Project Baseline Check, as below.
So, the idea here is that, for every task in the schedule that does not have a baseline in the schedule, the task custom field, Baseline Check will return 1, and sum up to the project level custom field, project baseline check. Now all we have to do is to check if the Project Baseline Check field is greater than zero, when a project is submitted, and take appropriate action in the workflow.
Step 2: Build the workflow
To get started, open SharePoint Designer 2013, and connect to your PWA Site. Start by building a new Site Workflow, and selecting the SharePoint 2013 -Project Server Workflow.
Add your Project Stages to the workflow. In my example, I use the stages Scope and Portfolio Selection, but really this “Snippet of Workflow” could be used anywhere your process mandates.
So, I build my workflow as follows.
The only step that really requires any explanation here is the, step where In check for the Project Baseline Check value. There all I am using is the condition, If Any value equals Value, and selecting Project Data from the lookup values.
Also, you could send an email to the Project Owner, as well. the Send email action looks like this. (Caveat: Make sure that the Project Owner has a valid email address in the system)
So, complete your workflow with any additional actions you desire and publish it. Do not forget to attach it to an Enterprise Project Type.
Step 3: Test the workflow
So go ahead and create a project, using the EPT you attached the workflow to. It look something like this.
If you look at the schedule, I have not set the baseline yet. Pay attention to the Baseline Check field, which is greater than 0 (which is also the Project Baseline Check)
Now, if you go ahead and submit the workflow, you will see that the Project returns back to the Scope Stage, and does not advance.
If you look at the workflow history log, this is what you will see.
Now, I will set the Baseline, publish the project. Pay attention to the Baseline check field value, which is zero right now.
Now, if I submit the project, you will see that it advances successfully to the next stage, in the workflow.
So, obviously you can add many other actions within these steps, per your requirement.
Final Caveat: The logic in this workflow, assumes that you have published your project before submitting to the Gate. To check for that, you can check the Last Published Date from within the workflow as a prerequisite. More on that in the next post!