Class DecisionTask
- java.lang.Object
-
- com.amazonaws.services.simpleworkflow.model.DecisionTask
-
- All Implemented Interfaces:
Serializable,Cloneable
public class DecisionTask extends Object implements Serializable, Cloneable
A structure that represents a decision task. Decision tasks are sent to deciders in order for them to make decisions.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DecisionTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecisionTaskclone()booleanequals(Object obj)List<HistoryEvent>getEvents()A paginated list of history events of the workflow execution.StringgetNextPageToken()If aNextPageTokenwas returned by a previous call, there are more results available.LonggetPreviousStartedEventId()The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider.LonggetStartedEventId()The ID of theDecisionTaskStartedevent recorded in the history.StringgetTaskToken()The opaque string used as a handle on the task.WorkflowExecutiongetWorkflowExecution()The workflow execution for which this decision task was created.WorkflowTypegetWorkflowType()The type of the workflow execution for which this decision task was created.inthashCode()voidsetEvents(Collection<HistoryEvent> events)A paginated list of history events of the workflow execution.voidsetNextPageToken(String nextPageToken)If aNextPageTokenwas returned by a previous call, there are more results available.voidsetPreviousStartedEventId(Long previousStartedEventId)The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider.voidsetStartedEventId(Long startedEventId)The ID of theDecisionTaskStartedevent recorded in the history.voidsetTaskToken(String taskToken)The opaque string used as a handle on the task.voidsetWorkflowExecution(WorkflowExecution workflowExecution)The workflow execution for which this decision task was created.voidsetWorkflowType(WorkflowType workflowType)The type of the workflow execution for which this decision task was created.StringtoString()Returns a string representation of this object; useful for testing and debugging.DecisionTaskwithEvents(HistoryEvent... events)A paginated list of history events of the workflow execution.DecisionTaskwithEvents(Collection<HistoryEvent> events)A paginated list of history events of the workflow execution.DecisionTaskwithNextPageToken(String nextPageToken)If aNextPageTokenwas returned by a previous call, there are more results available.DecisionTaskwithPreviousStartedEventId(Long previousStartedEventId)The ID of the DecisionTaskStarted event of the previous decision task of this workflow execution that was processed by the decider.DecisionTaskwithStartedEventId(Long startedEventId)The ID of theDecisionTaskStartedevent recorded in the history.DecisionTaskwithTaskToken(String taskToken)The opaque string used as a handle on the task.DecisionTaskwithWorkflowExecution(WorkflowExecution workflowExecution)The workflow execution for which this decision task was created.DecisionTaskwithWorkflowType(WorkflowType workflowType)The type of the workflow execution for which this decision task was created.
-
-
-
Method Detail
-
setTaskToken
public void setTaskToken(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.
- 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
public 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.
- 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
public DecisionTask withTaskToken(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.
- 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
public void setStartedEventId(Long startedEventId)
The ID of the
DecisionTaskStartedevent recorded in the history.- Parameters:
startedEventId- The ID of theDecisionTaskStartedevent recorded in the history.
-
getStartedEventId
public Long getStartedEventId()
The ID of the
DecisionTaskStartedevent recorded in the history.- Returns:
- The ID of the
DecisionTaskStartedevent recorded in the history.
-
withStartedEventId
public DecisionTask withStartedEventId(Long startedEventId)
The ID of the
DecisionTaskStartedevent recorded in the history.- Parameters:
startedEventId- The ID of theDecisionTaskStartedevent recorded in the history.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setWorkflowExecution
public void setWorkflowExecution(WorkflowExecution workflowExecution)
The workflow execution for which this decision task was created.
- Parameters:
workflowExecution- The workflow execution for which this decision task was created.
-
getWorkflowExecution
public WorkflowExecution getWorkflowExecution()
The workflow execution for which this decision task was created.
- Returns:
- The workflow execution for which this decision task was created.
-
withWorkflowExecution
public DecisionTask withWorkflowExecution(WorkflowExecution workflowExecution)
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
public void setWorkflowType(WorkflowType workflowType)
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
public WorkflowType 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
public DecisionTask withWorkflowType(WorkflowType workflowType)
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
public List<HistoryEvent> 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
public void setEvents(Collection<HistoryEvent> events)
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
public DecisionTask withEvents(HistoryEvent... events)
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
public DecisionTask withEvents(Collection<HistoryEvent> events)
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
public void setNextPageToken(String nextPageToken)
If a
NextPageTokenwas 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
maximumPageSizedetermines how many results can be returned in a single call.- Parameters:
nextPageToken- If aNextPageTokenwas 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
maximumPageSizedetermines how many results can be returned in a single call.
-
getNextPageToken
public String getNextPageToken()
If a
NextPageTokenwas 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
maximumPageSizedetermines how many results can be returned in a single call.- Returns:
- If a
NextPageTokenwas 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
maximumPageSizedetermines how many results can be returned in a single call.
-
withNextPageToken
public DecisionTask withNextPageToken(String nextPageToken)
If a
NextPageTokenwas 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
maximumPageSizedetermines how many results can be returned in a single call.- Parameters:
nextPageToken- If aNextPageTokenwas 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
maximumPageSizedetermines 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
public 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. 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
public Long 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
public DecisionTask withPreviousStartedEventId(Long 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.
- 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
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public DecisionTask clone()
-
-