Exceptions

Botoflow Exceptions

exception botoflow.exceptions.ActivityTaskCanceledError(event_id, activity_type, activity_id, cause, latest_cancel_requested_event_id, scheduled_event_id, started_event_id, _traceback=None)
cause
exception botoflow.exceptions.ActivityTaskError(event_id, activity_type, activity_id)

This is the base class for activity task failure exceptions: ScheduleActivityTaskFailedError, ActivityTaskFailedError, ActivityTaskTimedoutError. It contains the task Id and activity type of the failed task. You can catch this exception in your workflow implementation to deal with activity failures in a generic way.

exception botoflow.exceptions.ActivityTaskFailedError(event_id, activity_type, activity_id, cause, _traceback=None)

Unhandled exceptions in activities are reported back to the workflow implementation by throwing an ActivityTaskFailedError. The original exception can be retrieved from the cause property of this exception. The exception also provides other information that is useful for debugging purposes, such as the unique activity identifier in the history. The framework is able to provide the remote exception by serializing the original exception from the activity worker.

exception botoflow.exceptions.ActivityTaskTimedOutError(event_id, activity_type, activity_id, timeout_type)

This exception is thrown if an activity was timed out by Amazon SWF. This could happen if the activity task could not be assigned to the worker within the require time period or could not be completed by the worker in the required time. You can set these timeouts on the activity using the activity() decorator or using the activity_options() context manager when calling the activity method.

exception botoflow.exceptions.BotoflowError

Base flow exception class

exception botoflow.exceptions.ChildWorkflowError(event_id, workflow_type, workflow_execution)

Base class for exceptions used to report failure of child workflow execution. The exception contains the Ids of the child workflow execution as well as its workflow type. You can catch this exception to deal with child workflow execution failures in a generic way.

exception botoflow.exceptions.ChildWorkflowFailedError(event_id, workflow_type, workflow_execution, cause, _traceback=None)

Unhandled exceptions in child workflows are reported back to the parent workflow implementation by throwing a ChildWorkflowFailedError. The original exception can be retrieved from the cause property of this exception. The exception also provides other information that is useful for debugging purposes, such as the unique identifiers of the child execution.

Exception used to communicate failure of remote activity.

exception botoflow.exceptions.ChildWorkflowTerminatedError(event_id, workflow_type, workflow_execution)

This exception is thrown in parent workflow execution to report the termination of a child workflow execution. You should catch this exception if you want to deal with the termination of the child workflow, for example, to perform cleanup or compensation.

exception botoflow.exceptions.ChildWorkflowTimedOutError(event_id, workflow_type, workflow_execution)

This exception is thrown in parent workflow execution to report that a child workflow execution was timed out and closed by Amazon SWF. You should catch this exception if you want to deal with the forced closure of the child workflow, for example, to perform cleanup or compensation.

exception botoflow.exceptions.DecisionException(event_id, *args)

This is the base class for exceptions that represent failures to enact a decision by Amazon SWF. You can catch this exception to generically deal with such exceptions.

class botoflow.exceptions.DecisionExceptionWithTracebackMixIn
format_exc(limit=None)

This is like exception.print_exc(limit) but returns a string instead of printing to a file.

print_exc(limit=None, file=None)

Print exception information and up to limit stack trace entries to file

exception botoflow.exceptions.ExternalWorkflowError(decision_task_completed_event_id, initiated_event_id, run_id, workflow_id, cause, *args)

This is the base class for exceptions that represent failures to enact a decision on an external workflow by Amazon SWF. You can catch this exception to generically deal with such exceptions.

exception botoflow.exceptions.RequestCancelActivityTaskFailedError(event_id, activity_id, cause, decision_task_completed_event_id)

Request to cancel an activity task failed

exception botoflow.exceptions.RequestCancelExternalWorkflowExecutionFailedError(decision_task_completed_event_id, initiated_event_id, run_id, workflow_id, cause)

Request to cancel an external workflow failed; likely due to invalid workflowID.

exception botoflow.exceptions.ScheduleActivityTaskFailedError

This exception is thrown if Amazon SWF fails to schedule an activity task. This could happen due to various reasons - for example, the activity was deprecated, or an Amazon SWF limit on your account has been reached. The message property in the exception specifies the exact cause of failure to schedule the activity.

exception botoflow.exceptions.StartChildWorkflowExecutionFailedError

This exception is thrown if Amazon SWF fails to start a child workflow execution. This could happen due to various reasons - for example, the type of child workflow specified was deprecated, or a Amazon SWF limit on your account has been reached. The message property in the exception specifies the exact cause of failure to start the child workflow execution.

exception botoflow.exceptions.WorkflowError(event_id, workflow_type, workflow_execution)

Base class for exceptions used to report failure of the originating workflow

exception botoflow.exceptions.WorkflowFailedError(event_id, workflow_type, workflow_execution, cause, _traceback=None)

The workflow execution closed due to a failure.

exception botoflow.exceptions.WorkflowTerminatedError(event_id, workflow_type, workflow_execution)

The workflow execution was terminated.

exception botoflow.exceptions.WorkflowTimedOutError(event_id, workflow_type, workflow_execution)

The workflow execution was closed because a time out was exceeded.

SWF Response Errors/Exceptions

Exceptions from the SWF service

exception botoflow.swf_exceptions.DefaultUndefinedError

Constructs a new DefaultUndefinedException with the specified error message.

exception botoflow.swf_exceptions.DomainAlreadyExistsError

Returned if the specified domain already exists. You will get this fault even if the existing domain is in deprecated status.

exception botoflow.swf_exceptions.DomainDeprecatedError

Returned when the specified domain has been deprecated.

exception botoflow.swf_exceptions.InternalFailureError

Raised when there's an internal SWF failure

exception botoflow.swf_exceptions.LimitExceededError

Returned by any operation if a system imposed limitation has been reached.

To address this fault you should either clean up unused resources or increase the limit by contacting AWS.

exception botoflow.swf_exceptions.OperationNotPermittedError

Returned when the requester does not have the required permissions to perform the requested operation.

exception botoflow.swf_exceptions.SWFResponseError

Base exception for SWF Errors

exception botoflow.swf_exceptions.ThrottlingException
exception botoflow.swf_exceptions.TypeAlreadyExistsError

Returned if the type already exists in the specified domain.

You will get this fault even if the existing type is in deprecated status. You can specify another version if the intent is to create a new distinct version of the type.

exception botoflow.swf_exceptions.TypeDeprecatedError

Returned when the specified activity or workflow type was already deprecated.

exception botoflow.swf_exceptions.UnknownResourceError

Returned when the named resource cannot be found with in the scope of this operation (region or domain).

This could happen if the named resource was never created or is no longer available for this operation.

exception botoflow.swf_exceptions.UnrecognizedClientException

Raised when the client is not authenticated by SWF

exception botoflow.swf_exceptions.ValidationException
exception botoflow.swf_exceptions.WorkflowExecutionAlreadyStartedError

Returned by StartWorkflowExecution when an open execution with the same workflowId is already running in the specified domain.

botoflow.swf_exceptions.swf_exception_wrapper()