if( result == null ) {
throw KieRemoteRestOperationException.notFound("Task " + taskId + " could not be found.");
}
Task task = ((Task) result);
long contentId = task.getTaskData().getDocumentContentId();
JaxbContent content = null;
if( contentId > -1 ) {
cmd = new GetContentCommand(contentId);
result = processRequestBean.doRestTaskOperation(taskId, task.getTaskData().getDeploymentId(), task.getTaskData().getProcessInstanceId(), task, cmd);
content = (JaxbContent) result;
} else {