Examples of Delegation


Examples of org.jbpm.instantiation.Delegation

    TaskNode taskNode = (TaskNode) processDefinition.getNode("t");
    Task task = taskNode.getTask("clean ceiling");
    TaskController taskController = task.getTaskController();
    assertTrue( (taskController.getVariableAccesses()==null)
                || (taskController.getVariableAccesses().isEmpty()) );
    Delegation taskControllerDelegation = taskController.getTaskControllerDelegation();
    assertNotNull(taskControllerDelegation);
    assertEquals("my-own-task-controller-handler-class", taskControllerDelegation.getClassName());
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

  public void testWriteProcessDefinitionAction() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Event event = new Event("node-enter");
    processDefinition.addEvent(event);
    event.addAction(new Action(new Delegation("one")));
    event.addAction(new Action(new Delegation("two")));
    event.addAction(new Action(new Delegation("three")));
   
    Element eventElement = toXmlAndParse( processDefinition, "/process-definition/event" );
   
    List actionElements = eventElement.elements("action");
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    assertEquals("bean", processDefinition.getAction("burps").getActionDelegation().getConfigType() );
  }

  public void testWriteActionConfigType() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    actionDelegate.setConfigType("bean");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("bean", actionElement.attributeValue("config-type"));
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

      "  </action>" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    Delegation instantiatableDelegate = action.getActionDelegation();
    assertTrue(instantiatableDelegate.getConfiguration().indexOf("<id>63</id>")!=-1);
    assertTrue(instantiatableDelegate.getConfiguration().indexOf("<greeting>aloha</greeting>")!=-1 );
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    assertTrue(instantiatableDelegate.getConfiguration().indexOf("<greeting>aloha</greeting>")!=-1 );
  }

  public void testWriteActionXmlConfiguration() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    actionDelegate.setConfiguration("<id>63</id><greeting>aloha</greeting>");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("63", actionElement.elementTextTrim("id"));
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

      "  </action>" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    Delegation instantiatableDelegate = action.getActionDelegation();
    assertTrue(instantiatableDelegate.getConfiguration().indexOf("a piece of configuration text")!=-1);
  }
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    assertTrue(instantiatableDelegate.getConfiguration().indexOf("a piece of configuration text")!=-1);
  }

  public void testWriteActionTextConfiguration() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    actionDelegate.setConfiguration("a piece of configuration text");
    actionDelegate.setConfigType("constructor");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("a piece of configuration text", actionElement.getTextTrim());
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    assertFalse(action.acceptsPropagatedEvents());
  }

  public void testWriteActionAcceptPropagatedEventsDefault() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertNull(actionElement.attribute("accept-propagated-events"));
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    assertNull(actionElement.attribute("accept-propagated-events"));
  }

  public void testWriteActionAcceptPropagatedEventsTrue() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    Action action = new Action(actionDelegate);
    action.setName("a");
    action.setPropagationAllowed(true);
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
View Full Code Here

Examples of org.jbpm.instantiation.Delegation

    assertNull(actionElement.attribute("accept-propagated-events"));
  }

  public void testWriteActionAcceptPropagatedEventsFalse() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    Action action = new Action(actionDelegate);
    action.setName("a");
    action.setPropagationAllowed(false);
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
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.