Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2012, 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
 * or in the "license" file accompanying this file. This file is distributed on
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
Context object passed to an activity implementation.

public abstract class ActivityExecutionContext {


task token that is required to report task completion when is used.
    public abstract String getTaskToken();


workfow execution that requested the activity execution
    public abstract WorkflowExecution getWorkflowExecution();


task that caused activity execution
    public abstract ActivityTask getTask();

Use to notify Simple Workflow that activity execution is alive.

details In case of activity timeout details are returned as a field of the exception thrown.
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonSimpleWorkflow indicating either a problem with the data in the request. Internal service errors are swallowed and not propagated to the caller.
java.util.concurrent.CancellationException Indicates that activity cancellation was requested by the workflow.Should be rethrown from activity implementation to indicate successful cancellation.
    public abstract void recordActivityHeartbeat(String details)
            throws AmazonServiceExceptionAmazonClientExceptionCancellationException;


an instance of the Simple Workflow Java client that is the same used by the invoked activity worker.
    public abstract AmazonSimpleWorkflow getService();
    public String getDomain() {
        // Throwing implementation is provided to not break existing subclasses
        throw new UnsupportedOperationException();
New to GrepCode? Check out our FAQ X