def _each_item next_token, limit, options = {}, &block
open_or_closed, client_opts = handle_options(options)
client_method = "list_#{open_or_closed}_workflow_executions""list_#{open_or_closed}_workflow_executions"
client_opts[:maximum_page_size] = limit if limit
client_opts[:next_page_token] = next_token if next_token
client_opts[:reverse_order] = @reverse_order unless
client_opts.key?(:reverse_order)
response = client.send(client_method, client_opts)
response.data['executionInfos'].each do |desc|
workflow_id = desc['execution']['workflowId']
run_id = desc['execution']['runId']
workflow_execution = WorkflowExecution.new_from(
client_method, desc, domain, workflow_id, run_id)
yield(workflow_execution)
end
response.data['nextPageToken']
end