[#BloombergLP-ball-AttributeContext-hasRelevantActiveRules]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/AttributeContext.adoc[AttributeContext]::hasRelevantActiveRules
:relfileprefix: ../../../
:mrdocs:

Return `true` if there is at least one relevant and active rule for the specified `category`&period;

== Synopsis

Declared in `&lt;ball&lowbar;attributecontext&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
hasRelevantActiveRules(xref:BloombergLP/ball/Category.adoc[Category] const* category) const;
----

== Description

Return `true` if there is at least one rule defined for this process that is both &quot;relevant&quot; to the specified `category` and &quot;active&quot;, and `false` otherwise&period; A rule is &quot;relevant&quot; to `category` if the rule&apos;s pattern matches `category&hyphen;&gt;categoryName()`, and a rule is &quot;active&quot; if all the attributes defined for that rule are satisfied by the current thread&apos;s attributes (i&period;e&period;, `Rule&colon;&colon;evaluate` returns `true` for the collection of attributes maintained by this object)&period; This method operates on the set of rules maintained by the category manager supplied to the `initialize` class method (which, in practice, should be the global set of rules for the process)&period; The behavior is undefined unless `initialize` has previously been invoked without a subsequent call to `reset`, and `category` is contained in the registry maintained by the category manager supplied to `initialize`&period;

== Return Value

`true` if a relevant active rule exists, and `false` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *category*
| category to test for relevant active rules
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
