Skip to content


Subversion checkout URL

You can clone with
Download ZIP


SWF Poll API and Tutorial #2063

bmccary opened this Issue · 0 comments

2 participants


boto Folks,

All of the code examples in the SWF tutorial

have the pattern only the latest ActivityTaskCompleted event is considered. This led me to make an incorrect assumption:

The SWF poll operation will only yield at most one new ActivityTaskCompleted event on each call

In fact the following is true:

The SWF poll operation may yield zero or more new ActivityTaskCompleted events and the poll property called previousStartedEventId is used to determine where new events in the queue start

As a result, this incorrect assumption leads to race conditions which are difficult to spot.

I had to discover this by reading printouts the entire poll structure and then comparing it with AWS's documentation of poll structure.

It would be quite useful if the tutorial linked to the AWS SWF API reference. It would also be very useful if the tutorial included an example of explicitly processing multiple new events which occur from a single poll.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.