public class ActivityTask
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Unit of work sent to an activity worker.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
activityId
The unique ID of the task.
|
private ActivityType |
activityType
The type of this activity task.
|
private java.lang.String |
input
The inputs provided when the activity task was scheduled.
|
private java.lang.Long |
startedEventId
The ID of the
ActivityTaskStarted event recorded in the
history. |
private java.lang.String |
taskToken
The opaque string used as a handle on the task.
|
private WorkflowExecution |
workflowExecution
The workflow execution that started this activity task.
|
Constructor and Description |
---|
ActivityTask() |
Modifier and Type | Method and Description |
---|---|
ActivityTask |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getActivityId()
The unique ID of the task.
|
ActivityType |
getActivityType()
The type of this activity task.
|
java.lang.String |
getInput()
The inputs provided when the activity task was scheduled.
|
java.lang.Long |
getStartedEventId()
The ID of the
ActivityTaskStarted event recorded in the
history. |
java.lang.String |
getTaskToken()
The opaque string used as a handle on the task.
|
WorkflowExecution |
getWorkflowExecution()
The workflow execution that started this activity task.
|
int |
hashCode() |
void |
setActivityId(java.lang.String activityId)
The unique ID of the task.
|
void |
setActivityType(ActivityType activityType)
The type of this activity task.
|
void |
setInput(java.lang.String input)
The inputs provided when the activity task was scheduled.
|
void |
setStartedEventId(java.lang.Long startedEventId)
The ID of the
ActivityTaskStarted event recorded in the
history. |
void |
setTaskToken(java.lang.String taskToken)
The opaque string used as a handle on the task.
|
void |
setWorkflowExecution(WorkflowExecution workflowExecution)
The workflow execution that started this activity task.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ActivityTask |
withActivityId(java.lang.String activityId)
The unique ID of the task.
|
ActivityTask |
withActivityType(ActivityType activityType)
The type of this activity task.
|
ActivityTask |
withInput(java.lang.String input)
The inputs provided when the activity task was scheduled.
|
ActivityTask |
withStartedEventId(java.lang.Long startedEventId)
The ID of the
ActivityTaskStarted event recorded in the
history. |
ActivityTask |
withTaskToken(java.lang.String taskToken)
The opaque string used as a handle on the task.
|
ActivityTask |
withWorkflowExecution(WorkflowExecution workflowExecution)
The workflow execution that started this activity task.
|
private java.lang.String taskToken
The opaque string used as a handle on the task. This token is used by workers to communicate progress and response information back to the system about the task.
private java.lang.String activityId
The unique ID of the task.
private java.lang.Long startedEventId
The ID of the ActivityTaskStarted
event recorded in the
history.
private WorkflowExecution workflowExecution
The workflow execution that started this activity task.
private ActivityType activityType
The type of this activity task.
private java.lang.String input
The inputs provided when the activity task was scheduled. The form of the input is user defined and should be meaningful to the activity implementation.
public void setTaskToken(java.lang.String taskToken)
The opaque string used as a handle on the task. This token is used by workers to communicate progress and response information back to the system about the task.
taskToken
- The opaque string used as a handle on the task. This token is used
by workers to communicate progress and response information back
to the system about the task.public java.lang.String getTaskToken()
The opaque string used as a handle on the task. This token is used by workers to communicate progress and response information back to the system about the task.
public ActivityTask withTaskToken(java.lang.String taskToken)
The opaque string used as a handle on the task. This token is used by workers to communicate progress and response information back to the system about the task.
taskToken
- The opaque string used as a handle on the task. This token is used
by workers to communicate progress and response information back
to the system about the task.public void setActivityId(java.lang.String activityId)
The unique ID of the task.
activityId
- The unique ID of the task.public java.lang.String getActivityId()
The unique ID of the task.
public ActivityTask withActivityId(java.lang.String activityId)
The unique ID of the task.
activityId
- The unique ID of the task.public void setStartedEventId(java.lang.Long startedEventId)
The ID of the ActivityTaskStarted
event recorded in the
history.
startedEventId
- The ID of the ActivityTaskStarted
event recorded in
the history.public java.lang.Long getStartedEventId()
The ID of the ActivityTaskStarted
event recorded in the
history.
ActivityTaskStarted
event recorded in
the history.public ActivityTask withStartedEventId(java.lang.Long startedEventId)
The ID of the ActivityTaskStarted
event recorded in the
history.
startedEventId
- The ID of the ActivityTaskStarted
event recorded in
the history.public void setWorkflowExecution(WorkflowExecution workflowExecution)
The workflow execution that started this activity task.
workflowExecution
- The workflow execution that started this activity task.public WorkflowExecution getWorkflowExecution()
The workflow execution that started this activity task.
public ActivityTask withWorkflowExecution(WorkflowExecution workflowExecution)
The workflow execution that started this activity task.
workflowExecution
- The workflow execution that started this activity task.public void setActivityType(ActivityType activityType)
The type of this activity task.
activityType
- The type of this activity task.public ActivityType getActivityType()
The type of this activity task.
public ActivityTask withActivityType(ActivityType activityType)
The type of this activity task.
activityType
- The type of this activity task.public void setInput(java.lang.String input)
The inputs provided when the activity task was scheduled. The form of the input is user defined and should be meaningful to the activity implementation.
input
- The inputs provided when the activity task was scheduled. The form
of the input is user defined and should be meaningful to the
activity implementation.public java.lang.String getInput()
The inputs provided when the activity task was scheduled. The form of the input is user defined and should be meaningful to the activity implementation.
public ActivityTask withInput(java.lang.String input)
The inputs provided when the activity task was scheduled. The form of the input is user defined and should be meaningful to the activity implementation.
input
- The inputs provided when the activity task was scheduled. The form
of the input is user defined and should be meaningful to the
activity implementation.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ActivityTask clone()
clone
in class java.lang.Object