Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.simpleworkflow.model
Class TerminateWorkflowExecutionRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.simpleworkflow.model.TerminateWorkflowExecutionRequest
All Implemented Interfaces:
Serializable

public class TerminateWorkflowExecutionRequest
extends AmazonWebServiceRequest
implements Serializable

Container for the parameters to the TerminateWorkflowExecution operation.

Records a WorkflowExecutionTerminated event and forces closure of the workflow execution identified by the given domain, runId, and workflowId. The child policy, registered with the workflow type or specified when starting this execution, is applied to any open child workflow executions of this workflow execution.

IMPORTANT: If the identified workflow execution was in progress, it is terminated immediately.

NOTE: If a runId is not specified, then the WorkflowExecutionTerminated event is recorded in the history of the current open workflow with the matching workflowId in the domain.

NOTE: You should consider using RequestCancelWorkflowExecution action instead because it allows the workflow to gracefully close while TerminateWorkflowExecution does not.

Access Control

You can use IAM policies to control this action's access to Amazon SWF resources as follows:

If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails by throwing OperationNotPermitted . For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .

See Also:
AmazonSimpleWorkflow.terminateWorkflowExecution(TerminateWorkflowExecutionRequest), Serialized Form

Constructor Summary
TerminateWorkflowExecutionRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 String getChildPolicy()
          If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated.
 String getDetails()
          Optional details for terminating the workflow execution.
 String getDomain()
          The domain of the workflow execution to terminate.
 String getReason()
          An optional descriptive reason for terminating the workflow execution.
 String getRunId()
          The runId of the workflow execution to terminate.
 String getWorkflowId()
          The workflowId of the workflow execution to terminate.
 int hashCode()
           
 void setChildPolicy(ChildPolicy childPolicy)
          If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated.
 void setChildPolicy(String childPolicy)
          If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated.
 void setDetails(String details)
          Optional details for terminating the workflow execution.
 void setDomain(String domain)
          The domain of the workflow execution to terminate.
 void setReason(String reason)
          An optional descriptive reason for terminating the workflow execution.
 void setRunId(String runId)
          The runId of the workflow execution to terminate.
 void setWorkflowId(String workflowId)
          The workflowId of the workflow execution to terminate.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 TerminateWorkflowExecutionRequest withChildPolicy(ChildPolicy childPolicy)
          If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated.
 TerminateWorkflowExecutionRequest withChildPolicy(String childPolicy)
          If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated.
 TerminateWorkflowExecutionRequest withDetails(String details)
          Optional details for terminating the workflow execution.
 TerminateWorkflowExecutionRequest withDomain(String domain)
          The domain of the workflow execution to terminate.
 TerminateWorkflowExecutionRequest withReason(String reason)
          An optional descriptive reason for terminating the workflow execution.
 TerminateWorkflowExecutionRequest withRunId(String runId)
          The runId of the workflow execution to terminate.
 TerminateWorkflowExecutionRequest withWorkflowId(String workflowId)
          The workflowId of the workflow execution to terminate.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TerminateWorkflowExecutionRequest

public TerminateWorkflowExecutionRequest()
Method Detail

getDomain

public String getDomain()
The domain of the workflow execution to terminate.

Constraints:
Length: 1 - 256

Returns:
The domain of the workflow execution to terminate.

setDomain

public void setDomain(String domain)
The domain of the workflow execution to terminate.

Constraints:
Length: 1 - 256

Parameters:
domain - The domain of the workflow execution to terminate.

withDomain

public TerminateWorkflowExecutionRequest withDomain(String domain)
The domain of the workflow execution to terminate.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 256

Parameters:
domain - The domain of the workflow execution to terminate.
Returns:
A reference to this updated object so that method calls can be chained together.

getWorkflowId

public String getWorkflowId()
The workflowId of the workflow execution to terminate.

Constraints:
Length: 1 - 256

Returns:
The workflowId of the workflow execution to terminate.

setWorkflowId

public void setWorkflowId(String workflowId)
The workflowId of the workflow execution to terminate.

Constraints:
Length: 1 - 256

Parameters:
workflowId - The workflowId of the workflow execution to terminate.

withWorkflowId

