Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.simpleworkflow.flow
Class ActivityExecutionContext

java.lang.Object
  extended by com.amazonaws.services.simpleworkflow.flow.ActivityExecutionContext

public abstract class ActivityExecutionContext
extends Object

Context object passed to an activity implementation.

See Also:
ActivityImplementation

Constructor Summary
ActivityExecutionContext()
           
 
Method Summary
 String getDomain()
           
abstract  AmazonSimpleWorkflow getService()
           
abstract  ActivityTask getTask()
           
abstract  String getTaskToken()
           
abstract  WorkflowExecution getWorkflowExecution()
           
abstract  void recordActivityHeartbeat(String details)
          Use to notify Simple Workflow that activity execution is alive.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityExecutionContext

public ActivityExecutionContext()
Method Detail

getTaskToken

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

getWorkflowExecution

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

getTask

public abstract ActivityTask getTask()
Returns:
task that caused activity execution

recordActivityHeartbeat

public abstract void recordActivityHeartbeat(String details)
                                      throws AmazonServiceException,
                                             AmazonClientException,
                                             CancellationException
Use to notify Simple Workflow that activity execution is alive.

Parameters:
details - In case of activity timeout details are returned as a field of the exception thrown.
Throws:
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.
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.
CancellationException - Indicates that activity cancellation was requested by the workflow.Should be rethrown from activity implementation to indicate successful cancellation.

getService

public abstract AmazonSimpleWorkflow getService()
Returns:
an instance of the Simple Workflow Java client that is the same used by the invoked activity worker.

getDomain

public String getDomain()


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