{"record":{"id":"a9c8fcb4585d0846","repo":"temporalio/temporal","slug":"task-cannot-have-both-a-deadline-and-destination-d","errorCode":null,"errorMessage":"task cannot have both a deadline and destination due to missing outbound timer queue implementation","messagePattern":"task cannot have both a deadline and destination due to missing outbound timer queue implementation","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/history/workflow/task_generator.go","lineNumber":992,"sourceCode":"\t}\n\n\t// Task is invalid at generation time.\n\t// This may happen during replication when multiple event batches are applied in a single transaction.\n\tif err := task.Validate(ref, node); err != nil {\n\t\treturn nil\n\t}\n\n\ttaskInfo := &persistencespb.StateMachineTaskInfo{\n\t\tRef:  ref,\n\t\tType: task.Type(),\n\t\tData: data,\n\t}\n\t// NOTE: at the moment deadline is mutually exclusive with destination.\n\t// This will change when we add the outbound timer queue.\n\tif task.Deadline() != hsm.Immediate {\n\t\tif task.Destination() != \"\" {\n\t\t\t// TODO: support outbound timer tasks.\n\t\t\treturn fmt.Errorf(\"task cannot have both a deadline and destination due to missing outbound timer queue implementation\")\n\t\t}\n\t\tTrackStateMachineTimer(mutableState, task.Deadline(), taskInfo)\n\t} else if task.Destination() != \"\" {\n\t\tmutableState.AddTasks(&tasks.StateMachineOutboundTask{\n\t\t\tStateMachineTask: tasks.StateMachineTask{\n\t\t\t\tWorkflowKey: mutableState.GetWorkflowKey(),\n\t\t\t\tInfo:        taskInfo,\n\t\t\t},\n\t\t\tDestination: task.Destination(),\n\t\t})\n\t} else {\n\t\t// TODO: support \"transfer\" tasks - immediate without destination.\n\t\treturn fmt.Errorf(\"task has no deadline or destination\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":974,"sourceCodeEnd":1010,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/history/workflow/task_generator.go#L974-L1010","documentation":"Error \"task cannot have both a deadline and destination due to missing outbound timer queue implementation\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at service/history/workflow/task_generator.go:992 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}