MockDataActivity
Category: Common Steps Namespace: CMS.Plugin.FlowManagement.Domain.FlowBusiness.Activitys Base Class: BusinessActivity Module: FlowManagement.Domain
Overview
MockDataActivity is a node used to generate mock data in a flow. Inheriting from BusinessActivity, it supports generating random numbers, incremental numbers, decremental numbers, and other types of mock data, commonly used in testing and demo scenarios.
Configuration Instructions
| Property Name | Type | Required | Default Value | Description |
|---|---|---|---|---|
| MockDataContext | string | Yes | MockDataContext_Value | Flow context key to write mock data |
| MockType | MockType | No | Random | Mock Type (Random/Increment/Decrement) |
| VariableType | MockVariableType | No | IntType | Data Type (IntType/DoubleType/StringType) |
| FormatValue | string | No | - | Format string (for StringType) |
| LowerLimit | int | No | int.MinValue | Lower Limit |
| InitValue | int | No | 0 | Initial Value |
| UpperLimit | int | No | int.MaxValue | Upper Limit |
| Setp | double | No | 1.0 | Step for increment/decrement |
| Ddigits | int | No | 2 | Decimal digits (for DoubleType) |
Usage Examples
Random Integer
{
"Type": "MockDataActivity",
"Name": "Generate Random Quantity",
"Alias": "RandomQuantity",
"MockType": "Random",
"VariableType": "IntType",
"LowerLimit": 1,
"UpperLimit": 100,
"MockDataContext": "Quantity_Value"
}
Incremental Sequence
{
"Type": "MockDataActivity",
"Name": "Generate Sequence",
"Alias": "GenerateSeq",
"MockType": "Increment",
"VariableType": "IntType",
"InitValue": 1,
"Setp": 1,
"UpperLimit": 9999,
"MockDataContext": "SeqNo_Value"
}
Notes
- 💡 Increment/Decrement modes maintain state across flow instances
- 💡 Resets to initial value after reaching upper/lower limit
- 💡 String type uses 0 in FormatValue to insert random number
- ⚠️ Multiple format strings separated by commas are randomly selected
Related Nodes
- TextTemplateActivity: Text Template Node
- ApiCallActivity: API Call Node
Update History
| Date | Version | Description |
|---|---|---|
| 2025-11-28 | 1.0 | Initial version |
Last updated: 2025-11-28