Package org.jbpm.graph.exe

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


      "  <end-state name='end' />" +
      "</process-definition>"
    );

    ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("testSwimlanePoolReassignmentOfTakenTask");
    processInstance.signal();
   
    processInstance = saveAndReload(processInstance);
   
    TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
    SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance("hero");
View Full Code Here


      "  </task-node>" +
      "</process-definition>"
    );

    ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("testNullActorsForSwimlaneInitialization");
    processInstance.signal();
   
    processInstance = saveAndReload(processInstance);
    TaskMgmtInstance taskMgmtInstance = processInstance.getTaskMgmtInstance();
    SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance("hero");
    TaskInstance changeNappy = (TaskInstance) taskMgmtInstance.getTaskInstances().iterator().next();
View Full Code Here

    );
    processDefinition = saveAndReload(processDefinition);
   
    // create the process instance
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    processInstance.signal();
    jbpmContext.save(processInstance);
   
    commitAndCloseSession();
   
    SchedulerThread schedulerThread = new SchedulerThread(jbpmConfiguration);
View Full Code Here

    contextInstance.setVariable("hotel", "best western");
    contextInstance.setVariable("city", "wengen");
    contextInstance.setVariable("ski conditions", "excellent");
    contextInstance.setVariable("slopes", "well prepared and sunny");
    contextInstance.setVariable("food", "just enough");
    processInstance.signal();

    newTransaction();
   
    log.info("");
    log.info("=== PERFORMING TASK ONE =======================================================");
View Full Code Here

  public void testStates() {
    log.info("");
    log.info("=== CREATING PROCESS INSTANCE =======================================================");
    log.info("");
    ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("states");
    processInstance.signal();

    newTransaction();
    long processInstanceId = processInstance.getId();
   
    log.info("");
View Full Code Here

   
    log.info("");
    log.info("=== STATE CHANGE ONE --> TWO =======================================================");
    log.info("");
    processInstance = jbpmContext.loadProcessInstanceForUpdate(processInstanceId);
    processInstance.signal();

    newTransaction();
   
    log.info("");
    log.info("=== STATE CHANGE TWO --> END =======================================================");
View Full Code Here

   
    log.info("");
    log.info("=== STATE CHANGE TWO --> END =======================================================");
    log.info("");
    processInstance = jbpmContext.loadProcessInstanceForUpdate(processInstanceId);
    processInstance.signal();
  }
 
  private static final Log log = LogFactory.getLog(StateUpdateTest.class);
}
View Full Code Here

    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      TestSchedulerService testSchedulerService = (TestSchedulerService) jbpmContext.getServices().getSchedulerService();
     
      ProcessInstance processInstance = new ProcessInstance(processDefinition);
      processInstance.signal();
     
      assertEquals(1, testSchedulerService.createdTimers.size());
      Timer scheduledTimer = (Timer) testSchedulerService.createdTimers.get(0);
      assertEquals("reminder", scheduledTimer.name);
      assertEquals(processDefinition.getNode("catch crooks"), scheduledTimer.graphElement);
View Full Code Here

    JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
    try {
      TestSchedulerService testSchedulerService = (TestSchedulerService) jbpmContext.getServices().getSchedulerService();
     
      ProcessInstance processInstance = new ProcessInstance(processDefinition);
      processInstance.signal();
     
      assertEquals(1, testSchedulerService.createdTimers.size());
      Timer scheduledTimer = (Timer) testSchedulerService.createdTimers.get(0);
      assertEquals("reminder", scheduledTimer.name);
      assertEquals(processDefinition.getNode("catch crooks"), scheduledTimer.graphElement);
View Full Code Here

      assertEquals("the-remainder-action-class-name", scheduledTimer.action.getActionDelegation().getClassName());
      assertSame(processInstance.getRootToken(), scheduledTimer.token);
      assertEquals("time-out-transition", scheduledTimer.transitionName);
 
      // while we are at it, i might as well check if the cancel timer is not executed ;)
      processInstance.signal();
      assertEquals(0, testSchedulerService.cancelledTimersByName.size());
     
    } finally {
      jbpmContext.close();
    }
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.