Hello,
I have a parent workflow that starts child workflow with RetryPoliicy.MaximumAttempts = 3
If the first attempt of child workflow fails, child workflow is retried, but parent is already failed
How can I not to fail parent workflow, but wait for all three attemps to fail/succeed?
parent wf options:
client.StartWorkflowOptions{
ID: workflowID,
TaskQueue: h.taskQueueName,
WorkflowExecutionTimeout: 6 * time.Hour,
WorkflowRunTimeout: 6 * time.Hour,
WorkflowIDReusePolicy: enumspb.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY,
WorkflowExecutionErrorWhenAlreadyStarted: true,
child wf options:
childWorkflowOptions := workflow.ChildWorkflowOptions{
WorkflowID: workflowID,
WorkflowExecutionTimeout: 6 * time.Hour,
WorkflowRunTimeout: 5 * time.Hour,
WorkflowIDReusePolicy: enumspb.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY,
RetryPolicy: &temporal.RetryPolicy{
InitialInterval: 10 * time.Second,
MaximumAttempts: 3,
NonRetryableErrorTypes: []string{
(&customerrors.NonRetryableError{}).Error(),
},
},
}
ctx = workflow.WithChildOptions(ctx, childWorkflowOptions)
Thanks