An example of a JBPM workflow management (3)

xiaoxiao2021-03-06  57

(2) Decisionpackage kellerdu.jbpm.delegation;

Import org.jbpm.delegation. *; import kellerdu.jbpm.logsfactory; import org.apache.commons.logging.log; import kellerdu.jbpm.constants;

Public class chiefDecision imports decisionhandler {public chiefDecision () {}

/ ** * determine whether the supervisor approves, transition * * @param executionContext ExecutionContext * @return String * @todo Implement this org.jbpm.delegation.DecisionHandler method to be carried out under a decision * / public String decide (ExecutionContext executionContext) { Log log = logsfactory.getloginstance (this.getClass ()); string ac = (string) ExecutionContext.getvariable (constants.user_name); if (ac! = Null& (ac.equals ("dali") || ac.Equals "Wang")))) {log.info (AC "requires boss approvers!"); return "bossapprove";} else {log.info (AC "requires the first prior to approval"); return "chiefApprove";}}} ======================= (3) forkPackage kellerdu.jbpm.delegation;

Import org.jbpm. *; import org.jbpm.delegation. *; import org.jbpm.model.execution. *; import java.util. *;

Public class decidjoin implementments joinhandler {public decidedjoin () {}

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

New Post(0)