-
I'm following a sample of the monitoring pattern here: A while loop is used to for the polling activity (line 20), but there is also a comment about using continueAsNew instead (line 18). How is it possible to implement the eternal pattern in this case? To my understanding, with continueAsNew, on each execution, the activity functions will run again and not replay, meaning a new monitoring instance each time.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The way to accomplish this is to have some flag in your orchestration input that tells you whether you've executed the first activity (the start job). In the initial invocation of your orchestration, this flag should be set to false, ensuring that the first activity runs. As part of the first |
Beta Was this translation helpful? Give feedback.
The way to accomplish this is to have some flag in your orchestration input that tells you whether you've executed the first activity (the start job). In the initial invocation of your orchestration, this flag should be set to false, ensuring that the first activity runs. As part of the first
continueAsNew
call, you'd set this flag to true so that all future invocations don't call this first activity again.