857
// start_to_close <= schedule_to_close and heartbeat <= start_to_close are preserved.
858
// This mirrors adjustActivityOptions for workflow-embedded activities.
859
>
if err := validateAndNormalizeTimeouts(req.GetActivityId(), a.GetActivityType().GetName(), durationpb.New(0), ao); err != nil {
activity.go
860
return err
861
}
862
863
// Write the merged and normalized options back to the Activity state fields.
865
>
a.ScheduleToCloseTimeout = ao.ScheduleToCloseTimeout
866
>
a.ScheduleToStartTimeout = ao.ScheduleToStartTimeout
867
>
a.StartToCloseTimeout = ao.StartToCloseTimeout
868
>
a.HeartbeatTimeout = ao.HeartbeatTimeout
869
>
a.Priority = ao.Priority
870
>
a.RetryPolicy = ao.RetryPolicy
871
>
a.StartDelay = ao.StartDelay
872
>
873
>
return nil
874
}
875