Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.simpleworkflow.model;
 
 
Container for the parameters to the RespondDecisionTaskCompleted operation.

Used by deciders to tell the service that the DecisionTask identified by the taskToken has successfully completed. The decisions argument specifies the list of decisions made while processing the task.

A DecisionTaskCompleted event is added to the workflow history. The executionContext specified is attached to the event in the workflow execution history.

Access Control

If an IAM policy grants permission to use RespondDecisionTaskCompleted , it can express permissions for the list of decisions in the decisions parameter. Each of the decisions has one or more parameters, much like a regular API call. To allow for policies to be as readable as possible, you can express permissions on decisions as if they were actual API calls, including applying conditions to some parameters. For more information, see Using IAM to Manage Access to Amazon SWF Workflows .

 
 public class RespondDecisionTaskCompletedRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The taskToken from the DecisionTask. <important>taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.</important>

Constraints:
Length: 1 - 1024

 
     private String taskToken;

    
The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.
 
User defined context to add to workflow execution.

Constraints:
Length: 0 - 32768

 
     private String executionContext;

    
The taskToken from the DecisionTask. <important>taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.</important>

Constraints:
Length: 1 - 1024

Returns:
The taskToken from the DecisionTask. <important>taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.</important>
 
     public String getTaskToken() {
         return ;
     }
    
    
The taskToken from the DecisionTask. <important>taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.</important>

Constraints:
Length: 1 - 1024

Parameters:
taskToken The taskToken from the DecisionTask. <important>taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.</important>
    public void setTaskToken(String taskToken) {
        this. = taskToken;
    }
    
    
The taskToken from the DecisionTask. <important>taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.</important>

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

Constraints:
Length: 1 - 1024

Parameters:
taskToken The taskToken from the DecisionTask. <important>taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.</important>
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = taskToken;
        return this;
    }

    
The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.

Returns:
The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.
    public java.util.List<DecisiongetDecisions() {
        return ;
    }
    
    
The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.

Parameters:
decisions The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.
    public void setDecisions(java.util.Collection<Decisiondecisions) {
        if (decisions == null) {
            this. = null;
            return;
        }
        decisionsCopy.addAll(decisions);
        this. = decisionsCopy;
    }
    
    
The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.

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

Parameters:
decisions The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getDecisions() == nullsetDecisions(new java.util.ArrayList<Decision>(decisions.length));
        for (Decision value : decisions) {
            getDecisions().add(value);
        }
        return this;
    }
    
    
The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.

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

Parameters:
decisions The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (decisions == null) {
            this. = null;
        } else {
            decisionsCopy.addAll(decisions);
            this. = decisionsCopy;
        }
        return this;
    }

    
User defined context to add to workflow execution.

Constraints:
Length: 0 - 32768

Returns:
User defined context to add to workflow execution.
    public String getExecutionContext() {
        return ;
    }
    
    
User defined context to add to workflow execution.

Constraints:
Length: 0 - 32768

Parameters:
executionContext User defined context to add to workflow execution.
    public void setExecutionContext(String executionContext) {
        this. = executionContext;
    }
    
    
User defined context to add to workflow execution.

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

Constraints:
Length: 0 - 32768

Parameters:
executionContext User defined context to add to workflow execution.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = executionContext;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getTaskToken() != nullsb.append("TaskToken: " + getTaskToken() + ",");
        if (getDecisions() != nullsb.append("Decisions: " + getDecisions() + ",");
        if (getExecutionContext() != nullsb.append("ExecutionContext: " + getExecutionContext() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getTaskToken() == null) ? 0 : getTaskToken().hashCode()); 
        hashCode = prime * hashCode + ((getDecisions() == null) ? 0 : getDecisions().hashCode()); 
        hashCode = prime * hashCode + ((getExecutionContext() == null) ? 0 : getExecutionContext().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof RespondDecisionTaskCompletedRequest == falsereturn false;
        
        if (other.getTaskToken() == null ^ this.getTaskToken() == nullreturn false;
        if (other.getTaskToken() != null && other.getTaskToken().equals(this.getTaskToken()) == falsereturn false
        if (other.getDecisions() == null ^ this.getDecisions() == nullreturn false;
        if (other.getDecisions() != null && other.getDecisions().equals(this.getDecisions()) == falsereturn false
        if (other.getExecutionContext() == null ^ this.getExecutionContext() == nullreturn false;
        if (other.getExecutionContext() != null && other.getExecutionContext().equals(this.getExecutionContext()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (RespondDecisionTaskCompletedRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X