Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.Action


  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"));
    assertEquals("aloha", actionElement.elementTextTrim("greeting"));
  }
View Full Code Here


      "    a piece of configuration text" +
      "  </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

  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

      "<process-definition>" +
      "  <action name='burps' class='org.foo.Burps' />" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    assertTrue(action.acceptsPropagatedEvents());
  }
View Full Code Here

      "<process-definition>" +
      "  <action name='burps' class='org.foo.Burps' accept-propagated-events='true' />" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    assertTrue(action.acceptsPropagatedEvents());
  }
View Full Code Here

      "<process-definition>" +
      "  <action name='burps' class='org.foo.Burps' accept-propagated-events='false' />" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    assertFalse(action.acceptsPropagatedEvents());
  }
View Full Code Here

  }

  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

  }

  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" );
    assertNull(actionElement.attribute("accept-propagated-events"));
  }
View Full Code Here

  }

  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" );
    assertEquals("false", actionElement.attributeValue("accept-propagated-events"));
  }
View Full Code Here

      "      <action name='burps' class='org.foo.Burps'/>" +
      "    </event>" +
      "  </node>" +
      "</process-definition>"
    );
    Action burps = (Action)processDefinition.getNode("a").getEvent("node-enter").getActions().get(0);
    assertEquals("burps", burps.getName());
  }
View Full Code Here

TOP

Related Classes of org.jbpm.graph.def.Action

Copyright © 2018 www.massapicom. 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.