Connect to MySQL, PostgreSQL, MSSQL, or Oracle databases. Browse tables and stored procedures, read data as collections, and perform INSERT/UPDATE/DELETE operations from rules.
2. Technical Architecture
The DB Link plugin provides relational database integration supporting SQL Server, PostgreSQL, MySQL/MariaDB, SQLite, and Oracle. It manages dynamic ADO.NET database connection pools, handles parameterized SQL query execution, transforms query result sets into JSON telemetry objects, and supports background polling timers as well as transactional INSERT, UPDATE, and DELETE action commands.
System Interaction & Exposed Catalog Routes
The DB Link plugin connects Uniflow to relational database engines (PostgreSQL, MySQL, Microsoft SQL Server, Oracle) via EF Core contexts. It supports periodic table polling, stored procedure execution, and CRUD operations triggered by rule workflows.
Catalog Routes & Node Integration
Input Event Triggers (Input Nodes):
dblink.query_result_received - Emitted when a database query completes.
dblink.row_count_changed - Emitted when table polling detects new rows.
dblink.table_poll_update - Periodic snapshot event from polled views.
Executable Actions (Action Nodes):
dblink.execute_query - Executes a custom SQL query or command.
dblink.insert_row - Inserts a record into a target table.
dblink.update_row - Updates existing database records.
dblink.execute_procedure - Invokes a stored procedure.
Architecture Diagram
VISUAL ARCHITECTURE FLOW DIAGRAM
Rendering Flow Architecture Diagram...
3. Configuration Parameters
The following configuration fields are available in the User Interface for this plugin:
Configuration Setting
Description
Database Provider
Specifies the database provider.
{Binding HostLabel}
Specifies the {binding hostlabel}.
Port (Optional)
Numeric value specifying the port (optional).
{Binding DatabaseLabel}
Specifies the {binding databaselabel}.
Username
Specifies the username.
Password
Specifies the password (secure).
Additional Parameters (Optional)
Specifies the additional parameters (optional).
Schema Filter (Optional)
Specifies the schema filter (optional).
Connection Pool Size
Specifies the connection pool size.
Max Rows Per Query
Specifies the max rows per query.
Command Timeout (Sec)
Numeric value specifying the command timeout (sec).
Poll Interval (Sec)
Numeric value specifying the poll interval (sec).
4. Exposed Routes & Data Types
This plugin exposes catalog fields across the following rule graph nodes:
Input Source
The Input Source node reads real-time database table record counts and row metrics.
Human-Readable Field Name
Data Type
Description
Table Row CountInt64
↳
Real-time record count metric for a discovered database table.
Data Source
The Data Source node queries database schema catalog metadata and table record sets.
Human-Readable Collection Name
Data Type
Exposed Fields & Data Types
Description
TablesJson` (`collection`)
↳
Name (String)
Schema (String)
RowCount (Int32)
List of discovered database tables.
Stored ProceduresJson` (`collection`)
↳
Name (String)
Schema (String)
Parameters (String)
List of discovered stored procedures and functions.
Discovered Table QueryJson` (`collection`)
↳
Table Column Schema (Int32
Int64
Double
String
Bool
DateTime)
Queryable collection of table rows mapped dynamically to column schema types.
Output Target
The Output Target node acts as an action sink node to execute SQL CRUD operations (INSERT, UPDATE, DELETE) or invoke stored procedures.
Write Operation Modes (STRICT vs WHERE)
For UPDATE and DELETE actions, DB Link provides two execution modes configured via the UpdateMode parameter:
1. STRICT Mode (Default - Primary Key Safety):
Purpose: Enforces deterministic, single-record modifications and prevents unintended multi-row updates or full table wipes.
Mechanism: Automatically inspects the table's database schema metadata to identify primary key columns (IsPrimaryKey).
UPDATE in STRICT mode: Requires primary key values. Non-primary key column values are routed to the SET col = @p... clause, while primary key values form the parameterized WHERE pk = @p... clause. Fails if no primary key is provided.
DELETE in STRICT mode: Requires primary key values. Generates DELETE FROM table WHERE pk = @p.... Fails if primary keys are missing.
2. WHERE Mode (Flexible Multi-Row & Criteria-Based Execution):
Purpose: Allows updating or deleting records based on custom filter criteria without requiring primary key values (e.g., bulk status updates, timestamp-based purging).
Configuration & Parameters:
WhereFields: Comma-, semicolon-, or pipe-separated list of column names used in the WHERE condition (e.g. status, area_id). In the Rule Editor, DB Link dynamically generates dedicated input ports prefixed with where_ (and labeled WHERE <ColumnName>) for each filtered column.
WhereOperator: Logical operator combining multiple WhereFields (AND or OR, defaults to AND).
SetFields: Comma-, semicolon-, or pipe-separated list of columns updated in the SET clause (for UPDATE).
Where: Optional direct custom raw SQL WHERE condition expression (e.g. status = 'PENDING' AND retry_count < 3).
UPDATE in WHERE mode: Generates UPDATE <table> SET <SetFields> WHERE <WhereFields/Expression>.
DELETE in WHERE mode: Generates DELETE FROM <table> WHERE <WhereFields/Expression>.
Target Parameters Reference
Target Name
Parameter
Type
Allowed Values / Format
Required
Mode / Visibility
Description
Database Table Write TargetAction
↳
String
INSERT, UPDATE, DELETE
Yes
All actions
SQL operation type.
↳
UpdateMode
String
STRICT, WHERE
No (default STRICT)
`Action=UPDATE\
DELETE`
↳
SetFields
String
Comma-separated column list
No
Action=UPDATE & UpdateMode=WHERE
Columns updated in the SET clause. Exposes matching input ports for column values.
↳
WhereFields
String
Comma-separated column list
No
`Action=UPDATE\
DELETE & UpdateMode=WHERE`
↳
WhereOperator
String
AND, OR
No (default AND)
`Action=UPDATE\
DELETE & UpdateMode=WHERE`
↳
Where
String
Raw SQL expression
No
`Action=UPDATE\
DELETE & UpdateMode=WHERE`
↳
Discovered Column Ports
Typed
Mapped SQL data types
Dependent
INSERT or STRICT UPDATE
Input ports corresponding to table columns.
↳
where_<column> Ports
Typed
Mapped SQL data types
Dependent
WHERE mode
Filter value input ports for columns specified in WhereFields.
Stored Procedure TargetProcedure Parameter Ports
↳
Typed
Mapped SQL data types
Dependent
Stored procedure execution
Input arguments required by the target stored procedure.
5. Usage Examples
Scenario A: Avigilon ACC Analytics Match Inserts Record into PostgreSQL Audit Table
Workflow Overview:
When Avigilon ACC emits an analytics rule match (ANALYTICS_RULE_MATCH), Uniflow intercepts the camera alarm and executes a SQL INSERT query via DB Link into PostgreSQL table security_incidents (camera_name, rule_name, timestamp).
A DB Link table poller monitors MSSQL view vw_PendingWorkOrders (dblink.row_count_changed). When RowCount > 0, Uniflow executes a Modbus TCP coil write (Coil 3 = True) to trigger physical batch processing on the plant floor.
Rule Node Configuration:
1. Input Source Node: DB Link Table Poller
Target View: vw_PendingWorkOrders
Exposed Field: Table Row Count (Int64)
2. Logic Filter Node: GreaterThan
Expression: RowCount > 0
3. Output Target Node: Modbus Client Writer
Action Target: Direct Access
Type: Coils
Address: 3
Value: True
4. Output Target Node: DB Link Status Updater
Action Target: Database Table Write Target
Action: UPDATE
UpdateMode: STRICT
order_id: ${OrderId} (Primary Key)
status: 'PROCESSING'
Logic Flow Diagram:
VISUAL ARCHITECTURE FLOW DIAGRAM
Rendering Flow Architecture Diagram...
Scenario C: Criteria-Based Bulk Maintenance Update in WHERE Mode
Workflow Overview:
When an emergency perimeter evacuation alarm triggers, Uniflow executes a bulk database update on table access_turnstiles to set lock_state = 'EMERGENCY_OPEN' for all gates where building = 'HQ_MAIN' without needing individual primary keys.
Rule Node Configuration:
1. Event Input Node: Fire Alarm Trigger
Event Code: FIRE_ALARM_EVACUATION
2. Output Target Node: DB Link Turnstile Updater
Action Target: Database Table Write Target
Action: UPDATE
UpdateMode: WHERE
SetFields: lock_state
WhereFields: building
WhereOperator: AND
lock_state Input Port: 'EMERGENCY_OPEN'
where_building Input Port: 'HQ_MAIN'
Logic Flow Diagram:
VISUAL ARCHITECTURE FLOW DIAGRAM
Rendering Flow Architecture Diagram...
Legal & Open Source Compliance
Release Notes & Version History
UNIFLOW SOFTWARE LICENSE AGREEMENT
Version 2.1 — Effective September 2026
Before downloading Uniflow Package, you must read, understand, and agree to the license terms below: