JBPM3 and divergence model

xiaoxiao2021-03-06  61

JBPM support http://blog.9cbs.net/hongbo781202/Archive/2004/07/12/39393. The three divergence models mentioned in Haspx:

1) Parallel split is implemented by the Fork to achieve multiple branches behind fork, JBPM guarantees that they are synchronous enabled

2) Exclusive Choice is implemented in process definition, to join the BSH script, the following is a method of jbpm resolution scripts: Script script = new script (); Script.setResultvariablename ("transitionname"); script.setstatements ("IF Scenario == 1) {" " TransitionName = / "to b /"; " "} else if (Scenario == 2) {" " transitionname = / "to c /"; "}"); Then, JBPM adds Script to the process definition: Decision Decision = (Decision) pd.getnode ("xor"); Decision.setScript (Script); During the process run, the environment instance is a variable value in the script: CI .Setvariable ("Scenario", New Integer (1)); JBPM can determine the flow of the process based on the value of the variable.

3) MULTIPLE Choice also achieves the difference from Decision, the result variable is no longer a string, but an array: script.setStatements ("transitionnames = new arraylist (); " f (Scenario == 1) {" " Transitionnames.add (/ "to b /"); " "} else if (Scenario == 2) {" " transitionNames.Add (/ "to c /"); " "} else IF (Scenario> = 3) {" " transitionnames.add (/ "to b /"); " " transitionnames.add (/ "to c /"); " "} ");

转载请注明原文地址:https://www.9cbs.com/read-84448.html

New Post(0)