The main process should be able to be finished from the subprocess. Therefor a decision is taken in the subprocess (via XOR gateway), whether the main process should be finished or continued (again via XOR gateway) after the subprocess is finished.
Two handler are used at the decision point in the subprocess:
1. A process variable is set with the ProcessVariableSetter on node enter. A different contetn is set for every decision.
handler class:
com.dooris.bpm.actionhandler.ProcessVariableSetter
parameter for continuing the process:
name=endProcess;value=Yes;
parameter for finishing the process:
name=endProcess;value=No;
2. On node-leave the set variable is send to the mainprocess with the help of the WriteBackProcessVariableHandler .
Handlerklasse:
com.dooris.bpm.actionhandler.WriteBackProcessVariableHandler
Parameter:
includedVariables=endProcess;
In the main process a XOR decision is needed right after the subprocess, so that the variable from the subprocess can be checked. Depending on the variable the decision is made, which way the process should take. Therefor the VariableDecisionHandler is used in a XOR.
com.dooris.bpm.actionhandler.VariableDecisionHandler
Parameter
Name | Value |
---|---|
defaultTransition | No |
processVariable | endProcess |
The “defaultTransition” statement is optional. It determines, which way is taken, if no manual decision is made.
Now the IDs have to be assigned to the outputs, so that the process can take the respective way. The IDs correspond to content (“Yes” or “No”), given in the subprocess, of the variable “endProcess” (see above).
outputs
Name | ID |
---|---|
No | No |
Yes | Yes |
After that the process can be deployed and started.
iGrafX Prozesse:
mainprocess hp_wiki_43_igx.zip
subprocess sp_wiki_43_igx.zip