Adhoc Subprocess
Introduction
An Ad-Hoc Sub-Process is a specialized type of Sub-Process that is a group of Activities that have no REQUIRED sequence relationships. A set of Activities can be defined for the Process, but the sequence and number of performances for the Activities is determined by the performers of the Activities.
A Sub-Process is marked as being ad-hoc with a “tilde” symbol placed at the bottom center of the Sub-Process shape.
— BPMN 2.0.2 Standard, 10.2.5, Sub-Processes
Properties
General
Attribute | Type | Description | Category |
---|---|---|---|
Model Id | Text | Model Id identifies the element within the process model. | The model id, name and documentation properties can be found on any element. They are used respectively to uniquely identify the subprocess, to give the subprocess a user-friendly name and to add a free-form description. |
Name | Text | The name of the element. This is the name displayed in the diagram. | |
Documentation | Multiline Text | A free-form text that can be used to explain details about the particular element. | |
Ordering | Selection:
| The ordering for the adhoc subprocess. | The activities in the adhoc subprocess can be limited to only allow one active activity at the time by setting the Ordering to Sequential. Choosing Parallel allows for multiple activities to be active. In both cases, a Completion condition can be defined which is an expression that resolves to a boolean value. If true, any other active activity will be cancelled. Uncheck the Cancel instances to avoid that. |
Completion condition | Text | An expression that should resolve to a boolean value. When evaluating to true, the remaining activity instances will be removed and the process instance will continue. | |
Cancel instances | Boolean | Cancel the remaining instances for the adhoc subprocess? |
Multi Instance
Multi instance
Attribute | Type | Description | Category |
---|---|---|---|
Multi instance type | Selection:
| The type of multi-instance: default is 'None' meaning a single instance is created at runtime. Select either 'Parallel' or 'Sequential' if you want multiple instances to be created. | Multi-instance is used to define the repetition of this subprocess at runtime. With multi-instance it is possible to execute the subprocess (and thus everything inside it) multiple times, either sequentially where each instance of the subprocess is executed after the previous or in parallel where the instances are created all at once and exist concurrently. For example, when referencing a collection one instance is created for each element of that collection. |
Collection | Text | References a collection variable (for example a JSON array variable) by its name or using an expression that resolves to a collection. | |
Element variable | Text | The name of the variable where the currently processed element from the multi-instance collection configured above will be stored (for example, 'invoicePosition'). The element can then be accessed through an expression, e.g., ${invoicePosition}. | |
Element index variable | Text | The name of the variable where the index of the currently processed item from the multi-instance collection will be stored, for example, 'itemIndex'. The index is a number starting with 0 which is increased with every element that is being created. The index can then be accessed through an expression, e.g., ${itemIndex} further on in the process. | |
Cardinality | Text | A fixed number or an expression that resolved to an integer that controls the number of instances that will be created. This is typically used when there is no collection available or needed. |
Variable aggregation
Attribute | Type | Description | Category |
---|---|---|---|
Variable Aggregations | List | Define an aggregation. Each element in this list will result in one aggregation variable. | When using multi-instance, there is often a need to create an aggregation of the variables created and/or updated in each instance. With variable aggregation, a JSON variable can be created that after all instances have been completed contains the summary of all the used variables. This is needed because for multi-instance, variables are persisted locally, to avoid clashes on the process instance level. Alternatively, an 'overview' variable can be created while the instances are still unfinished. Each aggregation consists of one or multiple definitions that map instance variables of one instance of the multi-instance to the aggregation variable. |
Advanced
Attribute | Type | Description | Category |
---|---|---|---|
Optimize for only automatic steps | Boolean | (Advanced setting, only check it if you understand the implications) If checked, this instructs the Flowable engine that the multi-instance only contains automatic tasks and no wait states. In this situation, an asynchronous job is created when the multi-instance activity is entered that keeps checking if all instances are completed and completes the multi-instance. The benefit of this approach is that it is light on resources versus alternatives and doesn't lead to optimistic locking exceptions. | If checked, this instructs the runtime execution engine that the multi-instance only contains automatic tasks and no wait states (like for example a user task). In this situation, one asynchronous job is created when the multi-instance activity is entered that keeps checking if all instances are completed and completes the multi-instance, instead of concurrently trying to complete the instances separately. The benefit of this approach is that it is light on resources, often more performant and doesn't lead to optimistic locking exceptions. This is an advanced setting. Only use it when you fully understand the implications. |
Advanced
Execution
Attribute | Type | Description | Category |
---|---|---|---|
Include in history | Boolean | When the history level is set to "instance" or "task" level with this property it can be configured if this activity instance should be included in the historic activity data. | The Include in history flag can be used to store the historical entry of this subprocess when running with a history level that normally would not store the execution of this subprocess. Note that this flag has no effect when running with history level 'none'. |
Listeners
Attribute | Type | Description | Category |
---|---|---|---|
Execution listeners | List | Allows invoking custom after certain lifecycle events. Start: Executes after the activity has been started. End: Executes after the activity was completed. Transition: When defined on a sequence flow, executes once the flow is transition is taken. | Execution listeners are used to add logic on certain lifecycle events. Typically it is used to add extra technical logic which shouldn't be visible in the BPMN process model. |
Visual
Attribute | Type | Description | Category |
---|---|---|---|
Font size | Selection:
| Font size. | Visual properties that determine how the subprocess is shown in the diagram. This has no impact on the runtime execution. |
Font weight | Selection:
| Select the style between bold and normal. | |
Font style | Selection:
| Select the style between italic and normal. | |
Font color | Color | Select a font color. | |
Background color | Color | The background color of the element in the diagram. |
List Attribute Details
Variable Aggregations
Attribute | Type | Description |
---|---|---|
Target (Variable / Expression) | Text | The name of the target variable or an expression that gives the variable name |
Type | Selection:
| The type of aggregation. Use 'default' to use the standard behavior of creating an aggregation JSON variable. Use 'custom' to define a delegate expression that will handle the aggregation. Please see the documentation for more information. |
Delegate Expression | Text | Define a delegateExpression that will resolve to an instance of VariableAggregator (for BPMN) or PlanItemVariableAggregator (for CMMN). This instance will then be responsible for aggregating the variables. |
Class | String | A class that implements VariableAggregator (for BPMN) or PlanItemVariableAggregator (for CMMN). This instance will then be responsible for aggregating the variables. |
Target variable creation | Selection:
| Configures the way the aggregation variable is created. The 'Default' option creates the aggregation variable when all instances of the multi-instance have been completed. Use 'Create overview variable' to create a variable at the start of the multi-instance and keep it up to date during multi-instance exeution. Once all the instances are completed it will create a JSON variable in the same way as for Default target variable creation. Use the 'Store as transient variable' option to have the default behavior, but store the resulting aggregation variable transiently. |
Variable Definitions | BasicFormList | property.loopVariableAggregation.definitions.description |
Variable Definitions
Attribute | Type | Description |
---|---|---|
Source (Variable / Expression) | Text | The name of the source variable or an expression that provides the value |
Target (Variable / Expression) | Text | The name of the aggregation variable or an expression that resolves to a variable name. |
Execution listeners
Attribute | Type | Description |
---|---|---|
Event | Selection:
| The lifecycle event. The 'Take' event is only available for sequence flow. |
Class | Text | Fully qualified classname of a class to be invoked when executing the task. The class must implement either JavaDelegate or ActivityBehavior. |
Expression | Text | JUEL Expression to be executed when the task is started. Expressions allow you to interact with the backend by calling services, making calculations etc. You can find more information about expressions in the documentation. |
Delegate expression | Text | Delegate Expression to be executed when the task is started. A delegate expression must resolve to a Java object, for instance a Spring bean. The object's class must implement either JavaDelegate or ActivityBehavior. |
Fields | List |
Fields
Attribute | Type | Description |
---|---|---|
Name | Text | The name of the element. This is the name displayed in the diagram. |
String value | Text | |
Expression | Text | JUEL Expression to be executed when the task is started. Expressions allow you to interact with the backend by calling services, making calculations etc. You can find more information about expressions in the documentation. |
String | Text |