Fix domain name showed as domainID
@@ -1215,9 +1215,14 @@ func (t *transferQueueActiveProcessorImpl) requestCancelCompleted(
return &workflow.EntityNotExistsError{Message: "Pending request cancellation not found."}
}
- _, err := msBuilder.AddExternalWorkflowExecutionCancelRequested(
+ domainEntry, err := t.shard.GetDomainCache().GetDomainByID(request.GetDomainUUID())
+ if err != nil {
+ return &workflow.EntityNotExistsError{Message: "Request Domain not found."}
+ }
+
+ _, err = msBuilder.AddExternalWorkflowExecutionCancelRequested(
initiatedEventID,
- request.GetDomainUUID(),
+ domainEntry.GetInfo().Name,
request.CancelRequest.WorkflowExecution.GetWorkflowId(),
request.CancelRequest.WorkflowExecution.GetRunId(),
)
@@ -1244,9 +1249,14 @@ func (t *transferQueueActiveProcessorImpl) requestSignalCompleted(
return &workflow.EntityNotExistsError{Message: "Pending signal request not found."}
}
- _, err := msBuilder.AddExternalWorkflowExecutionSignaled(
+ domainEntry, err := t.shard.GetDomainCache().GetDomainByID(request.GetDomainUUID())
+ if err != nil {
+ return &workflow.EntityNotExistsError{Message: "Request Domain not found."}
+ }
+
+ _, err = msBuilder.AddExternalWorkflowExecutionSignaled(
initiatedEventID,
- request.GetDomainUUID(),
+ domainEntry.GetInfo().Name,
request.SignalRequest.WorkflowExecution.GetWorkflowId(),
request.SignalRequest.WorkflowExecution.GetRunId(),
request.SignalRequest.Control)
@@ -1273,10 +1283,15 @@ func (t *transferQueueActiveProcessorImpl) requestCancelFailed(
return &workflow.EntityNotExistsError{Message: "Pending request cancellation not found."}
}
- _, err := msBuilder.AddRequestCancelExternalWorkflowExecutionFailedEvent(
+ domainEntry, err := t.shard.GetDomainCache().GetDomainByID(request.GetDomainUUID())
+ if err != nil {
+ return &workflow.EntityNotExistsError{Message: "Request Domain not found."}
+ }
+
+ _, err = msBuilder.AddRequestCancelExternalWorkflowExecutionFailedEvent(
common.EmptyEventID,
initiatedEventID,
- request.GetDomainUUID(),
+ domainEntry.GetInfo().Name,
request.CancelRequest.WorkflowExecution.GetWorkflowId(),
request.CancelRequest.WorkflowExecution.GetRunId(),
workflow.CancelExternalWorkflowExecutionFailedCauseUnknownExternalWorkflowExecution)
@@ -1303,10 +1318,15 @@ func (t *transferQueueActiveProcessorImpl) requestSignalFailed(
return &workflow.EntityNotExistsError{Message: "Pending signal request not found."}
}
- _, err := msBuilder.AddSignalExternalWorkflowExecutionFailedEvent(
+ domainEntry, err := t.shard.GetDomainCache().GetDomainByID(request.GetDomainUUID())
+ if err != nil {
+ return &workflow.EntityNotExistsError{Message: "Request Domain not found."}
+ }
+
+ _, err = msBuilder.AddSignalExternalWorkflowExecutionFailedEvent(
common.EmptyEventID,
initiatedEventID,
- request.GetDomainUUID(),
+ domainEntry.GetInfo().Name,
request.SignalRequest.WorkflowExecution.GetWorkflowId(),
request.SignalRequest.WorkflowExecution.GetRunId(),
request.SignalRequest.Control,
