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#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...