Code the custom action

This topic provides pointers to the instructions for coding your custom action with a Visual Studio solution that has been set up.

Code the Custom Action

The following set of steps will provide pointers to the topics in the Nintex Workflow SDK that explain how to build a custom action in an order that will successfully produce a solution in Visual Studio that can be installed in your SharePoint environment.

The number of parts to build a custom action can be daunting. It may help to keep in mind that the essential functionality of your action is contained in the Execute method in the Activity class. Everything else is required to allow your functionality access to the Workflow context and to enable the functionality to work within SharePoint and Nintex Workflow. You will be passing a set of parameters from the Workflow to your functionality, and in turn when your functionality has processed the input parameters, you will have parameters that can receive the output. For more information see Parts of a custom action solution.

To code the custom action

  1. Code the activity class.

    A workflow activity is the fundamental building block of SharePoint 2013 workflows. In Nintex Workflow 2013, a workflow action adapts a workflow activity for use in Nintex workflows.

    For more information, see Implementing the workflow activity.

  2. Code the adapter class.

    A workflow action adapter provides the interaction layer between a workflow activity and Nintex Workflow 2013, as well as supporting Nintex-specific features for workflow actions.

    For more information, see Implementing the workflow action adapter.

  3. Create the configuration page.

    Each workflow action adapter has a corresponding configuration page, an ASP.NET (.aspx) web page displayed by the Workflow designer, so that the user can interactively configure the workflow action.

    For more information, see Creating configuration pages.

  4. Add the event listener SharePoint feature.

    The feature is added to the SharePoint solution project containing the workflow action adapter, and an event receiver is added to the feature to interact with Nintex Workflow 2013 object model.

    For more information, see Deploying workflow actions with SharePoint features.

  5. Build the project to get the full assembly name.

    The ActivityAssembly and ActivityType elements identify, respectively, the assembly and class in which the workflow activity is implemented. Nintex Workflow 2013 uses this information to dynamically instantiate the workflow activity when the corresponding custom workflow action is used in a workflow.

    For More information, see Get the full assembly name.

  6. Create and update the NWA file.

    An action definition (.nwa) file is a text file that contains an XML fragment which represents the metadata needed by Nintex Workflow 2013 export (.nwp) file to associate a workflow activity to a workflow action adapter for a custom workflow action, and to display information about the resulting custom workflow action.

    For more information, see Creating the action definition file.

Related information

How to create a custom action