Yes, it is possible to filter by workflowId as described in How do you get the state of a WorkflowExecution if all you have is a workflowId in Amazon SWF.
The answer is on line [7] and [9] in the example, the executions()
method call. For your use case though, since all you want are closed executions, you'll just alter the method call to include closed=True
. So, in order to get all closed executions in the 24hours (the default):
In [7]: domain.executions(closed=True)
And for closed executions filtered by workflow id:
In [9]: domain.executions(workflow_id='my_wf_id', closed=True)
If you're not using boto.swf
but an alternative library instead, refer to the API docs for what are the necessary parameters to pass to the ListClosedWorkflowExecutions API.