Class TaskExecutionResource

java.lang.Object
org.springframework.hateoas.RepresentationModel<TaskExecutionResource>
org.springframework.cloud.dataflow.rest.resource.TaskExecutionResource

public class TaskExecutionResource extends org.springframework.hateoas.RepresentationModel<TaskExecutionResource>
A HATEOAS representation of a TaskExecution.
Author:
Glenn Renfro, Gunnar Hillert, Ilayaperumal Gopinathan, Corneil du Plessis
  • Constructor Details

    • TaskExecutionResource

      public TaskExecutionResource()
    • TaskExecutionResource

      public TaskExecutionResource(TaskJobExecutionRel taskJobExecutionRel)
      Constructor to initialize the TaskExecutionResource using TaskJobExecutionRel.
      Parameters:
      taskJobExecutionRel - contains the TaskExecution but also a list of the Job ExecutionIds that were associated with this task if applicable.
    • TaskExecutionResource

      public TaskExecutionResource(org.springframework.cloud.task.repository.TaskExecution taskExecution, TaskJobExecution composedTaskJobExecution)
      Constructor to initialize the TaskExecutionResource using a TaskExecution.
      Parameters:
      taskExecution - contains the TaskExecution
      composedTaskJobExecution - the optional composed task execution.
    • TaskExecutionResource

      public TaskExecutionResource(org.springframework.cloud.task.repository.TaskExecution taskExecution, TaskManifest taskManifest, TaskJobExecution composedTaskJobExecution)
      Constructor to initialize the TaskExecutionResource using a TaskExecution and TaskManifest.
      Parameters:
      taskExecution - contains the TaskExecution
      taskManifest - contains the (@link TaskManifest}
      composedTaskJobExecution - The optional composed task execution.
  • Method Details

    • getExecutionId

      public long getExecutionId()
    • getExitCode

      public Integer getExitCode()
      Returns:
      the int containing the exit code of the task application upon completion. Default is 0.
    • getTaskName

      public String getTaskName()
    • getStartTime

      public LocalDateTime getStartTime()
    • getEndTime

      public LocalDateTime getEndTime()
    • getExitMessage

      public String getExitMessage()
    • getArguments

      public List<String> getArguments()
    • getJobExecutionIds

      public List<Long> getJobExecutionIds()
    • getErrorMessage

      public String getErrorMessage()
    • getExternalExecutionId

      public String getExternalExecutionId()
    • getParentExecutionId

      public Long getParentExecutionId()
    • getResourceUrl

      public String getResourceUrl()
    • getAppProperties

      public Map<String,String> getAppProperties()
    • getDeploymentProperties

      public Map<String,String> getDeploymentProperties()
    • getPlatformName

      public String getPlatformName()
    • setPlatformName

      public void setPlatformName(String platformName)
    • setTaskExecutionStatus

      public void setTaskExecutionStatus(String taskExecutionStatus)
    • getTaskExecutionStatus

      public TaskExecutionStatus getTaskExecutionStatus()
      Returns the calculated status of this TaskExecution. If startTime is null, the TaskExecution is considered to be not running (never executed). If endTime is null, the TaskExecution is considered to be still running: TaskExecutionStatus.RUNNING. If the endTime is defined and the exitCode is non-zero, an status of TaskExecutionStatus.ERROR is assumed, if exitCode is zero, TaskExecutionStatus.COMPLETE is returned.
      Returns:
      TaskExecutionStatus, never null