InheritProcessVariableHandler

Description

This ActionHandler transfers variables from the main process to the sub-process.

The handler is set up on the first activity of the sub-process.


Class

com.dooris.bpm.actionhandler.InheritProcessVariableHandler

Parameter

None

 

Example:

In the following, the use of the ActionHandler is explained on the basis of a simple use case. In order for the variables to be passed, a main process and a subprocess are required.

  1. Main process

  1. Subprocess

The InheritProcessVariableHandler is set up on the first task of the subprocess by using the event type ‘node-enter’ . This transfers the variables from the main process to the subprocess.

The main process contains a form with input fields containing the variables employeename and department. Another form with a department field as a process variable is created for the subprocess.

For transferring variables from the form of the main process to that of the subprocess the variables must be the same in both forms.

 

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:

When opening the Form of the subprocess, the variable department is filled with the value 'Marketing' from the main process.