Package org.jbpm.graph.exe

Examples of org.jbpm.graph.exe.Token.signal()


    ProcessInstance processInstance = new ProcessInstance(doorProcess);
    Token token = processInstance.getRootToken();
    assertEquals("Closed", token.getNode().getName());
    token.signal("open");
    assertEquals("Open", token.getNode().getName());
    token.signal("close");
    assertEquals("Closed", token.getNode().getName());
    try {
      token.signal("unlock");
      fail("excepted exception");
    } catch (RuntimeException e) {
View Full Code Here


    token.signal("open");
    assertEquals("Open", token.getNode().getName());
    token.signal("close");
    assertEquals("Closed", token.getNode().getName());
    try {
      token.signal("unlock");
      fail("excepted exception");
    } catch (RuntimeException e) {
    }
  }
View Full Code Here

  // the setNode method.

  public void testClosedOpen() {
    ProcessInstance processInstance = new ProcessInstance(doorProcess);
    Token token = processInstance.getRootToken();
    token.signal("open");
    assertEquals("Open", token.getNode().getName());
  }

  public void testClosedLock() {
    ProcessInstance processInstance = new ProcessInstance(doorProcess);
View Full Code Here

  }

  public void testClosedLock() {
    ProcessInstance processInstance = new ProcessInstance(doorProcess);
    Token token = processInstance.getRootToken();
    token.signal("lock");
    assertEquals("Locked", token.getNode().getName());
  }

  public void testClosedClose() {
    ProcessInstance processInstance = new ProcessInstance(doorProcess);
View Full Code Here

  public void testClosedClose() {
    ProcessInstance processInstance = new ProcessInstance(doorProcess);
    Token token = processInstance.getRootToken();
    try {
      token.signal("close");
      fail("expected exception");
    } catch (JbpmException e) {
    }
  }
View Full Code Here

  public void testClosedUnlock() {
    ProcessInstance processInstance = new ProcessInstance(doorProcess);
    Token token = processInstance.getRootToken();
    try {
      token.signal("unlock");
      fail("expected exception");
    } catch (JbpmException e) {
    }
  }
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.