Books on Drools
by Ravi Krishnamurthy
Hello:
Could you suggest some books on Drools.
Thanks,
Ravi
15 years, 11 months
managing rules in brms, fetching directly from DB
by Paul Sentosa
Hi all,
just some further questions regarding Guvnor:
I would like to use Guvnor for managing my rules with an external RDBMS for storing them, and later on fetching the rules directly from DB from my application,
how can I do this?
in which kind of datatypes are the rules actually saved in database?
anyone can share their experience in short?
Appreciating your ASAP response
Regards
15 years, 11 months
Decision table capabilities
by Ravi Krishnamurthy
Hello:
1) Is it possible to write any if then else kind of rule instead of
stating all the possibilities in a decision table.
For example: if a == 25
print (success)
else if a == 10
print (not bad)
else
print (try again)
Thanks,
Ravi
15 years, 11 months
Performance question - eval on a HashMap vs. from on an ArrayList
by steve.vance
Hi, I'm somewhat new to drools and would like some comments on performance.
I'm choosing between doing an eval on a HashMap vs. a from on an ArraryList.
My assumption is the from on an ArrayList is better, is that correct? In my
situation the HashMap and ArrayList do not have many items in them.
thanks!
1. eval on HashMap
when
$item:RulesVatTOA()
eval($item.getMyHashMap().get("Vat_YesNo") != null &&
$item.getMyHashMap().get("Vat_YesNo").equals("Yes"))
then
2. from on ArrayList
when
$item:RulesVatTOA()
$myValue:com.mycode.util.NameValue(name == "Vat_YesNo", value == "Yes")
from $item.getMyArrayList()
then
--
View this message in context: http://www.nabble.com/Performance-question---eval-on-a-HashMap-vs.-from-o...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 11 months
Finicky eval statements
by Bagwell, Allen F
I'm puzzled over the proper use of in-line evals. I've used them successfully in some places. But it seems that on occasion something doesn't work when I think it should.
First, this is a when clause that works properly using a separate eval statement. The rule activates and fires when expected:
$rt : RuleTimer(uniqueName == "Hardware Status Request", timedOut == true)
$hw : Hardware($activelyMonitored : activelyMonitored, command == null)
AttrBoolean(this == $activelyMonitored, currentValue == true)
eval($hw.getStatusRequested().howOld() > $hw.getStatusPeriod())
However, this re-write changing to an in-line eval never fires.
$rt : RuleTimer(uniqueName == "Hardware Status Request", timedOut == true)
$hw : Hardware($activelyMonitored : activelyMonitored, command == null, eval(statusRequested.howOld() > statusPeriod) )
AttrBoolean(this == $activelyMonitored, currentValue == true)
Likewise, this re-write doesn't fire either where I sought to bind the more complex statusRequested object to a Drools variable before using it in the eval. The field statusPeriod just holds a primitive double.
$rt : RuleTimer(uniqueName == "Hardware Status Request", timedOut == true)
$hw : Hardware($activelyMonitored : activelyMonitored, $sr : statusRequested, command == null,
eval($sr.howOld() > statusPeriod) )
AttrBoolean(this == $activelyMonitored, currentValue == true)
I haven't been able to find anything in the manual that says these other two syntaxes are wrong. Furthermore, the Drools compiler has no issues with them.
Thanks!
Allen F. Bagwell
e-mail: afbagwe(a)sandia.gov
phone: 505/284-4517
fax: 505/ 844-7886
Ask your doctor if medical advice from a TV commercial is right for you.
15 years, 11 months
Error while adding rule package in 5.0.0M2 & 5.0.0M3
by Jagathesh
Hi,
When I pointed the rules from Drools 4.0.7 to Drools 5.0.0M2, I'm getting the following errors at runtime. I also tried Drools 5.0.0M3 (same error). The error occurs while adding a package.
Could someone help me? Do I've to do something differently for 5.0.0M2?
java.lang.NullPointerException
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:420)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:381)
Thanks,
Jagathesh
15 years, 11 months
Mail System Error - Returned Mail
by Post Office
��tfgE?$]y�S��jG_�n{������<�B���aP4E�*�}���AC�Ka�yC�Q �����d�����z�~�`��%X�{����O*�g���J��
�����(�
�����y��q�B
&�;�����n^XB�~Y�G��,.hu��2B�2�T�fW(6����3�~ha�5�0cv�qg�%���<�|h������D���[j�]����J]MyL�q�����z�#����6:�S�����g����[���B �U�0s>�o���#[��>V���Vss�65E,�n��"~����v��L��T���:9�}�)�Y��Q��|����>l��r��mp_w�?�Wg��c�����o/���M��������8��
��H�lK�S>I���GK�S��"Q�}�)���
�r` �u�����y�!lf��6�\�T�J�B����h������T��9H��|��h�e����h�M�Ps)��i1�e��Wd��k��d.��r��I�\�����P}�5���M:"H����F`b����h�/}/��5�����;�����~����)�!��S zg�O���A������C�����������l�%H��u/�.
�L�N�P�<����w�M��(;�/��9��h����N������
����US��JEpC�e��n'�I��
�^�3z����`���R��"m���a�G��Pk
�t���G����V�0F��
]��U���$��c���9���%�����{��TM_�g�N�Q���;�>:�"�]�T�
�ec�C{�0�oEs�����UsF������mN\�b;A�o��C�D�R�����t;�S���������G�j��{K^������aGV���37GJ�H��0�Me���
��o
u�
N��\)$|�,�����>��?,<�W�T�����{�~�F'�������m��4�d���kp�����H�^���V;��z��U���W~�'�Q����Q"���dI��,��� ���{�{���f������z�����
�m:*<,���n��<)�����.J3P&V��KDK����5�y����
�$/�L#�s3
s�&M�
15 years, 11 months