[jboss-user] [jBPM Users] - Re: [jBPM4] final state when async node is used

ouaibsky do-not-reply at jboss.com
Fri Sep 11 11:12:10 EDT 2009

The pb is not on getting a reference on processinstance.
The pb is the final state value is not "complete".

It's a pb because depending of continue mode, you do not have the same final result, and it means you'll have to know the worlflow containe to make some test.

ex: just add the last assertEquals on provides AsynActivityTest: 
	public void testEndStateCompleted() throws Exception {
  | 		ProcessInstance processInstance = executionService
  | 				.startProcessInstanceByKey("helloworld");
  | 		String pid = processInstance.getId();
  | 		System.out.println(processInstance.getState());
  | 		Thread.sleep(500);
  | 	    Job job = managementService.createJobQuery()
  | 	      .processInstanceId(pid)
  | 	      .uniqueResult();
  | 	    managementService.executeJob(job.getId());
  | 		//processInstance = executionService.signalExecutionById(pid, "toHello3");
  | 		Thread.sleep(500);
  | 		assertEquals("completed", processInstance.getState());
  | 		assertTrue(processInstance.isEnded());
  | 	}

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

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

More information about the jboss-user mailing list