1 個回答
- 最新
- 最多得票
- 最多評論
0
Would you clarify your requirements? It looks like that you want to invoke some activity on the first signal and if no new signal is received after the activity is completed just exit the workflow. But if new signals are received while executing the activity then execute them. Correct?
I would just have a queue as a field of the workflow. Then the workflow would read from that queue in a loop (it has to use recursion due to async nature of the code) and exit if it is empty. Then you need another Promise that the workflow function waits on at the beginning until the first signal is received.
In this design you never wait for more than a single Promise at a time.
已回答 5 年前
相關內容
- 已提問 6 個月前
- AWS 官方已更新 2 年前