CustomWorkflowContextProps sample

The CustomWorkflowContentProps sample provides an example of implementing two custom workflow context properties in NintexWorkflow 2013.

Overview

The sample is a Visual Studio 2012 project for a signed, strongly-named assembly that contains two classes:

The methods defined in both classes include code comments for documentation purposes, but do not include exception handling.

The sample also includes a Windows batch (.bat) file, named CreateContextDataItems.bat, that contains the commands needed to define the custom workflow context properties for those two classes. The batch file uses the NWAdmin.exe command line tool to perform an AddCustomDataItem operation for each class. For more information about the NWAdmin.exe command line tool, see NWAdmin Operations - Nintex Workflow 2013.

Using the sample

This sample does not include an automatic deployment mechanism, and so must be manually deployed before it can be used, or an automatic deployment mechanism can be created for the sample. To manually deploy the sample, you must perform the following general steps:

  1. Update and build the Visual Studio 2012 project.

    Before building, update the following references to point to the appropriate assemblies on your computer:

    • Microsoft.SharePoint.WorkflowFunctions

    • Nintex.Workflow

  2. Manually add the CustomWorkflowContextProps assembly to the Global Assembly Cache (GAC) of each web front end used by NintexWorkflow 2013. For more information about manually adding an assembly to the GAC, see Install the assemblies into the Global Assembly Cache.

  3. Start Command Prompt as an administrator, and then run the CreateContextDataItems.bat file included with the sample.

See Also

Concepts

Workflow context properties

Workflow references

Operations

Working with custom workflow context properties