Description
This ActionHandler transfers variables from the main process to the sub-process. This means that the variables do not need to be defined/passed to the process-state activity one by one during the modeling process.
The handler is built-in on the first activity in the sub-process.
...
Beschreibung
Dieser ActionHandler übergibt automatisch Variablen vom Hauptprozess an den Unterprozess.
Der ActionHandler wird auf der ersten Aktivität im Unterprozess eingerichtet.
...
Klasse
Code Block |
---|
com.dooris.bpm.actionhandler.InheritProcessVariableHandler |
Parameter
Info |
---|
NoneNichts |
Example:
We have a simple use case to explain this actionhandler. In order to use this actionhandler, a main and a subprocess is necessary. We have following process instances:
...
We implement the actionhandler on the Department Variable via Inheritance task.
...
Furthermore, we attached one smartform for the main process which contains variables employeename
and department
. Another smartform with a field which has department
as a process variables.
Info |
---|
The relation is possible only if the variables from the two smartforms are identical. |
Before starting the process instance, name of the employee and the department information is filled out.
...
After starting the process instance, the department
variable is set to 'Marketing'.
...
When the First Task is completed, the process will continue with the sub-process:
...
Beispiel:
Nachfolgend wird anhand eines einfachen Anwendungsfalls die Verwendung des ActionHandlers erläutert. Damit die Variablen übergeben werden können, ist ein Haupt- und ein Unterprozess erforderlich. Wir haben folgende Vorgänge:
Hauptprozess
...
Unterprozess
Der InheritProcessVariableHandler wird auf der ersten Aufgabe auf Node-Enter im Unterprozess eingefügt. Hierdurch werden die Variablen vom Hauptprozess an den Unterprozess übergeben.
...
Der Hauptprozess enthält eine Smartform mit Eingabefeldern, die die Variablen employeename
und department
enthalten. Eine weitere Smartform mit einem Feld department
als Prozessvariable wird für den Unterprozess erstellt.
Info |
---|
Die Übergabe von Variablen von der Smartform des Hauptprozesses in die des Unterprozesses ist nur möglich, wenn die Variablen in beiden Smartforms identisch sind. |
Vor dem Start der Prozessinstanz werden der Name des Mitarbeiters und der Abteilung in das Formular eingegeben.
...
Nach dem Start der Prozessinstanz enthält die Variable department
den eingegebenen Wert 'Marketing'.
...
Sobald die erste Aufgabe im Hauptprozess abgeschlossen ist, wird der Unterprozess gestartet:
...
Beim Öffnen der Smartform des Unterprozesses ist die Variabledepartment
mit dem Wert ‘Marketing’ aus dem Hauptprozess befüllt.
...