Using Skip to Stage in Nintex Workflow for Project Server

Blog Post created by Employee on Aug 6, 2014

The Skip to Stage capability of Project Server allows an administrator to skip a workflow to a particular stage, usually as a result of modifying the existing workflow, or swapping to a different workflow and needing to skip over some of the business logic or steps. The steps below are from Nintex Workflow for Project Server 2010, but also apply to Nintex Workflow for Project Server 2013.

change restart.png

Sam Chung wrote an excellent blog post on this over at the Project Programmability blog back in February 2010, and the same concepts apply to Nintex. Consider the flow chart below which outlines a simple Project Server workflow scenario.

flowchart 1.png

Should the administrator wish to skip this workflow to the execution stage, and skip the approval, it is not possible as the workflow has not been coded to allow it. This is where the Skip To Stage information comes into play. When an administrator chooses to skip to a specific stage using the Server Settings > Change or Restart a workflow, the workflow is initiated with two pieces of information:

  • the Skip To Stage parameter set to ‘True’;
  • the StageUID of the desired stage to skip to is passed through.

In the workflow, if logic is added to check for this, then it is possible to bypass the business logic for the stage and skip over. The Project Server workflow engine is clever enough to determine if the stage being skipped to is the stage in the StageUID and will stop the skipping there (however the same caveats that apply for a Visual Studio workflow apply, and if the required fields for a stage being skipped are not completed, the workflow won’t skip).

flowchart 2.png

Incorporating this into a Nintex Workflow for Project Server couldn't be simpler. All that is required is to use the Set a condition action to do a check on the Skip To Stage context variable, and then branch to the approval / flexi task if the value is no, or to skip over the approval logic if the value is yes (see below). In the screenshot below, I have also added a ‘Set Status Information’ so I can log to the workflow that the skip is happening.

workflow design.png

The Skip To Stage information is stored within the Workflow Context, so when setting up the ‘Set a Condition’ action, make sure you select Workflow Context.

Configure Action - Set a condition - Workflow Context

Finally, as mentioned in Sam’s original blog post, you need to ensure you have selected the Always Wait option in your Set Stage actions. If you don’t do this, the workflow may continue to skip past the requested stage.

always wait.png

This post was originally posted Using Skip to Stage with Nintex Workflow for Project Server | epmsource