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:
- Create an action adapter to guide NW in handling activities;
- Develop a configuration dialog box (aspx) page to provide workflow designers with a visual design interface to configure the parameters required for the action;
- 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
- Background information
- Procedure
- VS Project template customized for NW 2007
- Problem debugging
- 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:
- When the workflow designer is loaded, each allowed action is displayed in the toolbox by querying the DB.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.