diff --git a/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/_index.md b/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/_index.md index e2a6a649456..05ac9829251 100644 --- a/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/_index.md +++ b/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/_index.md @@ -167,8 +167,8 @@ Each BPMN element is marked with a support level indicator: Timer 🟩 Supported - 🟦 Planned - 🟦 Planned + 🟩 Supported + 🟩 Supported 🟩 Supported 🟩 Supported 🟩 Supported diff --git a/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/bpmn-coverage.md b/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/bpmn-coverage.md index 94c4543ebe6..f078afd8482 100644 --- a/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/bpmn-coverage.md +++ b/content/en/docs/refguide/modeling/application-logic/workflows/bpmn-in-mendix/bpmn-coverage.md @@ -86,8 +86,8 @@ Mendix supports a broad range of BPMN event types. Some are available directly a | Variant | Support Level | How | |---|---|---| | Start | 🟩 Platform Native | Same as None Start – process the message data in a [microflow](/refguide/microflows/), create or populate an object of the entity type that the workflow expects, and start the workflow using the [Call Workflow](/refguide/workflow-call/) activity by passing that [context object](/refguide/workflow-call/#context-object). Alternatively, use the [Call Workflow](/refguide/on-click-event/#call-workflow) page action on a page. | -| Event Subprocess (Interrupting) | ✅ Workflow Native | [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) | -| Event Subprocess (Non-Interrupting) | ✅ Workflow Native | [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) | +| Event Subprocess (Interrupting) | ✅ Workflow Native | [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) | +| Event Subprocess (Non-Interrupting) | ✅ Workflow Native | [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) | | Intermediate Catch | 🟦 Planned | As Notification Event, use [Wait for Notification](/refguide/wait-for-notification/) activity as an alternative. | | Intermediate Boundary (Interrupting) | 🟦 Planned | As Interrupting Notification Event. | | Intermediate Boundary (Non-Interrupting) | 🟦 Planned | As Non-Interrupting Notification Event. | @@ -99,8 +99,8 @@ Mendix supports a broad range of BPMN event types. Some are available directly a | Variant | Support Level | How | |---|---|---| | Start | 🟩 Platform Native | Use a [scheduled event](/refguide/scheduled-events/) to run a [microflow](/refguide/microflows/) that starts the workflow using the [Call Workflow](/refguide/workflow-call/) activity. | -| Event Subprocess (Interrupting) | 🟦 Planned | As Interrupting Timer Event Subprocess Start. | -| Event Subprocess (Non-Interrupting) | 🟦 Planned | As Non-Interrupting Timer Event Subprocess Start. | +| Event Subprocess (Interrupting) | ✅ Workflow Native | [Interrupting Timer Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) | +| Event Subprocess (Non-Interrupting) | ✅ Workflow Native | [Non-Interrupting Timer Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) | | Intermediate Catch | ✅ Workflow Native | [Timer](/refguide/timer/) | | Intermediate Boundary (Interrupting) | ✅ Workflow Native | [Interrupting Timer Event](/refguide/timer/) | | Intermediate Boundary (Non-Interrupting) | ✅ Workflow Native | [Non-Interrupting Timer Event](/refguide/timer/) | @@ -109,7 +109,7 @@ Mendix supports a broad range of BPMN event types. Some are available directly a | Variant | Support Level | How | |---|---|---| -| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow to handle the error logic and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when an error occurs. | +| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow to handle the error logic and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when an error occurs. | | Intermediate Boundary (Interrupting) | 🟦 Planned | Use an *Interrupting Notification Event* (Planned) to catch the event, and use a microflow to handle the error logic and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when an error occurs. | | End | 🟩 Platform Native | Use a [Call Microflow](/refguide/call-microflow/) activity as the throw event. Within the microflow, include a [Notify Workflow](/refguide/notify-workflow/) activity to throw the error before the process completes. | @@ -118,8 +118,8 @@ Mendix supports a broad range of BPMN event types. Some are available directly a | Variant | Support Level | How | |---|---|---| | Start | 🟩 Platform Native | Use a [microflow](/refguide/microflows/) with multiple [Call Workflow](/refguide/workflow-call/) activities to start multiple workflows and deliver the signal to all instances. | -| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow with multiple [Notify Workflow](/refguide/notify-workflow/) activities to deliver the signal to all waiting instances. | -| Event Subprocess (Non-Interrupting) | 🟩 Platform Native | Use a [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow with multiple [Notify Workflow](/refguide/notify-workflow/) activities to deliver the signal to all waiting instances. | +| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow with multiple [Notify Workflow](/refguide/notify-workflow/) activities to deliver the signal to all waiting instances. | +| Event Subprocess (Non-Interrupting) | 🟩 Platform Native | Use a [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow with multiple [Notify Workflow](/refguide/notify-workflow/) activities to deliver the signal to all waiting instances. | | Intermediate Catch | 🟩 Platform Native | Use a [Wait for Notification](/refguide/wait-for-notification/) activity to catch the event, and use a microflow with multiple [Notify Workflow](/refguide/notify-workflow/) activities to deliver the signal to all waiting instances. | | Intermediate Boundary (Interrupting) | 🟦 Planned | Use an *Interrupting Notification Event* (Planned) to catch the event, and use a microflow with multiple [Notify Workflow](/refguide/notify-workflow/) activities to deliver the signal to all waiting instances. | | Intermediate Boundary (Non-Interrupting) | 🟦 Planned | Use a *Non-Interrupting Notification Event* (Planned) to catch the event, and use a microflow with multiple [Notify Workflow](/refguide/notify-workflow/) activities to deliver the signal to all waiting instances. | @@ -131,8 +131,8 @@ Mendix supports a broad range of BPMN event types. Some are available directly a | Variant | Support Level | How | |---|---|---| | Start | 🟩 Platform Native | Use a [microflow](/refguide/microflows/) that checks the condition and starts the workflow using the [Call Workflow](/refguide/workflow-call/) activity only when the condition is met. | -| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow to evaluate or create the condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the condition is met. | -| Event Subprocess (Non-Interrupting) | 🟩 Platform Native | Use a [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow to evaluate or create the condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the condition is met. | +| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow to evaluate or create the condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the condition is met. | +| Event Subprocess (Non-Interrupting) | 🟩 Platform Native | Use a [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow to evaluate or create the condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the condition is met. | | Intermediate Catch | 🟩 Platform Native | Use [Call Microflow](/refguide/call-microflow/) to evaluate the condition and return a result, then use a [Decision](/refguide/decision-in-workflows/) to route the workflow based on that result. | | Intermediate Boundary (Interrupting) | 🟦 Planned | Use an *Interrupting Notification Event* (Planned) to catch the event, and use a microflow to evaluate or create the condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the condition is met. | | Intermediate Boundary (Non-Interrupting) | 🟦 Planned | Use a *Non-Interrupting Notification Event* (Planned) to catch the event, and use a microflow to evaluate or create the condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the condition is met. | @@ -141,8 +141,8 @@ Mendix supports a broad range of BPMN event types. Some are available directly a | Variant | Support Level | How | |---|---|---| -| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow to evaluate the escalation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the escalation needs to happen. | -| Event Subprocess (Non-Interrupting) | 🟩 Platform Native | Use a [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow to evaluate the escalation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the escalation needs to happen. | +| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow to evaluate the escalation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the escalation needs to happen. | +| Event Subprocess (Non-Interrupting) | 🟩 Platform Native | Use a [Non-Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow to evaluate the escalation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the escalation needs to happen. | | Intermediate Boundary (Interrupting) | 🟦 Planned | Use an *Interrupting Notification Event* (Planned) to catch the event, and use a microflow to evaluate the escalation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the escalation needs to happen. | | Intermediate Boundary (Non-Interrupting) | 🟦 Planned | Use a *Non-Interrupting Notification Event* (Planned) to catch the event, and use a microflow to evaluate the escalation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the escalation needs to happen. | | Intermediate Throw | 🟩 Platform Native | Use a [Call Microflow](/refguide/call-microflow/) activity as the throw event. Within the microflow, include a [Notify Workflow](/refguide/notify-workflow/) activity to throw the escalation and continue the flow. | @@ -152,7 +152,7 @@ Mendix supports a broad range of BPMN event types. Some are available directly a | Variant | Support Level | How | |---|---|---| -| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#triggers-and-notifications) to catch the event, and use a microflow to evaluate the compensation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the compensation needs to happen. | +| Event Subprocess (Interrupting) | 🟩 Platform Native | Use an [Interrupting Notification Event Subprocess Start](/refguide/workflow-event-sub-processes/#start-event-types) to catch the event, and use a microflow to evaluate the compensation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the compensation needs to happen. | | Intermediate Boundary (Interrupting) | 🟦 Planned | Use an *Interrupting Notification Event* (Planned) to catch the event, and use a microflow to evaluate the compensation condition and send a notification using a [Notify Workflow](/refguide/notify-workflow/) activity when the compensation needs to happen. | | Intermediate Throw | 🟩 Platform Native | Use a [Call Microflow](/refguide/call-microflow/) activity as the throw event. Within the microflow, include a [Notify Workflow](/refguide/notify-workflow/) activity to throw the compensation and redirect the flow to the compensating activity. | | End | 🟩 Platform Native | Use a [Call Microflow](/refguide/call-microflow/) activity as the throw event. Within the microflow, include a [Notify Workflow](/refguide/notify-workflow/) activity to throw the compensation before the process completes. | diff --git a/content/en/docs/refguide/modeling/application-logic/workflows/event-sub-processes.md b/content/en/docs/refguide/modeling/application-logic/workflows/event-sub-processes.md index ffe5ba2e80f..aacb7f626ee 100644 --- a/content/en/docs/refguide/modeling/application-logic/workflows/event-sub-processes.md +++ b/content/en/docs/refguide/modeling/application-logic/workflows/event-sub-processes.md @@ -8,7 +8,7 @@ weight: 20 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. -Below is an example of an event sub-process, shown inside the dashed rectangle: +Below is an example of event sub-processes, shown inside the dashed rectangles: {{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/event-sub-process-example.png" alt="Event sub-process example" width="400" >}} @@ -34,7 +34,7 @@ Event sub-processes are particularly useful in the following scenarios: #### Lifecycle -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. +An event sub-process is initialized (but not started) as soon as the main process starts and remains in a waiting state until triggered by its configured start event. {{% alert color="info" %}} A workflow instance remains **In Progress** as long as at least ONE of the following conditions is met: @@ -45,9 +45,14 @@ A workflow instance remains **In Progress** as long as at least ONE of the follo The workflow will NOT complete until all active execution paths, both the main flow and any triggered event sub-processes, have reached their respective end events. -#### Triggers and Notifications +#### Start Event Types {#start-event-types} -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**. +Event sub-processes can be triggered by one of the following start event types: + +* **Notification start event** – The sub-process is triggered by a [Notify workflow](/refguide/notify-workflow/) microflow activity. +* **Timer start event** – The sub-process is triggered automatically when the configured duration elapses or the configured date and time is reached. The timer configuration follows the same rules as the standalone [Timer](/refguide/timer/) activity. For more information, see the [Timer](/refguide/timer/#timer) section in *Timer*. + +When the trigger is received, the sub-process becomes **In Progress**. #### Interrupting vs. Non-Interrupting @@ -58,7 +63,7 @@ Event sub-processes can be configured as either interrupting or non-interrupting ##### Implications of Changing the Sub-Process Start Event Type {#event-type-change} -For an existing event sub-process, when you change the type of its start event from non-interrupting to interrupting or vice versa, you will be presented with a warning dialog. For example, when you change a notification start event from non-interrupting to interrupting, you will see the following warning dialog: +For an existing event sub-process, when you change the type of its start event from non-interrupting to interrupting or vice versa, you will be presented with a warning dialog. For example, when you change a start event from non-interrupting to interrupting, you will see the following warning dialog: {{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/security-dialog.png" alt="Security Dialog when changing type" width="450">}} @@ -71,7 +76,7 @@ The event sub-process is re-created upon type switch because in-place conversion #### Concurrency Limitation -Mendix workflows currently support a **single concurrent instance** per defined event sub-process. If an 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. +Mendix workflows currently support a **single concurrent instance** per defined event sub-process. If an event sub-process is already active, subsequent attempts to trigger it — either via the **Notify workflow** activity or by a timer firing again — will be ignored. 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. 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. @@ -81,14 +86,18 @@ If your workflow has multiple, distinct event sub-processes defined (for example To add an **Event sub-process** to a workflow, follow these steps: -* Select an event sub-process from the **Sub-processes** section in the workflow **Toolbox**. -* Drag it onto a dashed drop zone adjacent to the main workflow process. +1. Select an event sub-process from the **Sub-processes** section in the workflow **Toolbox**. +1. Drag it onto a dashed drop zone adjacent to the main workflow process. {{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/drag-and-drop.png" alt="Add Event sub-process example" width="500" >}} -* The sub-process flow is contained within a dashed rectangle. This dashed border around the sub-process start event indicates that it is a non-interrupting sub-process. +1. In the **Select Events** dialog, choose the type of start event for the sub-process: **Timer (Interrupting)**, **Timer (Non-Interrupting)**, **Notification (Interrupting)**, or **Notification (Non-Interrupting)**. + + {{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/select-event-dialog.png" alt="Select Event Dialog" width="500" >}} + +1. The sub-process flow is contained within a dashed rectangle. The border around the sub-process start event indicates its interrupting behavior: a dashed border indicates a non-interrupting sub-process, and a solid border indicates an interrupting sub-process. * The flow can contain the same types of activities as the main process flow (for example, **User Task**, **Call Microflow**, **Decision**). -* It must start with a **Start** event (triggered by a notification) and end with at least one **End** event. +* It must start with a **Start** event (triggered by a notification or a timer) and end with at least one **End** event. ### Rearranging Event Sub-Processes @@ -102,9 +111,13 @@ This does not change the order of execution of the sub-processes, as this is dep ## Execution -To start an event sub-process, create a **Notify workflow** microflow activity and point it to the event sub-process start event. +How an event sub-process is started depends on its start event type: + +* **Notification start event** – Create a **Notify workflow** microflow activity and point it to the event sub-process start event. + + {{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/notify-workflow.png" alt="Notify workflow example" max-width=90% >}} -{{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/notify-workflow.png" alt="Notify workflow example" max-width=90% >}} +* **Timer start event** – The sub-process starts automatically when the configured duration elapses or the configured date and time is reached. No additional configuration outside the sub-process is required. ### Operational Lifecycle Management @@ -114,8 +127,8 @@ The following table outlines how top-level workflow operations and system states | Event or Operation | Effect on Event Sub-Process | System Behavior | | --- | --- | --- | -| Abort Workflow | Aborted | The sub-process is permanently stopped and cannot be re-notified. | -| Restart Workflow | Aborted and Reset | The active sub-process instance is aborted. It returns to a waiting state and can be notified again. | +| Abort Workflow | Aborted | The sub-process is permanently stopped and cannot be triggered again. | +| Restart Workflow | Aborted and Reset | The active sub-process instance is aborted. It returns to a waiting state and can be triggered again. | | Pause Workflow | Execution Halted | Execution of the sub-process halts immediately. Logic resumes from the same point once the workflow is Unpaused. | | 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. | | 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. | @@ -157,7 +170,7 @@ The `WorkflowSubProcessDefinition` entity represents the metadata of a sub-proce ### WorkflowSubProcess -The `WorkflowSubProcess` entity represents a specific runtime instance of an event sub-process. A `WorkflowSubProcess` object is created only after an event sub-process is notified and started its execution. +The `WorkflowSubProcess` entity represents a specific runtime instance of an event sub-process. A `WorkflowSubProcess` object is created only after an event sub-process has been triggered and started its execution. {{< figure src="/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/domain-model/workflow-sub-process.png" class="no-border" >}} @@ -197,6 +210,7 @@ The `WorkflowSubProcessState` enumeration defines the possible lifecycle phases ## Read more * [Notify Workflow](/refguide/notify-workflow/) +* [Timer](/refguide/timer/) * [Workflow Versioning and Conflict Mitigation](/refguide/workflow-versioning/) * [Jump activity](/refguide/jump-activity/) * [Jump to](/refguide/jump-to/) diff --git a/static/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/event-sub-process-example.png b/static/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/event-sub-process-example.png index 3ef7ef029b3..494e41ed604 100644 Binary files a/static/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/event-sub-process-example.png and b/static/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/event-sub-process-example.png differ diff --git a/static/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/select-event-dialog.png b/static/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/select-event-dialog.png new file mode 100644 index 00000000000..5d705cea473 Binary files /dev/null and b/static/attachments/refguide/modeling/application-logic/workflows/event-sub-processes/select-event-dialog.png differ