It seems to me that rule metadata would be the answer to your problem.<br>This keeps the ID right in the rule. <br><br>Alternatively, you could make the ID an immutable part of the rule name,<br>e.g. &quot;change me here but [don&#39;t change me here]&quot;.<br>
<br>-W<br><br><br><div class="gmail_quote">On 8 May 2011 06:17, harishtejwani <span dir="ltr">&lt;<a href="mailto:harish@htejwani.com">harish@htejwani.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
All:<br>
<br>
We are using Drools to detect specific events/conditions in our system.<br>
<br>
In the &#39;then&#39; condition of Drools rule, we would like to persist the &quot;Rule<br>
Id&quot; of the rule that created the specific event/condition<br>
<br>
This is because all our reporting is based on &quot;rules&quot; as filters, where<br>
users can look at exceptions by specific rules.<br>
<br>
Is there a suggestion or sample as how can the &quot;Rule Id&quot; be persisted or<br>
indicated in the then condition that is immutable or can be long-lived. The<br>
current approach of using Rule Name itself as the ID is brittle as this can<br>
be changed and suddenly all reports would break.<br>
<br>
If we assign ID&#39;s to rules, where do we keep the mapping of RULE ID to<br>
Rules. If we store rules in GUVRNOR is there a way we can get Rule Id&#39;s for<br>
Rules?<br>
<br>
Best regards<br>
<br>
Harish Tejwani<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Rule-Id-for-a-Drools-Rule-tp2914385p2914385.html" target="_blank">http://drools.46999.n3.nabble.com/Rule-Id-for-a-Drools-Rule-tp2914385p2914385.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>