Custom Node
Custom nodes extend the rule engine with user-defined processing logic. After a node is created, compiled, and loaded, it can be dragged into a rule flow.
Create, edit, compile, and save custom nodes from the Web page. A node can be dragged into a rule flow only after it compiles successfully and is loaded by the runtime.
Feature Entry
In the gateway workspace, click "Custom Node" in the left menu to enter the management page.

Node List
| Column | Description |
|---|---|
| Node Name | The identifier name of the node |
| Category | The category the node belongs to |
| Input Parameters | Number of input parameters |
| Output Parameters | Number of output parameters |
| Input/Output | Number of input/output parameters |
| Update Time | The last modification time |
List Features
| Feature | Description |
|---|---|
| Pagination | Supports paginated display (20/50/100 items per page) |
| Multi-select | Supports checkbox multi-select for batch operations |
| Category Filter | Supports filtering the node list by category |
| Search | Supports searching nodes by name |
New Node
Click the "New Node" button, fill in the node name, category (optional), and description (optional).

Edit Node
Click the "Edit" button to enter the node editor:

Node Information
| Field | Description |
|---|---|
| Node Name | The identifier name of the node |
| Category | The category the node belongs to, used for organizing nodes in the rule engine |
| Description | Description of the node function |
Parameter Definition
| Parameter Type | Description |
|---|---|
| Input Parameter | Data passed from upstream nodes, read-only within the node |
| Output Parameter | Data output after node processing, for downstream nodes use |
| Input/Output Parameter | Both input and output, can be modified within the node |
Parameter Properties
| Property | Description |
|---|---|
| Parameter Name | The identifier name of the parameter |
| Data Type | Int32, Int64, Float, Double, Boolean, String, Object, etc. |
| Description | Description of the parameter function |
Code Editor
Use Monaco editor to write C# code, supporting the following features:
| Feature | Description | Shortcut |
|---|---|---|
| Syntax Highlighting | C# syntax highlighting | - |
| IntelliSense | Code auto-completion, triggered by typing . or space | - |
| Syntax Checking | Real-time syntax checking, errors and warnings marked with wavy underlines in the editor | - |
| Hover Tips | Mouse hover displays type information and documentation | - |
| Signature Help | Shows parameter signatures when typing method parentheses | - |
| Quick Fix | Trigger code fix suggestions | Ctrl+. |
| Undo/Redo | Undo and redo operations | Ctrl+Z / Ctrl+Y |
| Toggle Comment | Comment/uncomment the current line | Ctrl+/ |
| Save | Save the node to the database | Ctrl+S |
| Format | Format code | Ctrl+K, Ctrl+F |
| Copy Line | Copy the current line down | Ctrl+D |
| Delete Line | Delete the current line | Ctrl+Shift+K |
| Go to Definition | Jump to symbol definition | F12 |
Compilation Log
The compilation log panel is located on the right side of the editor, displaying detailed information and results of the compilation process.

After a node compiles successfully, the runtime loads it and the node becomes available in the rule engine editor.
Log Header
The top of the log panel displays statistics:
| Information | Description |
|---|---|
| Error Count | Displayed in red, indicates the number of compilation errors |
| Warning Count | Displayed in orange, indicates the number of compilation warnings |
Log Entry Types
| Type | Icon | Background Color | Description |
|---|---|---|---|
| Error | Red cross | Red background | Compilation error, must be fixed for successful compilation |
| Warning | Orange exclamation mark | Orange background | Compilation warning, recommended to fix but does not block compilation |
| Success | Green checkmark | Green background | Compilation success message |
| Info | Gray i | No background | Compilation process information (e.g., save status, compilation progress, etc.) |
Compilation Process Log
The following log information is displayed in order during compilation:
- Save Node -
Saving node... - Save Result - Save success/failure
- Start Compilation -
Node saved successfully, starting compilation... - Compilation Result - Compilation success/failure
- Load Result - Whether the node has been loaded by the runtime
- Diagnostic Information - Error and warning details returned by compilation
Click to Jump
Click on error or warning entries in the compilation log, and the editor will automatically jump to the corresponding code line and highlight the error position, making it easy to quickly locate and fix issues.
Real-time Syntax Checking
In addition to compilation logs, the editor also automatically performs real-time syntax checking when code is modified (approximately 500ms delay). The check results will:
- Mark error and warning positions with wavy underlines in the editor
- Be displayed synchronously in the compilation log panel
- Support clicking to jump to the corresponding code line
Action Buttons
| Action | Description |
|---|---|
| Edit | Open the node editor |
| Compile | Compile a single node |
| Delete | Delete the node |
| Batch Compile | Compile multiple selected nodes |
| Batch Delete | Delete multiple selected nodes |
Related Links
- Script Management - Script editing and compilation
- Rule Engine - Rule process orchestration
- Data Management - Channel, device, variable configuration