get the specific task entity
@param tasks list of task summaries
@param taskId task id
@return
16696
public static TaskEntity getTaskEntity(List<TaskSummary> tasks, int taskId) {
        TaskEntity entity = null;
        for (TaskSummary task : tasks) {
            if (task.get_taskId() == taskId) {
                entity = new TaskEntity(task);
                break;
            }
        }
        return entity;
    }
1170462
public OvhIpTask ip_task_taskId_GET(String ip, Long taskId) throws IOException {
		String qPath = "/ip/{ip}/task/{taskId}";
		StringBuilder sb = path(qPath, ip, taskId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhIpTask.class);
	}
1230890
def get_task(self, task_id):
        
        task = self.request_single('GetTask', {'id': task_id})

        if task:
            return zobjects.Task.from_dict(task)
        else:
            return None
196482
public Task getTaskDetails(String taskId) {
        Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank");
        return getForEntity("tasks/{taskId}", null, Task.class, taskId);
    }
589788
public CollectionRequest<Task> projects(String task) {
    
        String path = String.format("/tasks/%s/projects", task);
        return new CollectionRequest<Task>(this, Task.class, path, "GET");
    }
878982
@Override
	public List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId, String language) {
		return delegate.getTasksAssignedAsBusinessAdministrator(userId, language);
	}
84841
public String getUserName(TaskAttemptID taskId) {
    TaskInProgress tip = tasks.get(taskId);
    if (tip != null) {
      return tip.getJobConf().getUser();
    }
    return null;
  }
650092
public function getTask($taskId)
    {
        $filename = $this->taskIdToFileName($taskId);
        if (!file_exists($filename)) {
            return null;
        }

        return $this->createTaskFromMetaData(new JsonFile($filename, null));
    }
1255708
public List<Task> getTasksWithReference(Reference reference) {
		return getResourceFactory().getApiResource(
				"/task/" + reference.getType().name().toLowerCase() + "/"
						+ reference.getId() + "/").get(
				new GenericType<List<Task>>() {
				});
	}
860097
public synchronized TaskMetricStore getTaskMetricStore(String jobID, String taskID) {
		JobMetricStore job = jobID == null ? null : jobs.get(jobID);
		if (job == null || taskID == null) {
			return null;
		}
		return TaskMetricStore.unmodifiable(job.getTaskMetricStore(taskID));
	}
1122699
public Task getPendingTaskForWorkflow(String workflowId, String taskReferenceName) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "Workflow id cannot be blank");
        Preconditions.checkArgument(StringUtils.isNotBlank(taskReferenceName), "Task reference name cannot be blank");

        TaskServicePb.PendingTaskResponse response = stub.getPendingTaskForWorkflow(
                TaskServicePb.PendingTaskRequest.newBuilder()
                        .setWorkflowId(workflowId)
                        .setTaskRefName(taskReferenceName)
                        .build()
        );
        return protoMapper.fromProto(response.getTask());
    }
443325
@Override
	public UserTaskInstanceDesc getTaskByWorkItemId(Long workItemId) {
		Map<String, Object> params = new HashMap<String, Object>();
        params.put("workItemId", workItemId);
        params.put("maxResults", 1);
        List<UserTaskInstanceDesc> tasks = commandService.execute(
				new QueryNameCommand<List<UserTaskInstanceDesc>>("getTaskInstanceByWorkItemId", params));

    	if (!tasks.isEmpty()) {
        	return tasks.iterator().next();
        }
        return null;
	}
655512
public static Package getTaskTemplatePackage(Long taskId) {
        try {
            for (Package pkg : getPackageList()) {
              if (pkg.containsTaskTemplate(taskId))
                  return pkg;
            }
            return Package.getDefaultPackage();
        }
        catch (CachingException ex) {
            logger.severeException(ex.getMessage(), ex);
            return null;
        }
    }
1275565
@Override
	public TaskBase getTask(String processDefinitionName, Long taskid) {
		ProcessDefinition pd = getProcessDefinition(processDefinitionName);
		if (pd == null) {
			throw new WorkflowException("Could not find active process for "+processDefinitionName);
		}
		TaskBase task = getTask(pd,taskid);
		if (task == null) {
			throw new WorkflowException("Could not find task for "+processDefinitionName+":"+taskid);
		}
		return task;
	}
211863
@Override
	public Task findTask(Long taskId) {
		check();
		Task task = null;
		if( this.pessimisticLocking ) {
			return this.em.find( TaskImpl.class, taskId, lockMode );
        }
		task = this.em.find( TaskImpl.class, taskId );
		return task;
	}
826423
public CollectionRequest<Task> subtasks(String task) {
    
        String path = String.format("/tasks/%s/subtasks", task);
        return new CollectionRequest<Task>(this, Task.class, path, "GET");
    }
1307130
def get_task(client, task_id):
    '''  '''
    endpoint = '/'.join([client.api.Endpoints.TASKS, str(task_id)])
    response = client.authenticated_request(endpoint)
    return response.json()