We want to be able to set WaitForCancellation to true using workflow.WithChildOptions when starting a Child workflow and then within the child workflow configure the HeartbeatTimeout using workflow.WithActivityOptions.
The behavior we see is that this combination of calls does not allow setting the HeartbeatTimeout and instead the value is always 0 in the child activities. If we don’t try to set WaitForCancellation with a call to workflow.WithChildOptions when starting the child workflow then the HeartbeatTimeout gets set as expected.
I don’t see how parent workflow child workflow options can affect heartbeat configuration of the child one. Could you provide the reproduction (or at least a code snippet) to explain what you are doing in more detail?
Got it sorted. Seems both parent and child workflows need WorkflowExecutionTimeout set in StartWorkflowOptions and ChildWorkflowOptions when starting or the heartbeatTimeout will be 0 for activities regardless of value set in workflow.ActivityOptions.
WorkflowExecutionTimeout is listed as optional but seems like it does have unexpected side effect for us.