java.lang.Object
com.netflix.conductor.common.metadata.tasks.Task

public class Task extends Object
  • Constructor Details

    • Task

      public Task()
  • Method Details

    • getTaskType

      public String getTaskType()
      Returns:
      Type of the task
      See Also:
    • setTaskType

      public void setTaskType(String taskType)
    • getStatus

      public Task.Status getStatus()
      Returns:
      Status of the task
    • setStatus

      public void setStatus(Task.Status status)
      Parameters:
      status - Status of the task
    • getInputData

      public Map<String,Object> getInputData()
    • setInputData

      public void setInputData(Map<String,Object> inputData)
    • getReferenceTaskName

      public String getReferenceTaskName()
      Returns:
      the referenceTaskName
    • setReferenceTaskName

      public void setReferenceTaskName(String referenceTaskName)
      Parameters:
      referenceTaskName - the referenceTaskName to set
    • getCorrelationId

      public String getCorrelationId()
      Returns:
      the correlationId
    • setCorrelationId

      public void setCorrelationId(String correlationId)
      Parameters:
      correlationId - the correlationId to set
    • getRetryCount

      public int getRetryCount()
      Returns:
      the retryCount
    • setRetryCount

      public void setRetryCount(int retryCount)
      Parameters:
      retryCount - the retryCount to set
    • getScheduledTime

      public long getScheduledTime()
      Returns:
      the scheduledTime
    • setScheduledTime

      public void setScheduledTime(long scheduledTime)
      Parameters:
      scheduledTime - the scheduledTime to set
    • getStartTime

      public long getStartTime()
      Returns:
      the startTime
    • setStartTime

      public void setStartTime(long startTime)
      Parameters:
      startTime - the startTime to set
    • getEndTime

      public long getEndTime()
      Returns:
      the endTime
    • setEndTime

      public void setEndTime(long endTime)
      Parameters:
      endTime - the endTime to set
    • getStartDelayInSeconds

      public int getStartDelayInSeconds()
      Returns:
      the startDelayInSeconds
    • setStartDelayInSeconds

      public void setStartDelayInSeconds(int startDelayInSeconds)
      Parameters:
      startDelayInSeconds - the startDelayInSeconds to set
    • getRetriedTaskId

      public String getRetriedTaskId()
      Returns:
      the retriedTaskId
    • setRetriedTaskId

      public void setRetriedTaskId(String retriedTaskId)
      Parameters:
      retriedTaskId - the retriedTaskId to set
    • getSeq

      public int getSeq()
      Returns:
      the seq
    • setSeq

      public void setSeq(int seq)
      Parameters:
      seq - the seq to set
    • getUpdateTime

      public long getUpdateTime()
      Returns:
      the updateTime
    • setUpdateTime

      public void setUpdateTime(long updateTime)
      Parameters:
      updateTime - the updateTime to set
    • getQueueWaitTime

      public long getQueueWaitTime()
      Returns:
      the queueWaitTime
    • isRetried

      public boolean isRetried()
      Returns:
      True if the task has been retried after failure
    • setRetried

      public void setRetried(boolean retried)
      Parameters:
      retried - the retried to set
    • isExecuted

      public boolean isExecuted()
      Returns:
      True if the task has completed its lifecycle within conductor (from start to completion to being updated in the datastore)
    • setExecuted

      public void setExecuted(boolean executed)
      Parameters:
      executed - the executed value to set
    • getPollCount

      public int getPollCount()
      Returns:
      No. of times task has been polled
    • setPollCount

      public void setPollCount(int pollCount)
    • incrementPollCount

      public void incrementPollCount()
    • isCallbackFromWorker

      public boolean isCallbackFromWorker()
    • setCallbackFromWorker

      public void setCallbackFromWorker(boolean callbackFromWorker)
    • getTaskDefName

      public String getTaskDefName()
      Returns:
      Name of the task definition
    • setTaskDefName

      public void setTaskDefName(String taskDefName)
      Parameters:
      taskDefName - Name of the task definition
    • getResponseTimeoutSeconds

      public long getResponseTimeoutSeconds()
      Returns:
      the timeout for task to send response. After this timeout, the task will be re-queued
    • setResponseTimeoutSeconds

      public void setResponseTimeoutSeconds(long responseTimeoutSeconds)
      Parameters:
      responseTimeoutSeconds - - timeout for task to send response. After this timeout, the task will be re-queued
    • getWorkflowInstanceId

      public String getWorkflowInstanceId()
      Returns:
      the workflowInstanceId
    • setWorkflowInstanceId

      public void setWorkflowInstanceId(String workflowInstanceId)
      Parameters:
      workflowInstanceId - the workflowInstanceId to set
    • getWorkflowType

      public String getWorkflowType()
    • setWorkflowType

      public Task setWorkflowType(String workflowType)
      Parameters:
      workflowType - the name of the workflow
      Returns:
      the task object with the workflow type set
    • getTaskId

      public String getTaskId()
      Returns:
      the taskId
    • setTaskId

      public void setTaskId(String taskId)
      Parameters:
      taskId - the taskId to set
    • getReasonForIncompletion

      public String getReasonForIncompletion()
      Returns:
      the reasonForIncompletion
    • setReasonForIncompletion

      public void setReasonForIncompletion(String reasonForIncompletion)
      Parameters:
      reasonForIncompletion - the reasonForIncompletion to set
    • getCallbackAfterSeconds

      public long getCallbackAfterSeconds()
      Returns:
      the callbackAfterSeconds
    • setCallbackAfterSeconds

      public void setCallbackAfterSeconds(long callbackAfterSeconds)
      Parameters:
      callbackAfterSeconds - the callbackAfterSeconds to set
    • getWorkerId

      public String getWorkerId()
      Returns:
      the workerId
    • setWorkerId

      public void setWorkerId(String workerId)
      Parameters:
      workerId - the workerId to set
    • getOutputData

      public Map<String,Object> getOutputData()
      Returns:
      the outputData
    • setOutputData

      public void setOutputData(Map<String,Object> outputData)
      Parameters:
      outputData - the outputData to set
    • getWorkflowTask

      public WorkflowTask getWorkflowTask()
      Returns:
      Workflow Task definition
    • setWorkflowTask

      public void setWorkflowTask(WorkflowTask workflowTask)
      Parameters:
      workflowTask - Task definition
    • getDomain

      public String getDomain()
      Returns:
      the domain
    • setDomain

      public void setDomain(String domain)
      Parameters:
      domain - the Domain
    • getTaskDefinition

      public Optional<TaskDef> getTaskDefinition()
      Returns:
      Optional containing the task definition if available
    • getRateLimitPerFrequency

      public int getRateLimitPerFrequency()
    • setRateLimitPerFrequency

      public void setRateLimitPerFrequency(int rateLimitPerFrequency)
    • getRateLimitFrequencyInSeconds

      public int getRateLimitFrequencyInSeconds()
    • setRateLimitFrequencyInSeconds

      public void setRateLimitFrequencyInSeconds(int rateLimitFrequencyInSeconds)
    • getExternalInputPayloadStoragePath

      public String getExternalInputPayloadStoragePath()
      Returns:
      the external storage path for the task input payload
    • setExternalInputPayloadStoragePath

      public void setExternalInputPayloadStoragePath(String externalInputPayloadStoragePath)
      Parameters:
      externalInputPayloadStoragePath - the external storage path where the task input payload is stored
    • getExternalOutputPayloadStoragePath

      public String getExternalOutputPayloadStoragePath()
      Returns:
      the external storage path for the task output payload
    • setExternalOutputPayloadStoragePath

      public void setExternalOutputPayloadStoragePath(String externalOutputPayloadStoragePath)
      Parameters:
      externalOutputPayloadStoragePath - the external storage path where the task output payload is stored
    • setIsolationGroupId

      public void setIsolationGroupId(String isolationGroupId)
    • getIsolationGroupId

      public String getIsolationGroupId()
    • getExecutionNameSpace

      public String getExecutionNameSpace()
    • setExecutionNameSpace

      public void setExecutionNameSpace(String executionNameSpace)
    • getIteration

      public int getIteration()
      Returns:
      the iteration
    • setIteration

      public void setIteration(int iteration)
      Parameters:
      iteration - iteration
    • isLoopOverTask

      public boolean isLoopOverTask()
    • getWorkflowPriority

      public int getWorkflowPriority()
      Returns:
      the priority defined on workflow
    • setWorkflowPriority

      public void setWorkflowPriority(int workflowPriority)
      Parameters:
      workflowPriority - Priority defined for workflow
    • isSubworkflowChanged

      public boolean isSubworkflowChanged()
    • setSubworkflowChanged

      public void setSubworkflowChanged(boolean subworkflowChanged)
    • getSubWorkflowId

      public String getSubWorkflowId()
    • setSubWorkflowId

      public void setSubWorkflowId(String subWorkflowId)
    • getParentTaskId

      public String getParentTaskId()
    • setParentTaskId

      public void setParentTaskId(String parentTaskId)
    • copy

      public Task copy()
    • deepCopy

      public Task deepCopy()
      Returns:
      a deep copy of the task instance To be used inside copy Workflow method to provide a valid deep copied object. Note: This does not copy the following fields:
      • retried
      • updateTime
      • retriedTaskId
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object