VariableReadActivity
Category: Common Steps Namespace: CMS.Plugin.FlowManagement.Domain.FlowBusiness.Activitys Base Class: BusinessActivity Module: FlowManagement.Domain
Overview
VariableReadActivity (Read Variable) is a node used to read external variables (such as PLC variables) in the process. It inherits from BusinessActivity and reads variable values via the IFlowVariableService service, writing them to the process context.
Configuration Description
| Property Name | Type | Required | Default | Description |
|---|---|---|---|---|
| CheckVariableName | bool | No | false | Whether to check variable configuration |
| ReadRetryCount | int | No | 3 | Read retry count |
| ReadRetryDelay | int | No | 500 | Read retry delay (milliseconds) |
| ParameterVariables | ReadParameterVariables | No | Empty Collection | Parameter variable collection |
Parameter Variable Configuration
| Property Name | Type | Description |
|---|---|---|
| VariableName | string | Variable Name |
| FlowItemKey | string | Process Context Key Name |
| WriteIntoDataItems | bool | Whether to write to process context |
Usage Examples
{
"Type": "VariableReadActivity",
"Name": "Read PLC Variables",
"Alias": "ReadPLCVars",
"ReadRetryCount": 3,
"ReadRetryDelay": 500,
"ParameterVariables": [
{
"VariableName": "DB1.Temperature",
"FlowItemKey": "Temperature_Value",
"WriteIntoDataItems": true
},
{
"VariableName": "DB1.Pressure",
"FlowItemKey": "Pressure_Value",
"WriteIntoDataItems": true
}
]
}
Notes
- 💡 Supports batch reading of multiple variables.
- 💡 Automatically retries on read failure.
- ⚠️ Requires variable service (IFlowVariableService) configuration.
Related Nodes
- VariableWriteActivity: Write Variable Node
- VariableMonitorActivity: Variable Monitor Node
Update History
| Date | Version | Description |
|---|---|---|
| 2025-11-28 | 1.0 | Initial version |
Last updated: 2025-11-28