Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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!

Wenn nichts manuell eingestellt wird, setzt sich die ID standardmäßig aus dem aktuellen Jahr + 4 aufeinanderfolgenden Zahlen zusammen

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.

ParameterStandardwert

Default value

BeschreibungDescription

Gültige BeispieleValid examples

mandatoryFields

Status
titleN/A

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.

Note

The variable name “id” should not be used!

IDwithYear

pattern

Status
titleN/A

Dieser Parameter ist optional und kann verwendet werden, um Prozessvariable(n) in den Prozessinstanznamen aufzunehmen. Hier kann die Variable #{key} aufgerufen werden.

length

4

Der length-Parameter erhöht die ID-Länge um eine angegebene Anzahl fortlaufender Zahlen.
Länge kann manuell eingestellt werden. Wenn beispielsweise "length=5" eingegeben wird, setzt sich die ID aus dem aktuellen Jahr + 5 fortlaufenden Zahlen zusammen.

Info
  • Employee_name #{variablename} #{key}
    output:
    Employee_name variablename IDwithyear

  • Employee_name #{variablename}
    output:Employee_name variablename

length

4

The length parameter increases the ID length by a specified number of consecutive numbers.
length can be set manually. For example, if “length=5” is entered, the ID will be composed of the current year + 5 consecutive numbers.

Info

If nothing is set manually, the ID is composed of the current year + 4 consecutive numbers by default.

prefix

Status
titleN/A

Dadurch wird der generierten ID ein angegebenes Präfix mit einem Leerzeichen zwischen dem Präfix und der ID hinzugefügt.

Info

Dieser Parameter wird nur gewählt, wenn der Musterparameter nicht verwendet wird!

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.

Note

This parameter is only chosen when the pattern parameter is not being used!

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

mandatoryFields

We put the variable name from the smartform here.

generatedID

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

mandatoryFields

We put the variable name from the smartform here.

generatedID

pattern

A pattern for the instance name can be created with text, process variables and key (which is the generated ID).
In the example:
Supervisor corresponds to text,
#{supervisor} corresponds to a process variable from the smart form and,
#{key} calls the generated ID which we created with the actionhandler

Supervisor #{supervisor} #{key}

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:

...