(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 () {}