Skip to main content

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.

Usage Note

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.

Custom Node Management Page

Node List

ColumnDescription
Node NameThe identifier name of the node
CategoryThe category the node belongs to
Input ParametersNumber of input parameters
Output ParametersNumber of output parameters
Input/OutputNumber of input/output parameters
Update TimeThe last modification time

List Features

FeatureDescription
PaginationSupports paginated display (20/50/100 items per page)
Multi-selectSupports checkbox multi-select for batch operations
Category FilterSupports filtering the node list by category
SearchSupports searching nodes by name

New Node

Click the "New Node" button, fill in the node name, category (optional), and description (optional).

New Node Dialog

Edit Node

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

Node Editor Page

Node Information

FieldDescription
Node NameThe identifier name of the node
CategoryThe category the node belongs to, used for organizing nodes in the rule engine
DescriptionDescription of the node function

Parameter Definition

Parameter TypeDescription
Input ParameterData passed from upstream nodes, read-only within the node
Output ParameterData output after node processing, for downstream nodes use
Input/Output ParameterBoth input and output, can be modified within the node

Parameter Properties

PropertyDescription
Parameter NameThe identifier name of the parameter
Data TypeInt32, Int64, Float, Double, Boolean, String, Object, etc.
DescriptionDescription of the parameter function

Code Editor

Use Monaco editor to write C# code, supporting the following features:

FeatureDescriptionShortcut
Syntax HighlightingC# syntax highlighting-
IntelliSenseCode auto-completion, triggered by typing . or space-
Syntax CheckingReal-time syntax checking, errors and warnings marked with wavy underlines in the editor-
Hover TipsMouse hover displays type information and documentation-
Signature HelpShows parameter signatures when typing method parentheses-
Quick FixTrigger code fix suggestionsCtrl+.
Undo/RedoUndo and redo operationsCtrl+Z / Ctrl+Y
Toggle CommentComment/uncomment the current lineCtrl+/
SaveSave the node to the databaseCtrl+S
FormatFormat codeCtrl+K, Ctrl+F
Copy LineCopy the current line downCtrl+D
Delete LineDelete the current lineCtrl+Shift+K
Go to DefinitionJump to symbol definitionF12

Compilation Log

The compilation log panel is located on the right side of the editor, displaying detailed information and results of the compilation process.

Node Editor - Compilation Log Panel

Compilation Result

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:

InformationDescription
Error CountDisplayed in red, indicates the number of compilation errors
Warning CountDisplayed in orange, indicates the number of compilation warnings

Log Entry Types

TypeIconBackground ColorDescription
ErrorRed crossRed backgroundCompilation error, must be fixed for successful compilation
WarningOrange exclamation markOrange backgroundCompilation warning, recommended to fix but does not block compilation
SuccessGreen checkmarkGreen backgroundCompilation success message
InfoGray iNo backgroundCompilation process information (e.g., save status, compilation progress, etc.)

Compilation Process Log

The following log information is displayed in order during compilation:

  1. Save Node - Saving node...
  2. Save Result - Save success/failure
  3. Start Compilation - Node saved successfully, starting compilation...
  4. Compilation Result - Compilation success/failure
  5. Load Result - Whether the node has been loaded by the runtime
  6. Diagnostic Information - Error and warning details returned by compilation

Click to Jump

Click to Jump to Code Line

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

ActionDescription
EditOpen the node editor
CompileCompile a single node
DeleteDelete the node
Batch CompileCompile multiple selected nodes
Batch DeleteDelete multiple selected nodes