DeployWorkflowWithFeature sample
The DeployWorkflowWithFeature sample provides an example of implementing a simple SharePoint 2013 solution package to deploy a list workflow for a SharePoint document library.
Overview
The sample represents a SharePoint 2013 solution package, in which a single feature is used to provision a sample SharePoint document library and publish a list workflow from a Nintex Workflow 2013 export (.nwf) file included with the solution package.
The feature uses an event receiver to handle the following events:
-
This method is called when the feature is activated. When called, it provisions the sample SharePoint document library if it does not already exist, and then invokes the PublishFromNWF service operation from the Workflow web service to publish the export file included with the solution package to the sample SharePoint document library.
-
This method is called when the feature is deactivated. When called, it backs out the changes made by the FeatureActivated event. It invokes the DeleteWorkflow service operation to delete the list workflow, and then it deletes the sample SharePoint document library.
Authenticating the solution package
The sample implements a support method, GetRunTimeCredentials, which demonstrates how to implement the following three techniques:
-
Use a Nintex Workflow 2013 export (.nwp) file workflow constant
-
Use hard-coded credentials
-
Use default network credentials
For more information about authenticating solution packages, see Deploying workflows.