Package org.jbpm.instantiation

Examples of org.jbpm.instantiation.Delegation.instantiate()


   
    Decision decision = (Decision) processDefinition.getNode("d");
    Delegation decisionDelegation = decision.decisionDelegation;
    assertNotNull(decisionDelegation);
    assertEquals("org.jbpm.graph.node.JpdlDbTest$MyDecisionHandler", decisionDelegation.getClassName());
    MyDecisionHandler decisionHandler = (MyDecisionHandler) decisionDelegation.instantiate();
    assertEquals("testing... one, two... testing", decisionHandler.decisionHandlerConfigText);
  }

  public void testFork() {
    ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
View Full Code Here


    public void execute(NodeInstance from, String type) {
      String transitionName = null;
      try {
        Delegation decisionDelegation = getDecision().getDecisionDelegation();
        if (decisionDelegation != null) {
          DecisionHandler decisionHandler = (DecisionHandler) decisionDelegation.instantiate();
          transitionName = decisionHandler.decide(new JpdlExecutionContext());
        } else if (getDecision().getDecisionExpression() != null) {
          String decisionExpression = getDecision().getDecisionExpression();
          Object result = JbpmExpressionEvaluator.evaluate(
          decisionExpression, new JpdlExecutionContext());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.