Skip to content

Commit 9d18207

Browse files
committed
Language, style, and table review (Event Sub-Processes)
1 parent 18624b9 commit 9d18207

1 file changed

Lines changed: 47 additions & 45 deletions

File tree

content/en/docs/refguide/modeling/application-logic/workflows/event-sub-processes.md

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ weight: 20
66

77
## Introduction
88

9-
An event sub-process is a separate execution flow that is not part of the normal sequence flow of its workflow. It resides inside the workflow and starts executing upon receiving a specific trigger.
10-
It is crucial to understand that an event sub-process is part of the same workflow instance. It is not a "separate" workflow; rather, a single workflow instance can contain multiple concurrent processes.
9+
An event sub-process is a separate execution flow that is not part of the normal sequence flow of a workflow. It resides inside the workflow and starts executing upon receiving a specific trigger. It is crucial to understand that an event sub-process is part of the same workflow instance. It is not a separate workflow but a single workflow instance that can contain multiple concurrent processes.
1110

12-
Below is an example of what an event sub-process looks like:
11+
Below is an example of an event sub-process, shown inside the dashed rectangle:
1312

1413
{{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/event-sub-process-example.png" alt="Event sub-process example" width="400" >}}
1514

1615
### When to Use Event Sub-Processes
1716

18-
An event sub-process is like a boundary event, with the exception that an event sub-process can start at any time, whereas a boundary event can start only while the activity it is attached to is active.
19-
Choosing between a boundary event and an event sub-process is a common architectural crossroads.
17+
An event sub-process is similar to a [boundary event](/refguide/workflow-boundary-events/), with the exception that an event sub-process can start at any time, whereas a boundary event can start only while the activity it is attached to is active. Choosing between a boundary event and an event sub-process is a common architectural crossroads.
2018

2119
#### Ideal Use Cases
2220

21+
Event sub-processes are particularly useful in the following scenarios:
22+
2323
* **Global exception handling** – Handling errors or cancellations that could occur at any point during the workflow execution.
24-
* **Isolated logic**Complex steps triggered by a specific event (for example, "Change of Address") without cluttering the main flow.
24+
* **Isolated logic**Handling complex steps triggered by a specific event (for example, "Change of Address") without cluttering the main flow.
2525
* **Inline updates** – Updating data in a long-running process without interrupting the primary state of the workflow.
2626

27-
#### When Not to Use Event Sub-Processes
27+
### When Not to Use Event Sub-Processes
2828

2929
* **Sequential logic** – If the logic must happen after a specific task, use a standard sequence flow.
3030
* **Conditional logic based on activity state** – You may want to execute a flow only if a certain condition is met while a specific activity is active. A boundary event should be used here because it is triggered only if the activity it is attached to is active.
@@ -34,10 +34,10 @@ Choosing between a boundary event and an event sub-process is a common architect
3434

3535
#### Lifecycle
3636

37-
The event sub-process is initialized (but not started) as soon as the main process starts and remains in a waiting state until a notification is received.
37+
An event sub-process is initialized (but not started) as soon as the main process starts and remains in a waiting state until a notification is received.
3838

3939
{{% alert color="info" %}}
40-
A workflow instance remains **In Progress** as long as at least one of the following conditions is met:
40+
A workflow instance remains **In Progress** as long as at least ONE of the following conditions is met:
4141

4242
* The main process path has not yet reached its end event.
4343
* Any event sub-process that was started has not yet reached its end event.
@@ -47,10 +47,12 @@ The workflow will NOT complete until all active execution paths, both the main f
4747

4848
#### Triggers and Notifications
4949

50-
Event sub-processes are triggered by a **Notify workflow** microflow activity. When the trigger is received, the sub-process becomes **In Progress**.
50+
Event sub-processes are triggered by a [Notify workflow](/refguide/notify-workflow/) microflow activity. When the trigger is received, the sub-process becomes **In Progress**.
5151

5252
#### Interrupting vs. Non-Interrupting
5353

54+
Event sub-processes can be configured as either interrupting or non-interrupting, depending on how they interact with the main process flow.
55+
5456
* **Interrupting (solid line)** – Immediately cancels the main process flow.
5557
* **Non-Interrupting (dashed line)** – Runs in parallel with the main flow.
5658

@@ -60,7 +62,7 @@ Currently, Mendix only supports the non-interrupting variant of event sub-proces
6062

6163
#### Concurrency Limitation
6264

63-
Mendix Workflows currently support a **single concurrent instance** per defined event sub-process. If a non-interrupting event sub-process is already active, subsequent attempts to trigger that same sub-process via the **Notify workflow** activity will return `false`. No new instances will be created for that specific sub-process while one is **In Progress**. A new instance can only be initiated once the active sub-process has completed its execution path.
65+
Mendix workflows currently support a **single concurrent instance** per defined event sub-process. If a non-interrupting event sub-process is already active, subsequent attempts to trigger that same sub-process via the **Notify workflow** activity will return `false`. No new instances will be created for that specific sub-process while one is **In Progress**. A new instance can only be initiated once the active sub-process has completed its execution path.
6466

6567
If your workflow has multiple, distinct event sub-processes defined (for example, one for "Address Change" and one for "Document Upload"), each one can have its own active instance simultaneously. One being active does not prevent a different one from being triggered.
6668

@@ -91,14 +93,14 @@ An event sub-process is bound to the lifecycle of its parent workflow instance.
9193

9294
The following table outlines how top-level workflow operations and system states affect any event sub-process that is currently **In Progress**:
9395

94-
| Event or Operation | Effect on Event Sub-Process | System Behavior |
95-
|---------------------------|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
96-
| Abort Workflow | Aborted | The sub-process is permanently stopped and cannot be re-notified. |
97-
| Restart Workflow | Aborted & Reset | The active sub-process instance is aborted. It returns to a waiting state and can be notified again. |
98-
| Pause Workflow | Execution Halted | Execution of the sub-process halts immediately. Logic resumes from the same point once the workflow is Unpaused. |
99-
| Workflow Incompatible | Execution Halted | The sub-process is "frozen" due to a version conflict. Execution resumes from the current point once the conflict is Resolved. |
100-
| Error Inside Sub-process | Failed | The sub-process activity enters a Failed state. After the issue is fixed and the workflow is Retried, the sub-process resumes from the failed activity. |
101-
| Error Outside Sub-process | Execution Halted | If a failure occurs elsewhere in the workflow, the healthy sub-process stops processing. It resumes once the error is fixed and the workflow is Retried. |
96+
| Event or Operation | Effect on Event Sub-Process | System Behavior |
97+
| --- | --- | --- |
98+
| Abort Workflow | Aborted | The sub-process is permanently stopped and cannot be re-notified. |
99+
| Restart Workflow | Aborted and Reset | The active sub-process instance is aborted. It returns to a waiting state and can be notified again. |
100+
| Pause Workflow | Execution Halted | Execution of the sub-process halts immediately. Logic resumes from the same point once the workflow is Unpaused. |
101+
| Workflow Incompatible | Execution Halted | The sub-process is "frozen" due to a version conflict. Execution resumes from the current point once the conflict is Resolved. |
102+
| Error Inside Sub-process | Failed | The sub-process activity enters a Failed state. After the issue is fixed and the workflow is Retried, the sub-process resumes from the failed activity. |
103+
| Error Outside Sub-process | Execution Halted | If a failure occurs elsewhere in the workflow, the healthy sub-process stops processing. It resumes once the error is fixed and the workflow is Retried. |
102104

103105
## Jump Rules
104106

@@ -128,11 +130,11 @@ The `WorkflowSubProcessDefinition` entity represents the metadata of a sub-proce
128130

129131
#### Associations
130132

131-
| Association | Parent Entity | Description |
132-
|-----------------------------------------------------------|--------------------------------|-------------------------------------------------------------------------|
133-
| `WorkflowSubProcessDefinition_WorkflowDefinition` | `WorkflowSubProcessDefinition` | Link to the parent workflow definition. |
134-
| `WorkflowUserTaskDefinition_WorkflowSubProcessDefinition` | `WorkflowUserTaskDefinition` | Links user task definitions to their containing sub-process definition. |
135-
| `WorkflowActivityRecord_WorkflowSubProcessDefinition` | `WorkflowActivityRecord` | Links historical activity records to the sub-process definition. |
133+
| Association | Parent Entity | Description |
134+
| --- | --- | --- |
135+
| `WorkflowSubProcessDefinition_WorkflowDefinition` | `WorkflowSubProcessDefinition` | Links to the parent workflow definition. |
136+
| `WorkflowUserTaskDefinition_WorkflowSubProcessDefinition` | `WorkflowUserTaskDefinition` | Links user task definitions to their containing sub-process definition. |
137+
| `WorkflowActivityRecord_WorkflowSubProcessDefinition` | `WorkflowActivityRecord` | Links historical activity records to the sub-process definition. |
136138

137139
### WorkflowSubProcess
138140

@@ -142,35 +144,35 @@ The `WorkflowSubProcess` entity represents a specific runtime instance of an eve
142144

143145
#### Attributes
144146

145-
| Attribute | Type | Description |
146-
|-------------|--------------------|--------------------------------------------------------------------------------------------------------------------------------|
147-
| `Caption` | String | The caption of the sub-process instance. |
148-
| `StartTime` | DateTime | The timestamp when execution began. This is set by the engine and is read-only. |
149-
| `EndTime` | DateTime | The timestamp when execution ended (either through completion or failure). This is set by the engine and is read-only. |
150-
| `State` | Enumeration | The current lifecycle state of the sub-process instance (see [WorkflowSubProcessState](#workflowsubprocessstate-enumeration)). |
151-
| `Reason` | String (Unlimited) | A technical description providing context for the current state (e.g., error details). |
147+
| Attribute | Type | Description |
148+
| --- | --- | --- |
149+
| `Caption` | String | The caption of the sub-process instance. |
150+
| `StartTime` | DateTime | The timestamp when execution begins. This is set by the Engine and is read-only. |
151+
| `EndTime` | DateTime | The timestamp when execution ends (either through completion or failure). This is set by the Engine and is read-only. |
152+
| `State` | Enumeration | The current lifecycle state of the sub-process instance (see [WorkflowSubProcessState](#workflowsubprocessstate-enumeration)). |
153+
| `Reason` | String (Unlimited) | A technical description providing context for the current state (for example, error details). |
152154

153155
#### Associations
154156

155-
| Association | Parent Entity | Description |
156-
|---------------------------------------------------|---------------------------|--------------------------------------------------------------------------------------------------------------------|
157-
| `WorkflowSubProcess_WorkflowSubProcessDefinition` | `WorkflowSubProcess` | The association to the underlying definition for this instance. |
158-
| `WorkflowSubProcess_Workflow` | `WorkflowSubProcess` | The association to the parent workflow instance. |
159-
| `WorkflowUserTask_WorkflowSubProcess` | `WorkflowUserTask` | The association to active user tasks within this sub-process instance. |
160-
| `WorkflowEndedUserTask_WorkflowSubProcess` | `WorkflowEndedUserTask` | The association to completed or ended user tasks within this instance. |
161-
| `WorkflowActivityRecord_WorkflowSubProcess` | `WorkflowActivityRecord` | The association to the historical execution records for this instance. |
162-
| `WorkflowCurrentActivity_WorkflowSubProcess` | `WorkflowCurrentActivity` | The association to the activities currently being executed in this sub-process (see [Jump to](/refguide/jump-to/). |
157+
| Association | Parent Entity | Description |
158+
| --- | --- | --- |
159+
| `WorkflowSubProcess_WorkflowSubProcessDefinition` | `WorkflowSubProcess` | The association to the underlying definition for this instance. |
160+
| `WorkflowSubProcess_Workflow` | `WorkflowSubProcess` | The association to the parent workflow instance. |
161+
| `WorkflowUserTask_WorkflowSubProcess` | `WorkflowUserTask` | The association to active user tasks within this sub-process instance. |
162+
| `WorkflowEndedUserTask_WorkflowSubProcess` | `WorkflowEndedUserTask` | The association to completed or ended user tasks within this instance. |
163+
| `WorkflowActivityRecord_WorkflowSubProcess` | `WorkflowActivityRecord` | The association to the historical execution records for this instance. |
164+
| `WorkflowCurrentActivity_WorkflowSubProcess` | `WorkflowCurrentActivity` | The association to the activities currently being executed in this sub-process (see [Jump to](/refguide/jump-to/)). |
163165

164166
### WorkflowSubProcessState (Enumeration)
165167

166168
The `WorkflowSubProcessState` enumeration defines the possible lifecycle phases of a sub-process instance:
167169

168-
| Caption | Name | Description |
169-
|-------------|--------------|-----------------------------------------------------------------------------------------------------------|
170-
| In progress | `InProgress` | The sub-process has been triggered and is currently executing. |
171-
| Aborted | `Aborted` | Execution was terminated, either because the parent workflow was aborted or due to an interrupting event. |
172-
| Failed | `Failed` | Execution ended unsuccessfully because an activity within the sub-process encountered an error. |
173-
| Completed | `Completed` | The sub-process reached its end event and finished successfully. |
170+
| Caption | Name | Description |
171+
| --- | --- | --- |
172+
| In progress | `InProgress` | The sub-process has been triggered and is currently executing. |
173+
| Aborted | `Aborted` | Execution was terminated, either because the parent workflow was aborted or due to an interrupting event. |
174+
| Failed | `Failed` | Execution ended unsuccessfully because an activity within the sub-process encountered an error. |
175+
| Completed | `Completed` | The sub-process reached its end event and finished successfully. |
174176

175177
## Read more
176178

0 commit comments

Comments
 (0)