VariableMonitorActivity
Category: Common Steps Namespace: CMS.Plugin.FlowManagement.Domain.FlowBusiness.Activitys Base Class: BusinessActivity Module: FlowManagement.Domain
Overview
VariableMonitorActivity (Variable Monitor) is a node used to listen for changes in external variables in the process. It inherits from BusinessActivity and triggers subsequent process execution when the monitored variable value meets the condition, commonly used in PLC signal trigger scenarios.
Configuration Description
| Property Name | Type | Required | Default | Description |
|---|---|---|---|---|
| MonitorMode | MonitorMode | Yes | ValueCompare | Monitor Mode (ValueCompare/ValueChange) |
| MonitorVariableName | string | Yes | - | Monitored Variable Name |
| CompareVariableValue | string | No | - | Comparison Value |
| NOT | bool | No | false | Invert Result |
| CompareOldValue | bool | No | false | Whether to compare old value |
| NeedTagChange | bool? | No | - | Whether tag change is needed |
| WaitTimeout | int | No | -1 | Wait Timeout (milliseconds), -1 means infinite wait |
| UnsubscribeOnExit | bool | No | true | Unsubscribe on exit |
| ReadRetryCount | int | No | 3 | Read retry count |
| ReadRetryDelay | int | No | 500 | Read retry delay (milliseconds) |
Usage Examples
{
"Type": "VariableMonitorActivity",
"Name": "Wait Start Signal",
"Alias": "WaitStartSignal",
"MonitorMode": "ValueCompare",
"MonitorVariableName": "DB1.StartSignal",
"CompareVariableValue": "1",
"NOT": false,
"WaitTimeout": -1
}
Notes
- 💡 Supports two monitor modes: value comparison and value change.
- 💡 CompareVariableValue="IsNullOrWhiteSpace" indicates monitoring for empty values.
- 💡 Exit mode is Manual.
- ⚠️ Requires variable service configuration to support subscription function.
Related Nodes
- VariableReadActivity: Read Variable Node
- VariableWriteActivity: Write Variable Node
Update History
| Date | Version | Description |
|---|---|---|
| 2025-11-28 | 1.0 | Initial version |
Last updated: 2025-11-28