Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.ProcessDefinition.findNode()


    List transitionLogs = loggingInstance.getLogs(TransitionLog.class);
    assertEquals(2, transitionLogs.size());
    TransitionLog transitionLog = (TransitionLog) transitionLogs.get(1);
    assertSame(token, transitionLog.getToken());
    assertNotNull(transitionLog.getDate());
    assertSame(processDefinition.findNode("superstate/state"), transitionLog.getSourceNode());
    assertSame(processDefinition.getNode("end"), transitionLog.getDestinationNode());
  }

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


    assertEquals(1, transitionLogs.size());
    TransitionLog transitionLog = (TransitionLog) transitionLogs.get(0);
    assertSame(token, transitionLog.getToken());
    assertNotNull(transitionLog.getDate());
    assertSame(processDefinition.getStartState(), transitionLog.getSourceNode());
    assertSame(processDefinition.findNode("superstate/state"), transitionLog.getDestinationNode());
  }
}
View Full Code Here

    );
    // create the process instance
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    Token token = processInstance.getRootToken();
    processInstance.signal();
    assertEquals(processDefinition.findNode("superstate/insidesuperstate"), token.getNode());
    processInstance.signal();
    assertEquals(processDefinition.getNode("s"), token.getNode());
  }

  public void testTransitionToSuperState() {
View Full Code Here

    );
    // create the process instance
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    Token token = processInstance.getRootToken();
    processInstance.signal();
    assertEquals(processDefinition.findNode("superstate/insidesuperstate"), token.getNode());
  }

}
View Full Code Here

  ProcessDefinition oldDef = token.getProcessInstance()
    .getProcessDefinition();

  ProcessDefinition newDef = jbpmContext.getGraphSession()
    .findProcessDefinition(oldDef.getName(), newVersion);
  Node newNode = newDef.findNode(getNewNodeName(oldNode));

  if (newNode == null) {
      throw new JbpmException("node with name '"
        + getNewNodeName(oldNode)
        + "' not found in new process definition");
View Full Code Here

        Node oldNode = token.getNode();

        ProcessDefinition oldDef = token.getProcessInstance().getProcessDefinition();
        ProcessDefinition newDef = getNewDef(oldDef.getName());
       
        Node newNode = newDef.findNode(getNewNodeName(oldNode));

        if (newNode == null) {
            throw new JbpmException("node with name '" + getNewNodeName(oldNode) + "' not found in new process definition");
        }
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.