change "assert" to "insert"+ other changes
by Mark Proctor
I've had no further feedback on this, so I'm going to make this change
as part of the next milestone release (this week) - these changes are
considerable.
assert will change to insert
-avoid the constant keyword collision with "assert", most languages are
seem to support this now
-will change in both the drl and working memory api
modify to become update
-instead of workingMemory.modify(FactHandle, Object) it will be
workingMemory.update(FactHandle, Object), will change modify to update
in drl.
-this method is now only used for ShadowFact objects, it's a method to
let the engine know that an external object has been updated and to
update it's internal cache. and reprocess.
-avoid keyword collision in MVEL which has nice "modify" sugar now
insertObject, retractObject and updateObject to beome insert, retract
and update
-the Object part seems superflous, might as well remove it, especially
as we start to support none Object fact types
-drl and working memory api will now use the same method names.
added new WorkingMemory modifyRetract and modifyAssert methods
-allows for non shadow fact objects.
-When not using shadow facts (although will ofcourse work with shadow
facts) you cannot call 'update', or what use to be called 'modify',
because we need to know the "old" value of fields so we can retract the
from the workign memory. The only safe way is to first retract the
object and then assert it. However with the existing api this adds extra
work and results in new fact handle. modifyRetract and modifyAssert can
now be used together to "simulate" a modify on a none shadow fact object
in two parts. First call modifyRetract, then change your field values,
then call modifyAssert.
-MVEL has sugar to do: modify ( person ) { age += 1, location = "london"
}, what actually happens here is it first calls modifyRetract then
applies the setters and then calles modifyAssert.
Mark
Greg Barton wrote:
> I think it's a good idea, so ya, change to "insert"
>
> GreG
>
> --- Mark Proctor <mproctor(a)codehaus.org> wrote:
>
>
>> We have been getting querries with regards to jdk
>> assert collision and
>> jboss rules assert, for this reason we are thinking
>> of changing it to
>> insert for 4.0. Further to that its causing language
>> integrations issues
>> for us as we expand pluggeable dialects. For this
>> reason we are thinking
>> of chaning assert to insert, this would be an api
>> change and a language
>> level change. I'd thought I'd throw this out to the
>> community before we
>> do it. This of course breaks backwards
>> compatability.
>>
>> Mark
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>>
>
>
>
>
> ____________________________________________________________________________________Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
> http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
18 years, 6 months
User defined structure of facts
by Rudolf Kadlec
Is it possible to define slots which wouldn't be obtained by Java
introspection? We want to apply Drools rules to object written in
Python (Python will be connected to Java through Java Scripting API).
We already have our own introspector for Python and now we need to
define arbitrary structured facts in working memory.
Any hints?
Thanks
Rudolf Kadlec
18 years, 6 months
Keyword to Stop firing rules
by Rajesh.Sachin10
There is any keyword available to stop the rules firing after some condition?
EG:
[when] \\condition 1
[then] \\ do something
[when] \\condition 2
[then] \\ do something and stop the rules from firing.
My 2 rules are in loop structure. Both the rules will fired still the
condition 2 satisfies. Once the condition 2 satisfy, it should not fire the
first rule again. It should come out from the dsl itself.
--
View this message in context: http://www.nabble.com/Keyword-to-Stop-firing-rules-tf3904389.html#a11069752
Sent from the drools - user mailing list archive at Nabble.com.
18 years, 6 months
REMINDER CfP RuleML-2007
by Adrian Paschke
Dear Prospective Author of RuleML-2007,
This is just a friendly reminder that the deadline for the RuleML-2007
abstract submission is
Friday, June 15, 2007.
Please upload a plain text abstract in our EasyChair submission page at
http://www.easychair.org/RuleML2007/.
All information regarding submission requirements are
elaborated in the RuleML-2007 web site at:
http://2007.ruleml.org/index-Dateien/Page577.htm
Sincerely,
Adrian Paschke
Yevgen Biletskiy
RuleML-2007 Program Co-Chairs
[ our apologies should you receive this message more than one time ]
The International RuleML Symposium
on Rule Interchange and Applications (RuleML-2007)
October 25-26, 2007, Orlando, Florida
http://2007.ruleml.org
=====================================================================
Co-located with:
The 10th International Business Rules Forum
http://www.businessrulesforum.com
=====================================================================
The International RuleML Symposium on Rule Interchange and Applications
(RuleML-2007) will take place, October 25-26, 2007, in Orlando, Florida
<http://2007.ruleml.org>, co-located with The 10th International
Business Rules Forum <http://www.businessrulesforum.com>. RuleML-2007 is
devoted to practical distributed rule technologies and rule-based
applications which need language standards for rules operating in the
context of, e.g., the Semantic Web, Intelligent Multi-Agent Systems,
Event-Driven Architectures and Service-Oriented Computing Applications.
A RuleML-2007 Challenge with prizes will be organized to demonstrate
tools, use cases, and applications. Abstracts are due June 15, 2007.
Papers are due June 29, 2007.
=====================================================================
18 years, 6 months
Drools 4 with Spring
by Miguel Figueiredo
Hello listers,
I am testing the integration of Drools 4 with Spring and I want to use the
following:
1. Load rules from a database
My approach was to store rules in a table with the columns: name, conditions,
actions. Then build a string with the various rules and load it with a
package builder from the String's InputStream.
Is there a better way to do this?
2. Use Spring beans in the rules
I want to use spring beans and DAOs in the rules. Can I do this? How?
I hope that someone can help me.
Best regards,
Miguel
18 years, 6 months
Need help in finding which clause[Expression] in the rule failed
by Ashwini Joshi
Hi,
I have also sent this problem before. But did not get any reply. It is
urgent. Does anyone know about this?
Suppose I have a rule as
rule "Rule1"
when
Message( message == "Hello" ) || Message( status == 0 )
then
System.out.println("then executed");
End
Is there a way to find out which condition is satisfied? I.e. whether
message was equal to "Hello" or status was 0.
We are generating alerts using rules engine, and in the alert we need to
specify that which clause generated the alert.
We are having multiple clauses in a single rule. So what is the correct way
to find the clause because of which alert is generated. We cannot keep them
in separate rule because we need to consider and\or conditions between these
clauses.
Thanks,
Ashwini
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.
18 years, 6 months
RE: [rules-users] Need Help On Modify
by Sikkandar Nawabjan
Hi,
This is pretty much expected behaviour. If you modify the facts in working memory and if the changes satisfy the rule obviously it will fire. So you can do one thing. u can modify the corresponding DTO such a way that it is not satisfying the predicate logic in the previous 5 rules.
If the current object is firing again and again u can use the attribute no-loop truue
Any other better options from anybody?
Thanks and Regs,
basha
Message: 1
Date: Mon, 11 Jun 2007 10:20:30 +0530
From: <shilpa.raghavendra(a)wipro.com>
Subject: [rules-users] Need Help On Modify
To: <rules-users(a)lists.jboss.org>
Message-ID:
<16D08C962563664288C2B2EC23C47FCB03D8E228(a)BLR-SJP-MBX01.wipro.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
I am having set of rules; each DTO (Java Bean with getter
and setter) will go under these rules.
Lets take I am having 10 rules the DTO has to change its
value at 5th rule.
So I am changing the value in DTO and calling modify(DTO),
so what's happening is again this changed DTO is executing form RULE1
I want this DTO to execute from Rule 6 or Exit from all
Rules
Please help me it's urgent
Regards
Shilpa
18 years, 6 months
Need Help On Modify
by shilpa.raghavendra@wipro.com
Hi,
I am having set of rules; each DTO (Java Bean with getter
and setter) will go under these rules.
Lets take I am having 10 rules the DTO has to change its
value at 5th rule.
So I am changing the value in DTO and calling modify(DTO),
so what's happening is again this changed DTO is executing form RULE1
I want this DTO to execute from Rule 6 or Exit from all
Rules
Please help me it's urgent
Regards
Shilpa
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
18 years, 6 months
Persistence & Clustering
by jean safar
Hi,
I have started to look at drools and I had the following questions.
Apologies if that is in the doc or in the archives of the mail group, but I
did not find any answer.
1) Is there some support (is it a valid question?) for the persistence of
the working memory and state of the engine? Or is it easier to just reassert
all objects ?
2) Is there any support to grid/cluster the engine? Can the working memory
use a distributed cache ?
Best Regards,
--
Jean Safar
18 years, 6 months