Model Data
Overview
Model Data defines the internal data model of a workflow.
Unlike Workflow Parameters, which define the data entering and leaving a workflow, Model Data stores and organizes the business data used while the workflow executes.
Activities can create, read, update, and manipulate Model Data throughout the workflow, making it the primary mechanism for maintaining workflow state.
Model Data is:
- Defined at design time.
- Instantiated for each workflow execution.
- Used to store business objects, intermediate results, collections, and workflow state.
Open Model Data from the Process Data Explorer.
Model Data Hierarchy
Model Data is organized as a hierarchy of fields and groups that can represent both simple values and complex business objects.
| Node | Purpose |
|---|---|
| Field | Stores a single value of a specific data type. |
| Field[] | Stores a collection of values of the same data type. |
| Group | Organizes related fields into a structured business object. |
| Group[] | Stores a collection of structured business objects. |
For example:
Customer
├── CustomerId
├── Name
├── Email
└── Orders[]
├── OrderNumber
├── Amount
└── Status
This hierarchy allows complex business information to be represented in a clear and maintainable structure.
Model Data Nodes
Field
A Field stores a single value.
Typical examples include:
- Customer Name
- Order Number
- Total Amount
- Approval Status
Use a Field whenever a single value is required.
Field[]
A Field[] stores multiple values of the same data type.
Examples include:
- Email Addresses
- Order Numbers
- Tags
- File References
Use Field[] when the number of values is dynamic or unknown.
Group
A Group represents a structured business object containing related fields.
For example:
Customer
├── First Name
├── Last Name
├── Email
└── Phone
Groups improve readability and allow business entities to be modeled naturally.
Group[]
A Group[] represents a collection of structured business objects.
For example:
Order Items[]
├── Product
├── Quantity
├── Unit Price
└── Discount
Use Group[] when multiple instances of the same business object must be stored.
Creating Model Data
To create Model Data:
- Open the Process Data Explorer.
- Expand Model Data.
- Right-click the location where the new item should be created.
- Select one of the following options:
| Option | Creates |
|---|---|
| Add Field | A single value. |
| Add Field[] | A collection of values. |
| Add Group | A structured business object. |
| Add Group[] | A collection of structured business objects. |
Configure the required properties and save the changes.
Editing Model Data
To modify existing Model Data:
- Right-click the required Field, Field[], Group, or Group[].
- Select Edit.
- Update the required properties.
- Save the changes.
Using Model Data
Model Data can be referenced anywhere the Process Data Explorer is available.
Typical uses include:
- Binding activity inputs.
- Storing activity outputs.
- Building expressions.
- Configuring conditions.
- Populating forms.
- Generating email content.
- Assigning Workflow Outputs.
Activities can read from and write to Model Data throughout workflow execution.
Workflow Data Flow
The following diagram illustrates how data typically flows through a workflow.
Workflow Starts
│
▼
Workflow Inputs
│
▼
Model Data
│
▼
Workflow Activities
│
▼
Set Workflow Output
│
Workflow Ends
Workflow Inputs provide data to the workflow.
Model Data stores and manipulates that information while the workflow executes.
Before the workflow completes, the Set Workflow Output activity maps values from Model Data (or other available data) to the workflow's Output Parameters.
Best Practices
- Use Model Data to store workflow state and business data.
- Organize related information using Groups.
- Use Field[] and Group[] when storing collections.
- Keep data models aligned with real business entities.
- Choose meaningful names for fields and groups.
- Add descriptions to improve maintainability.
- Avoid deeply nested structures unless they represent the underlying business model.