<font size=2 face="sans-serif">&quot;</font><tt><font size=2>I would not
store the result of the (missed) activation of a rule in a rule<br>
attribute, anyway. Can't you just use a dedicated fact(s) for that?&quot;</font></tt>
<br>
<br><tt><font size=2>I face a similar issue where the target audience are
&quot;business&quot; users i.e users that dont really understanding or
wish to get into logic. I am finding myself having to resort to all sorts
of tricks (using categories/packages/standlone rule editor) to allow business
users to easily specify which rules are for what purposes and when they
should fire. I just cant rely on them using facts correctly to disable
rules that should not fire. In fact, I am now down to using only the standalone
editor and saving the rule xml in my tables (not guvnor) so that i have
full control over itemized rule display, rule search, knowledgebase creation
for different execution profiles, etc.</font></tt>
<br>
<br><tt><font size=2>Overall, I increasingly tend to think rules for business
users is a myth. The business users wants rule-driven systems, yet they
dont want to learn drools. And drools DSL just doesnt cut it.</font></tt>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Davide Sottara &lt;dsotty@gmail.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">rules-users@lists.jboss.org,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">09/13/2012 01:57 AM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [rules-users]
Cutom Attributes in Drools</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">rules-users-bounces@lists.jboss.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>You can add any metadata using the format @name( &quot;value&quot;
) or @name(<br>
key=value ). You can then look them up using rule.getMetaData(). <br>
Please notice that there's a bug (solved by an open pull request) that
does<br>
not let you write just @name.<br>
<br>
In order to use those attributes to control whether a rule fires or not,
you<br>
can use the &quot;declarative agenda&quot;, i.e. add meta-rules to your
knowledge base<br>
such as:<br>
<br>
rule &quot;Meta&quot;<br>
@activationListener('direct')<br>
when<br>
 &nbsp; &nbsp;// assuming the attribute is @region( [value] )<br>
 &nbsp; &nbsp;$a : Activation( rule.metaData[ &quot;name&quot; ] != &quot;MyDesiredRegion&quot;,
$objs :<br>
objects )<br>
 &nbsp; &nbsp;// any condition on the tuple here, if needed<br>
then<br>
 &nbsp; &nbsp;drools.cancelActivation( $a );<br>
end<br>
<br>
notice that you'll have to enable the corresponding option first:<br>
KnowledgeBaseConfiguration kconf =<br>
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
kconf.setOption( DeclarativeAgendaOption.ENABLED );<br>
KnowledgeBase kb = KnowledgeBaseFactory.newKnowledgeBase( kconf );<br>
<br>
<br>
If you want to have rules override each other, watch out for an upcoming<br>
feature, &quot;Defeasible logic&quot;.<br>
I would not store the result of the (missed) activation of a rule in a
rule<br>
attribute, anyway. Can't you<br>
just use a dedicated fact(s) for that?<br>
<br>
Best<br>
Davide<br>
<br>
<br>
<br>
--<br>
View this message in context: </font></tt><a href="http://drools.46999.n3.nabble.com/Cutom-Attributes-in-Drools-tp4019692p4019736.html"><tt><font size=2>http://drools.46999.n3.nabble.com/Cutom-Attributes-in-Drools-tp4019692p4019736.html</font></tt></a><tt><font size=2><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/rules-users</font></tt></a><tt><font size=2><br>
</font></tt>
<br>

-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you