Create custom workflow actions

Source: Internet
Author: User

Overview:

Using the Workflow actions provided by Nintex, you can easily build a Workflow. How are these actions added to the Workflow? In fact, actions in the Nintex Workflow are activities of every Workflow Foundation (WF. Therefore, Nintex provides custom workflow work functions for our developers in addition to existing actions. This greatly enhances the Workflow (NW) function of Nintex.

To use Workflow activities to expand Nintex, follow these steps:

  1. Create an action adapter to guide NW in handling activities;
  2. Develop a configuration dialog box (aspx) page to provide workflow designers with a visual design interface to configure the parameters required for the action;
  3. Create a. nwa (NW action) to describe your activity, corresponding adapter class and information loaded in the UI dialog box. This file will be imported to the NW action list.

Configuration:

Here, only instances of Nintex2007 and SharePoint2007 are used.
WSS3.0

Nintex workflow 2007

Visual Studio

Outline

  1. Background information
  2. Procedure
  3. VS Project template customized for NW 2007
  4. Problem debugging
  5. Reference

Step 1 Basic Principles

Figure: Design Workflow

Figure: publish a Workflow

The list of all available actions of NW is stored in the NW configuration database. This database declares the relationship between the WF activity, the NW adapter, and the designer interface.

The adapter class must define these methods. On the one hand, it presents the UI of the action, and on the other hand, it loads the referenced WF activity instance into the parent WF.

The execution process of the action used in NW is as follows:

  1. When the workflow designer is loaded, each allowed action is displayed in the toolbox by querying the DB.
  2. When an action is pushed to the design panel, the designer sends a request to the server for the currently selected action, and then the server calls the necessary adapter class to obtain html to render the action.
  3. The rendered action contains the default xml configuration attributes, which are passed through the aspx dialog box url used to configure the action. The xml file for this configuration is serialized by using Nintex. Workflow. Actions. Adapters. NWActionConfig.
  4. To configure the action, you can open the dialog box page in the modal window. In fact, the dialog box is used to modify the configuration xml.
  5. When the dialog box is returned, the configured xml file is sent to the server. The adapter verifies the configuration and returns html. The returned html has an IsVali attribute, which is used to identify whether the action configuration is reasonable. If the configuration is unreasonable, the workflow cannot be published.
  6. Once a workflow is published, the configuration file xml of each action is sent to the server. The method AddActivityToWorkflow corresponding to each action will be called. This method is used to instantiate the WF activity instance, set the activity attribute according to the configuration file, and add the activity to the parent WF object. Once all the adapter objects are called, the workflow objects are converted to the XOML of WF for use in the related SharePoint list.
  7. When WF is loaded, NW reads information from the XOML of WF. Different activities call the corresponding adapter and call the rendering method (either runtime, design or preview) to return html. The NWActionConfig instance is obtained by passing the activity to the GetConfig method of the adapter. This method reads activity attributes and constructs the NWActionConfig object.

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.