func (wh *WorkflowHandler) ResetStickyTaskList(
	ctx context.Context,
	resetRequest *types.ResetStickyTaskListRequest,
) (resp *types.ResetStickyTaskListResponse, retError error) {
	defer log.CapturePanic(wh.GetLogger(), &retError)

	scope, sw := wh.startRequestProfileWithDomain(ctx, metrics.FrontendResetStickyTaskListScope, resetRequest)
	defer sw.Stop()

	if wh.isShuttingDown() {
		return nil, errShuttingDown
	}

	if err := wh.versionChecker.ClientSupported(ctx, wh.config.EnableClientVersionCheck()); err != nil {
		return nil, wh.error(err, scope)
	}

	if resetRequest == nil {
		return nil, wh.error(errRequestNotSet, scope)
	}

	domainName := resetRequest.GetDomain()
	wfExecution := resetRequest.GetExecution()
	tags := getDomainWfIDRunIDTags(domainName, wfExecution)

	if domainName == "" {
		return nil, wh.error(errDomainNotSet, scope, tags...)
	}

	// Count the request in the host RPS,
	// but we still accept it even if RPS is exceeded
	wh.allow(false, resetRequest)

	if err := validateExecution(wfExecution); err != nil {
		return nil, wh.error(err, scope, tags...)
	}

	domainID, err := wh.GetDomainCache().GetDomainID(resetRequest.GetDomain())
	if err != nil {
		return nil, wh.error(err, scope, tags...)
	}

	_, err = wh.GetHistoryClient().ResetStickyTaskList(ctx, &types.HistoryResetStickyTaskListRequest{
		DomainUUID: domainID,
		Execution:  resetRequest.Execution,
	})
	if err != nil {
		return nil, wh.normalizeVersionedErrors(ctx, wh.error(err, scope, tags...))
	}
	return &types.ResetStickyTaskListResponse{}, nil
}
// ResetStickyTaskList reset the volatile information in mutable state of a given workflow.
ResetStickyTaskList reset the volatile information in mutable state of a given workflow.
// ResetStickyTaskList reset the volatile information in mutable state of a given workflow .
func (wh *WorkflowHandler) ResetStickyTaskList(
	ctx context.Context,
	resetRequest *types.ResetStickyTaskListRequest,
) (resp *types.ResetStickyTaskListResponse, retError error) {
	defer log.CapturePanic(wh.GetLogger(), &retError)
	scope, sw := wh.startRequestProfileWithDomain(ctx, metrics.FrontendResetStickyTaskListScope, resetRequest)
	defer sw.Stop()
	if wh.isShuttingDown() {
		return nil, errShuttingDown
	}
	if err := wh.versionChecker.ClientSupported(ctx, wh.config.EnableClientVersionCheck()); err != nil {
		return nil, wh.error(err, scope)
	}
	if resetRequest == nil {
		return nil, wh.error(errRequestNotSet, scope)
	}
	domainName := resetRequest.GetDomain()
	wfExecution := resetRequest.GetExecution()
	tags := getDomainWfIDRunIDTags(domainName, wfExecution)
	if domainName == "" {
		return nil, wh.error(errDomainNotSet, scope, tags...)
	}
	wh.allow(false, resetRequest)
	if err := validateExecution(wfExecution); err != nil {
		return nil, wh.error(err, scope, tags...)
	}
	domainID, err := wh.GetDomainCache().GetDomainID(resetRequest.GetDomain())
	if err != nil {
		return nil, wh.error(err, scope, tags...)
	}
	_, err = wh.GetHistoryClient().ResetStickyTaskList(ctx, &types.HistoryResetStickyTaskListRequest{
		DomainUUID: domainID,
		Execution:  resetRequest.Execution,
	})
	if err != nil {
		return nil, wh.normalizeVersionedErrors(ctx, wh.error(err, scope, tags...))
	}
	return &types.ResetStickyTaskListResponse{}, nil
}
func ( wh * WorkflowHandler ) ResetStickyTaskList ( ctx context . Context , resetRequest * types . ResetStickyTaskListRequest , ) ( resp * types . ResetStickyTaskListResponse , retError error ) { defer log . CapturePanic ( wh . GetLogger ( ) , & retError ) scope , sw := wh . startRequestProfileWithDomain ( ctx , metrics . FrontendResetStickyTaskListScope , resetRequest ) defer sw . Stop ( ) if wh . isShuttingDown ( ) { return nil , errShuttingDown } if err := wh . versionChecker . ClientSupported ( ctx , wh . config . EnableClientVersionCheck ( ) ) ; err != nil { return nil , wh . error ( err , scope ) } if resetRequest == nil { return nil , wh . error ( errRequestNotSet , scope ) } domainName := resetRequest . GetDomain ( ) wfExecution := resetRequest . GetExecution ( ) tags := getDomainWfIDRunIDTags ( domainName , wfExecution ) if domainName == " " { return nil , wh . error ( errDomainNotSet , scope , tags ... ) } wh . allow ( false , resetRequest ) if err := validateExecution ( wfExecution ) ; err != nil { return nil , wh . error ( err , scope , tags ... ) } domainID , err := wh . GetDomainCache ( ) . GetDomainID ( resetRequest . GetDomain ( ) ) if err != nil { return nil , wh . error ( err , scope , tags ... ) } _ , err = wh . GetHistoryClient ( ) . ResetStickyTaskList ( ctx , & types . HistoryResetStickyTaskListRequest { DomainUUID : domainID , Execution : resetRequest . Execution , } ) if err != nil { return nil , wh . normalizeVersionedErrors ( ctx , wh . error ( err , scope , tags ... ) ) } return & types . ResetStickyTaskListResponse { } , nil }
ResetStickyTaskList reset the volatile information in mutable state of a given workflow.
ResetStickyTaskList reset the volatile information in mutable state of a given workflow .
// Count the request in the host RPS, // but we still accept it even if RPS is exceeded