SWF Poll API and Tutorial #2063

bmccary opened this Issue Feb 2, 2014 · 0 comments


None yet
2 participants

bmccary commented Feb 2, 2014

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