Working with custom workflow context properties

You can create your own custom workflow context properties, which can be used anywhere a workflow context property reference can be added, in Nintex Workflow 2013.

Developing custom workflow context properties

From a development perspective, a custom workflow context property is a public class, derived from the ContextDataItemBase class. The public class must meet the following requirements:

You can override the following properties and methods for your custom workflow context property, as needed, from the ContextDataItemBase class:

Defining custom workflow content properties

Unlike custom inline functions, custom workflow content properties do not have aliases. The combination of a type name and an assembly name defines a custom workflow content property in Nintex Workflow 2013, and only one custom workflow content property can be defined for each combination. The definitions for all workflow context properties, including custom workflow context properties, are stored in the configuration database.

Similarly, localized values cannot be specified for custom workflow context properties when the custom workflow context property is defined in Nintex Workflow 2013.

The AddCustomDataItem operation provided by the NWAdmin.exe command line tool is used to define a custom workflow context property for NintexWorkflow 2013. For example, the following command defines a custom workflow context property, named Last Run Time, for the LastRunDateTime class included in the CustomWorkflowContextProps sample.

NWAdmin.exe -o AddCustomDataItem -type "CustomWorkflowContextProps.LastRunDateTime" -assembly "CustomWorkflowContextProps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a6b78db44595b93" -displayname "Last Run Time" -description "The date and time at which the workflow instance was last modified."

You can use the EnumCustomDataItems operation provided by NWAdmin.exe to confirm that your custom workflow context properties are successfully defined in the configuration database, or the DeleteCustomDataItem operation to remove a custom workflow context property from the configuration database.

Caution: The DeleteCustomDataItem operation can remove any custom workflow context property. Removing a custom workflow context property deletes it from the configuration database, making it unavailable to NintexWorkflow 2013, but does not remove the corresponding assembly from the GAC.

For more information about the NWAdmin.exe command line tool, see NWAdmin Operations - Nintex Workflow 2013.

Invoking custom workflow context properties

Custom workflow context properties can be invoked just like other workflow references. For more information about using workflow context properties, see Workflow context properties.

See Also

Concepts

Workflow context properties

Workflow references

Reference

.NET Framework Reference