I have a temporal workflow which runs 5 activities. Each activity has different retry options and I want to run some code (which includes terminating workflow, calling a different activity) when activity retries are exhausted.
When an activity retries are exhausted, ActivityFailure exception is thrown to the workflow code. So your code can catch this exception and perform any necessary logic.
lso are there any best practices of terminating a typed workflow ? Can you share some examples.
What are you trying to achieve? Do you want to “kill -9” your workflows without any chance of orderly cleanup? Or you want to workflow to complete upon an external event?