service = createSingleSessionCommandService( sessionId,
kbase,
config,
env );
GetProcessInstanceCommand getProcessInstanceCommand = new GetProcessInstanceCommand();
getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
processInstance = service.execute( getProcessInstanceCommand );
assertNotNull( processInstance );
service.dispose();
service = createSingleSessionCommandService( sessionId,
kbase,
config,
env );
Thread.sleep(5000);
getProcessInstanceCommand = new GetProcessInstanceCommand();
getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
processInstance = service.execute( getProcessInstanceCommand );
assertNull( processInstance );
}