YearIDGenerator
Description
The handler generates a number, which can be used as a unique classification. Typically, the generated ID is integrated by the RenameInstanceHandler. The generated ID is set-up as such: YYYYxxxx; in which YYYY is the current year and xxxx represents a sequential counter number (Example: 20220001).
This counter is reset only with the change of the year.
Class
com.dooris.bpm.actionhandler.YearIDGenerator
Parameter
The generated ID can be called on using the variable #{key}, and can then be processed in the handler. If the variable is required as a process variable in the process development, the mandatory field must be set!
Parameter | Default value | Description | Valid examples |
---|---|---|---|
| N/A | The user can set a variable to which the created value is written. The variable name “id” should not be used! |
|
| N/A | This parameter is optional and can be used to include process variable(s) in the process instance name. Here, the variable #{key} can be called upon. |
|
|
| The length parameter increases the ID length by a specified number of consecutive numbers. If nothing is set manually, the ID is composed of the current year + 4 consecutive numbers by default. |
|
| N/A | This adds a specified prefix to the generated ID, with a blank space between the prefix and the ID. |
|
Example
We have a process instance named ‘Year ID Generation’ with one task in this example. YearIDGenerator handler is set on the task.
Different combinations can be used for the desired output for the process instance name. Our for example contains only the parameter mandatoryFields
.
We have a form with one input field which has the variable generatedID
.
Actionhandler will generate an ID which will be stored in this variable and will be shown after the process is started, as you can see in the example screenshots below.
Parameter | Description | Example values |
---|---|---|
| We put the variable name from the form here. |
|
Output after the configuration of the actionhandler:
Example 2:
As said before, different configurations are possible for this actionhandler. In this second example, we will also use the pattern
parameter to directly change the instance name. We have a form with two fields which are supervisor
(which will be used to enter the employee name) and generatedID
(which will be used to store and show the generated ID).
Parameter | Description | Example values |
---|---|---|
| We put the variable name from the form here. |
|
| A pattern for the instance name can be created with text, process variables and key (which is the generated ID). |
|
These settings will automatically create a unique name based on the year for each started process instance.
Example change of the process instance name after clicking the 'Start process instance' button:
© TIM Solutions GmbH | AGB | Datenschutz | Impressum