public TerminateWorkflowExecutionRequest withWorkflowId(String workflowId)
The workflowId of the workflow execution to terminate.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 256

Parameters:
workflowId - The workflowId of the workflow execution to terminate.
Returns:
A reference to this updated object so that method calls can be chained together.

getRunId

public String getRunId()
The runId of the workflow execution to terminate.

Constraints:
Length: 0 - 64

Returns:
The runId of the workflow execution to terminate.

setRunId

public void setRunId(String runId)
The runId of the workflow execution to terminate.

Constraints:
Length: 0 - 64

Parameters:
runId - The runId of the workflow execution to terminate.

withRunId

public TerminateWorkflowExecutionRequest withRunId(String runId)
The runId of the workflow execution to terminate.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 64

Parameters:
runId - The runId of the workflow execution to terminate.
Returns:
A reference to this updated object so that method calls can be chained together.

getReason

public String getReason()
An optional descriptive reason for terminating the workflow execution.

Constraints:
Length: 0 - 256

Returns:
An optional descriptive reason for terminating the workflow execution.

setReason

public void setReason(String reason)
An optional descriptive reason for terminating the workflow execution.

Constraints:
Length: 0 - 256

Parameters:
reason - An optional descriptive reason for terminating the workflow execution.

withReason

public TerminateWorkflowExecutionRequest withReason(String reason)
An optional descriptive reason for terminating the workflow execution.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 256

Parameters:
reason - An optional descriptive reason for terminating the workflow execution.
Returns:
A reference to this updated object so that method calls can be chained together.

getDetails

public String getDetails()
Optional details for terminating the workflow execution.

Constraints:
Length: 0 - 32768

Returns:
Optional details for terminating the workflow execution.

setDetails

public void setDetails(String details)
Optional details for terminating the workflow execution.

Constraints:
Length: 0 - 32768

Parameters:
details - Optional details for terminating the workflow execution.

withDetails

public TerminateWorkflowExecutionRequest withDetails(String details)
Optional details for terminating the workflow execution.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 32768

Parameters:
details - Optional details for terminating the workflow execution.
Returns:
A reference to this updated object so that method calls can be chained together.

getChildPolicy

public String getChildPolicy()
If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are: A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.

Constraints:
Allowed Values: TERMINATE, REQUEST_CANCEL, ABANDON

Returns:
If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are:
  • TERMINATE: the child executions will be terminated.
  • REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
  • ABANDON: no action will be taken. The child executions will continue to run.
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.
See Also:
ChildPolicy

setChildPolicy

public void setChildPolicy(String childPolicy)
If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are: A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.

Constraints:
Allowed Values: TERMINATE, REQUEST_CANCEL, ABANDON

Parameters:
childPolicy - If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are:
  • TERMINATE: the child executions will be terminated.
  • REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
  • ABANDON: no action will be taken. The child executions will continue to run.
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.
See Also:
ChildPolicy

withChildPolicy

public TerminateWorkflowExecutionRequest withChildPolicy(String childPolicy)
If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are: A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: TERMINATE, REQUEST_CANCEL, ABANDON

Parameters:
childPolicy - If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are:
  • TERMINATE: the child executions will be terminated.
  • REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
  • ABANDON: no action will be taken. The child executions will continue to run.
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
ChildPolicy

setChildPolicy

public void setChildPolicy(ChildPolicy childPolicy)
If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are: A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.

Constraints:
Allowed Values: TERMINATE, REQUEST_CANCEL, ABANDON

Parameters:
childPolicy - If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are:
  • TERMINATE: the child executions will be terminated.
  • REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
  • ABANDON: no action will be taken. The child executions will continue to run.
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.
See Also:
ChildPolicy

withChildPolicy

public TerminateWorkflowExecutionRequest withChildPolicy(ChildPolicy childPolicy)
If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are: A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: TERMINATE, REQUEST_CANCEL, ABANDON

Parameters:
childPolicy - If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are:
  • TERMINATE: the child executions will be terminated.
  • REQUEST_CANCEL: a request to cancel will be attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
  • ABANDON: no action will be taken. The child executions will continue to run.
A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time, a fault will be returned.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
ChildPolicy

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.