public Task pollTask(String taskType, String workerId, String domain) {
        Validate.notBlank(taskType, "Task type cannot be blank");
        Validate.notBlank(workerId, "Worker id cannot be blank");

        Object[] params = new Object[] {"workerid", workerId, "domain", domain};
        Task task =
                ObjectUtils.defaultIfNull(
                        getForEntity("tasks/poll/{taskType}", params, Task.class, taskType),
                        new Task());
        populateTaskPayloads(task);
        return task;
    }
Perform a poll for a task of a specific task type.

@param taskType The taskType to poll for
@param domain The domain of the task type
@param workerId Name of the client worker. Used for logging.
@return Task waiting to be executed.
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java