jonsve
November 25, 2024, 10:15pm
1
imagine code like this, if the workflow
ApplyNetworkServicesWorkflow reaches its maximum attempts, will the != err code run then ?
If not how can I react to workflows having ran out of attempts ?
it might be counterintuitive that in the != err clause it runs NewContinueAsNewError but just ignore that part
Ty in advance
Hey Jonsve, you would want to look at the retryState
as part of the ChildWorkflowExecutionError
. Unfortunately that field is not exposed right now. I opened an issue to expose it Add accessors for ChildWorkflowExecutionError fields · Issue #1725 · temporalio/sdk-go · GitHub and it should be exposed in the next SDK release.
jonsve
November 26, 2024, 7:20am
4
I saw it was merged to master nice, but how would I look at the childworflow execution error in the first place ?, do I cast the error ?
Something like this ?
askreet
November 26, 2024, 11:54pm
5
I forget where I saw the advice, and can’t find it now, but at some point I read that workflow retries should be avoided in favor of retry logic within activity executions, which would simplify the child workflow options here and keep the actual retry semantics a bit closer to the bits that will fail.
Yes, see the docs on ExecuteChildWorkflow
1 Like