@@ -81,7 +81,7 @@ func (h *frontendHandler) StartNexusOperationExecution(
8181 return nil , err
8282 }
8383
84- if err := validateAndNormalizeStartRequest (req , h .config , h .saMapperProvider , h .saValidator ); err != nil {
84+ if err := validateAndNormalizeStartRequest (req , h .config , h .logger , h . saMapperProvider , h .saValidator ); err != nil {
8585 return nil , err
8686 }
8787
@@ -110,7 +110,7 @@ func (h *frontendHandler) DescribeNexusOperationExecution(
110110 return nil , err
111111 }
112112
113- if err := validateDescribeNexusOperationExecutionRequest (req , h .config ); err != nil {
113+ if err := validateAndNormalizeDescribeRequest (req , h .config ); err != nil {
114114 return nil , err
115115 }
116116
@@ -221,23 +221,59 @@ func (h *frontendHandler) CountNexusOperationExecutions(
221221}
222222
223223func (h * frontendHandler ) RequestCancelNexusOperationExecution (
224- _ context.Context ,
224+ ctx context.Context ,
225225 req * workflowservice.RequestCancelNexusOperationExecutionRequest ,
226226) (* workflowservice.RequestCancelNexusOperationExecutionResponse , error ) {
227227 if ! h .isStandaloneNexusOperationEnabled (req .GetNamespace ()) {
228228 return nil , ErrStandaloneNexusOperationDisabled
229229 }
230- return nil , serviceerror .NewUnimplemented ("RequestCancelNexusOperationExecution not implemented" )
230+
231+ namespaceID , err := h .namespaceRegistry .GetNamespaceID (namespace .Name (req .GetNamespace ()))
232+ if err != nil {
233+ return nil , err
234+ }
235+
236+ if err := validateAndNormalizeCancelRequest (req , h .config ); err != nil {
237+ return nil , err
238+ }
239+
240+ _ , err = h .client .RequestCancelNexusOperation (ctx , & nexusoperationpb.RequestCancelNexusOperationRequest {
241+ NamespaceId : namespaceID .String (),
242+ FrontendRequest : req ,
243+ })
244+ if err != nil {
245+ return nil , err
246+ }
247+
248+ return & workflowservice.RequestCancelNexusOperationExecutionResponse {}, nil
231249}
232250
233251func (h * frontendHandler ) TerminateNexusOperationExecution (
234- _ context.Context ,
252+ ctx context.Context ,
235253 req * workflowservice.TerminateNexusOperationExecutionRequest ,
236254) (* workflowservice.TerminateNexusOperationExecutionResponse , error ) {
237255 if ! h .isStandaloneNexusOperationEnabled (req .GetNamespace ()) {
238256 return nil , ErrStandaloneNexusOperationDisabled
239257 }
240- return nil , serviceerror .NewUnimplemented ("TerminateNexusOperationExecution not implemented" )
258+
259+ namespaceID , err := h .namespaceRegistry .GetNamespaceID (namespace .Name (req .GetNamespace ()))
260+ if err != nil {
261+ return nil , err
262+ }
263+
264+ if err := validateAndNormalizeTerminateRequest (req , h .config ); err != nil {
265+ return nil , err
266+ }
267+
268+ _ , err = h .client .TerminateNexusOperation (ctx , & nexusoperationpb.TerminateNexusOperationRequest {
269+ NamespaceId : namespaceID .String (),
270+ FrontendRequest : req ,
271+ })
272+ if err != nil {
273+ return nil , err
274+ }
275+
276+ return & workflowservice.TerminateNexusOperationExecutionResponse {}, nil
241277}
242278
243279func (h * frontendHandler ) DeleteNexusOperationExecution (_ context.Context , req * workflowservice.DeleteNexusOperationExecutionRequest ) (* workflowservice.DeleteNexusOperationExecutionResponse , error ) {
0 commit comments