Generate Sequence Task
Introduction
This task allows to create a new sequence based on a sequence definition.
Sequences are also explained in the how-to section.
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 generate sequence task, to give it 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. | |
| Store result variable transiently | Boolean | Flag that marks that the result of the expression will not be persisted at the end of the database transaction. Use this if you do not want to store a result after the next wait state, e.g. if you only need access to the result inside a condition. | |
| Sequence Definition | Reference | The sequence definition that will be used to generate the sequence value | Create or link a sequence model to this task. This sequence will be used to generate values that typically are ascending and are formatted in a certain way. e.g. prefixed / suffixed with a certain value. A sequence model reference can be unlinked to allow another sequence model to be linked in its place. Note that unlinking a sequence model does not delete the model itself. |
| Sequence Value Variable Name | Text | The name of the variable in which the generated sequence value will be stored. | The Sequence Value Variable Name is the mandatory name of the variable in which the sequence value will be persisted. Store Sequence Value Variable transiently is a flag indicating that the sequence value should be stored as a transient variable. The Generate Sequence Number flag indicates that a number value needs to be generated. By default, a String value with the formatting arguments defined in the Sequence Definition will be created. |
| Store Sequence Value Variable transiently | Boolean | Store the value of the generated sequence value transiently | |
| Generate Sequence Number | Boolean | Generate a sequence number instead of a formatted string value |
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 generate sequence task at runtime. With multi-instance it is possible to have multiple sequence values to be generated, either sequentially after each other or in parallel. For example, when referencing a collection one invocation of the custom logic is executed 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. | |
| 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. |