Beschreibung
...
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).
Info |
---|
Dieser Zähler wird nur mit dem Jahreswechsel zurückgesetzt. |
...
This counter is reset only with the change of the year. |
...
Class
Code Block |
---|
com.dooris.bpm.actionhandler.YearIDGenerator |
Parameter
Die generierte ID kann über die Variable The generated ID can be called on using the variable #{key} aufgerufen und anschließend im Handler verarbeitet werden. Wird die Variable als Prozessvariable in der Prozessentwicklung benötigt, muss das Pflichtfeld gesetzt werden, 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!
ParameterStandardwert | Default value | BeschreibungDescription | Gültige BeispieleValid examples | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
| Der Benutzer kann eine Variable festlegen, in die der erstellte Wert geschrieben wird. | The user can set a variable to which the created value is written.
|
| |||||||
|
| Dieser Parameter ist optional und kann verwendet werden, um Prozessvariable(n) in den Prozessinstanznamen aufzunehmen. Hier kann die Variable #{key} aufgerufen werden. |
|
| Der length-Parameter erhöht die ID-Länge um eine angegebene Anzahl fortlaufender Zahlen. Info | 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.
| |||||||||
|
| Dadurch wird der generierten ID ein angegebenes Präfix mit einem Leerzeichen zwischen dem Präfix und der ID hinzugefügt.
|
Beispiel
Wir haben eine Prozessinstanz namens "Year ID Generation" mit einer Aufgabe in diesem Beispiel. YearIDGenerator -Handler ist für den Task festgelegt.
...
Parameter
...
Beschreibung
...
Beispielwerte
...
mandatoryFields
...
Wir geben hier den Variablennamen aus dem Smartformular ein.
...
IDwithYear
Diese Einstellungen erstellen automatisch einen eindeutigen Namen basierend auf dem Jahr für jede gestartete Prozessinstanz.
Beispieländerung des Prozessinstanznamens nach Klick auf die Schaltfläche 'Prozessinstanz starten':
...
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 smartform 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 smartform 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 smartform 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 smartform 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:
...