In the process of interactive calling with external events, the calling logic is uniformly encapsulated in the ActionExecutor.cs file. The code implementation is not particularly complicated. It mainly unifies the storage and calling processing of parameters. The parameters are stored in the WfProcessVariable table. Then, in the event calling process, the DelegateService method is used to read the parameter list to complete the final method call.

If the client has special requirements for the implementation of some codes, the client's developers can complete secondary development or customization on this basis. The basic requirement is to understand the following three elements: node attribute definition reading, process variable storage and reading, and dynamic method calling.

The following are examples of implemented methods for secondary development by customer technical personnel.

  1. Local Programs

For local program calls, refer to the methods in Section 1.4.2;

  1. WebApi
    1. Step 1: Event definition on node attributes

    1. Step 2: Process variable definition

Write process variables (WfProcessVariable) through the WorkflowService interface. The variables are used to pass the parameters of the WebApi method. Here is an example:

    1. Step 3: Example of implementing the interface method of the called WebApi program

The above example has two parameters: runner and role. In the WebApi method code, you can use JSON format data as the receiver and then perform serialization processing accordingly.


  1. Stored Procedures

A stored procedure is a program procedure defined by the database that contains SQL script syntax (for example, saving the above SQL script separately as a stored procedure). It is limited to the same database instance by default and supports input parameters. When defining it, you only need to specify the parameter name and the name of the stored procedure.