[jboss-user] [JBoss jBPM] - Re: Confusing regarding unit test

sebastian.s do-not-reply at jboss.com
Wed Aug 19 07:52:36 EDT 2009

Okay I changed my unit test to this:

  | 	public void testWaiteStateAndJavaTask() {
  | 	    ProcessInstance processInstance = executionService.startProcessInstanceByKey("task_types");
  | 	    Execution execution = processInstance.findActiveExecutionIn("state1");	    
  | 	    assertNotNull(execution);
  | 	    String executionId = execution.getId();
  | 	    executionService.signalExecutionById(executionId);
  | 	    processInstance = executionService.findProcessInstanceById(processInstance.getId());
  | 	    Set<String> activities = processInstance.findActiveActivityNames();
  | 	    System.out.println(activities.toString());
  | 	}

Now it works as expected. Thanks for your explanation, Ronald. Need to keep this in mind.

anonymous wrote : What you get back is not a reference to something but the thing that is active at the time you requested it (disconnected). The behaviour of jBPM is as expected. Same is true for tasklists etc.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250375#4250375

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250375

More information about the jboss-user mailing list