service = jpaService.loadStatefulKnowledgeSession(sessionId);
GetProcessInstanceCommand getProcessInstanceCommand = new GetProcessInstanceCommand();
getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
processInstance = service.execute( getProcessInstanceCommand );
assertNotNull( processInstance );
service.dispose();
service = jpaService.loadStatefulKnowledgeSession(sessionId);
CompleteWorkItemCommand completeWorkItemCommand = new CompleteWorkItemCommand();
completeWorkItemCommand.setWorkItemId( workItem.getId() );
service.execute( completeWorkItemCommand );