Class DecisionTask
- All Implemented Interfaces:
Serializable
,Cloneable
A structure that represents a decision task. Decision tasks are sent to deciders in order for them to make decisions.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
A paginated list of history events of the workflow execution.If aNextPageToken
was returned by a previous call, there are more results available.The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider.The ID of theDecisionTaskStarted
event recorded in the history.The opaque string used as a handle on the task.The workflow execution for which this decision task was created.The type of the workflow execution for which this decision task was created.int
hashCode()
void
setEvents
(Collection<HistoryEvent> events) A paginated list of history events of the workflow execution.void
setNextPageToken
(String nextPageToken) If aNextPageToken
was returned by a previous call, there are more results available.void
setPreviousStartedEventId
(Long previousStartedEventId) The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider.void
setStartedEventId
(Long startedEventId) The ID of theDecisionTaskStarted
event recorded in the history.void
setTaskToken
(String taskToken) The opaque string used as a handle on the task.void
setWorkflowExecution
(WorkflowExecution workflowExecution) The workflow execution for which this decision task was created.void
setWorkflowType
(WorkflowType workflowType) The type of the workflow execution for which this decision task was created.toString()
Returns a string representation of this object; useful for testing and debugging.withEvents
(HistoryEvent... events) A paginated list of history events of the workflow execution.withEvents
(Collection<HistoryEvent> events) A paginated list of history events of the workflow execution.withNextPageToken
(String nextPageToken) If aNextPageToken
was returned by a previous call, there are more results available.withPreviousStartedEventId
(Long previousStartedEventId) The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider.withStartedEventId
(Long startedEventId) The ID of theDecisionTaskStarted
event recorded in the history.withTaskToken
(String taskToken) The opaque string used as a handle on the task.withWorkflowExecution
(WorkflowExecution workflowExecution) The workflow execution for which this decision task was created.withWorkflowType
(WorkflowType workflowType) The type of the workflow execution for which this decision task was created.
-
Constructor Details
-
DecisionTask
public DecisionTask()
-
-
Method Details
-
setTaskToken
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withTaskToken
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStartedEventId
The ID of the
DecisionTaskStarted
event recorded in the history.- Parameters:
startedEventId
- The ID of theDecisionTaskStarted
event recorded in the history.
-
getStartedEventId
The ID of the
DecisionTaskStarted
event recorded in the history.- Returns:
- The ID of the
DecisionTaskStarted
event recorded in the history.
-
withStartedEventId
The ID of the
DecisionTaskStarted
event recorded in the history.- Parameters:
startedEventId
- The ID of theDecisionTaskStarted
event recorded in the history.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setWorkflowExecution
The workflow execution for which this decision task was created.
- Parameters:
workflowExecution
- The workflow execution for which this decision task was created.
-
getWorkflowExecution
The workflow execution for which this decision task was created.
- Returns:
- The workflow execution for which this decision task was created.
-
withWorkflowExecution
The workflow execution for which this decision task was created.
- Parameters:
workflowExecution
- The workflow execution for which this decision task was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setWorkflowType
The type of the workflow execution for which this decision task was created.
- Parameters:
workflowType
- The type of the workflow execution for which this decision task was created.
-
getWorkflowType
The type of the workflow execution for which this decision task was created.
- Returns:
- The type of the workflow execution for which this decision task was created.
-
withWorkflowType
The type of the workflow execution for which this decision task was created.
- Parameters:
workflowType
- The type of the workflow execution for which this decision task was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getEvents
A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.
- Returns:
- A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.
-
setEvents
A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.
- Parameters:
events
- A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.
-
withEvents
A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.
NOTE: This method appends the values to the existing list (if any). Use
setEvents(java.util.Collection)
orwithEvents(java.util.Collection)
if you want to override the existing values.- Parameters:
events
- A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withEvents
A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.
- Parameters:
events
- A paginated list of history events of the workflow execution. The decider uses this during the processing of the decision task.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setNextPageToken
If a
NextPageToken
was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token innextPageToken
. Keep all other arguments unchanged.The configured
maximumPageSize
determines how many results can be returned in a single call.- Parameters:
nextPageToken
- If aNextPageToken
was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token innextPageToken
. Keep all other arguments unchanged.The configured
maximumPageSize
determines how many results can be returned in a single call.
-
getNextPageToken
If a
NextPageToken
was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token innextPageToken
. Keep all other arguments unchanged.The configured
maximumPageSize
determines how many results can be returned in a single call.- Returns:
- If a
NextPageToken
was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token innextPageToken
. Keep all other arguments unchanged.The configured
maximumPageSize
determines how many results can be returned in a single call.
-
withNextPageToken
If a
NextPageToken
was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token innextPageToken
. Keep all other arguments unchanged.The configured
maximumPageSize
determines how many results can be returned in a single call.- Parameters:
nextPageToken
- If aNextPageToken
was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token innextPageToken
. Keep all other arguments unchanged.The configured
maximumPageSize
determines how many results can be returned in a single call.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPreviousStartedEventId
The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider. This can be used to determine the events in the history new since the last decision task received by the decider.
- Parameters:
previousStartedEventId
- The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider. This can be used to determine the events in the history new since the last decision task received by the decider.
-
getPreviousStartedEventId
The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider. This can be used to determine the events in the history new since the last decision task received by the decider.
- Returns:
- The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider. This can be used to determine the events in the history new since the last decision task received by the decider.
-
withPreviousStartedEventId
The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider. This can be used to determine the events in the history new since the last decision task received by the decider.
- Parameters:
previousStartedEventId
- The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider. This can be used to determine the events in the history new since the last decision task received by the decider.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-