ExecuteSqlScalarWithDeploy sample

The ExecuteSqlScalarWithDeploy sample provides an example of deploying an existing Nintex Workflow 2013 custom workflow action by using a SharePoint 2013 feature with a custom event receiver.

Overview

The sample represents a SharePoint 2013 solution package, in which a single feature, scoped to a web application, performs the following tasks:

  1. Registers the custom workflow action with Nintex Workflow 2013

  2. Enables the custom workflow action for use with the Workflow designer, within the SharePoint farm

  3. Adds necessary entries in the web.config configuration file for the web application, to authorize the custom workflow activity included with the custom workflow action for use in SharePoint declarative workflows

The custom workflow action included with this sample is the same custom action provided in the ExecuteSqlScalar sample. The samples are provided so that you can perform a side-by-side comparison, to better understand how the SharePoint feature interacts with both SharePoint 2013 and Nintex Workflow 2013, as well as the custom workflow action itself, when deployed. For more information about the ExecuteSqlScalar sample, see ExecuteSqlScalar sample.

The SharePoint solution package project includes a SharePoint feature, named Deploy.feature, which handles the deployment of the Execute SQL Scalar custom workflow action. The feature uses an event receiver to handle the following events:

Using the sample

You can either deploy the sample to a local SharePoint site directly from Visual Studio, or you can publish the sample to a SharePoint solution package (.wsp) file that can be deployed to a SharePoint site. Once the sample is deployed, the custom workflow action is represented by the Execute SQL Scalar Action feature, which you can then activate on the web application of your choice. The following screen shot illustrates how the feature is displayed in the Manage Web Application Features dialog of SharePoint Central Administration:

Execute SQL Scalar Action displayed in Manage Web Application Features dialog

See Also

Concepts

Workflow activities

Workflow action adapters

Operations

Working with workflow actions

Working with workflow activities

Samples

ExecuteSqlScalar sample