kbase,
config,
env );
registerWorkItemHandlers(service);
CompleteWorkItemCommand completeWorkItemCommand = new CompleteWorkItemCommand();
completeWorkItemCommand.setWorkItemId( workItem.getId() );
service.execute( completeWorkItemCommand );
workItem = handler.getWorkItem();
assertNotNull( workItem );
service.dispose();
service = createSingleSessionCommandService( sessionId,
kbase,
config,
env );
registerWorkItemHandlers(service);
getProcessInstanceCommand = new GetProcessInstanceCommand();
getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
processInstance = service.execute( getProcessInstanceCommand );
assertNotNull( processInstance );
service.dispose();
service = createSingleSessionCommandService( sessionId,
kbase,
config,
env );
registerWorkItemHandlers(service);
completeWorkItemCommand = new CompleteWorkItemCommand();
completeWorkItemCommand.setWorkItemId( workItem.getId() );
service.execute( completeWorkItemCommand );
workItem = handler.getWorkItem();
assertNotNull( workItem );
service.dispose();
service = createSingleSessionCommandService( sessionId,
kbase,
config,
env );
registerWorkItemHandlers(service);
getProcessInstanceCommand = new GetProcessInstanceCommand();
getProcessInstanceCommand.setProcessInstanceId( processInstance.getId() );
processInstance = service.execute( getProcessInstanceCommand );
assertNotNull( processInstance );
service.dispose();
service = createSingleSessionCommandService( sessionId,
kbase,
config,
env );
registerWorkItemHandlers(service);
completeWorkItemCommand = new CompleteWorkItemCommand();
completeWorkItemCommand.setWorkItemId( workItem.getId() );
service.execute( completeWorkItemCommand );
workItem = handler.getWorkItem();
assertNull( workItem );
service.dispose();