0

Currently, to get the tasks using poller from Step Function Activity, I am using following: https://docs.aws.amazon.com/step-functions/latest/apireference/API_GetActivityTask.html

But it gives the task one by one. Is there any way, I could take the tasks in batch?

hatellla
  • 4,796
  • 8
  • 49
  • 101

1 Answers1

0

No, because each State Machine (SM) activity task will require response from worker so its like a two way communication. Each SM activity task will provide its own taskToken to an activity Worker and the Worker must include the taskToken in subsequent calls to SendTaskHeartbeat, SendTaskSuccess or SendTaskFailure in order to report the progress or completion of the task for each SM. Activity state should include TimeoutSeconds as suggested in the best practices.

A.Khan
  • 3,826
  • 21
  • 25
  • I didn't get the reasoning very clearly. I get it this is 2 way communication. But each result is uniquely identified by a task token I think. Isn't the task token unique for each task we get from Activity? If yes, can't we have an api which can give list of GetActivityResult? Your thoughts? – hatellla Jan 14 '19 at 18:13
  • Sorry but I can't seem to get my head around what exactly would you expect from GetActivityResult? If `GetActivityResult ` API would exist, would you expect to provide it a list of taskToken and expecting result received by the task? – A.Khan Jan 14 '19 at 19:28