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