Dynamic JavaBeans evaluate again, and again...
by Felipe Piccolini
Hi, I dont know if this is reported or maybe its just my mistake... but
when I use dynamic JavaBeans and PropertyListeners the re-evaluation
of the rules
seems to skip the condition evaluation, so they fire again.. and
again, and again..
I have a couple of rules where the conditions are true then I change
the value of an attribute
and the rules re-evaluate again... and so on. I putted a special
constraint in the conditions
of that rule so when it is fired, it modify an atribute of another
fact (tested with the another
attribute of the same fact but it happens anyway), so I try to be
sure that rule will not fire again...
but it does ignoring the constraints... checked with the logger and
the debugger...
Is this a bug or it is supposed to be so, and I need to think another
way to write my rules?...
I want to use the dynamic JavaBeans, so no need to write inserts/
updates... When I set the insert(Object, FALSE)
the problem dissapears.
Thanks.
Felipe Piccolini M.
felipe.piccolini(a)bluesoft.cl
18 years, 6 months
Looking for JRules Developers for Open Source Project
by Steven Waldren
Hello,
I am looking for some experienced JRules developers for some
contracted work to start the core of a new Open Source Healthcare
Decision Support system based on JRules. If you would be interested,
please email me off list or contact me through Skype for more
information.
Best,
Steven
--
Steven E. Waldren, M.D., M.S.
OpenHealth Data, Inc.
Skype: steven.waldren
swaldren(a)openhealthdata.com
18 years, 6 months
how to return additional information from method in 'eval'
by Aeternitas
Hello.
I have the following problem:
Let's imagine we have type like this -
public class Interval{
private long start;
private long end;
private int usage;
...
}
Now I need to insert in DB new Interval, but before doing it I have to
check, whether DB doesn't have any interval, which intersects new one and
satisfies some rules (e.g. rules for summ of usage...). I use eval for it -
I have method, which can check it using DB services etc. But... eval can
return only boolean... I want to know also why I can't insert this interval
(e.g. which intervals prevent to do it). For me it will be comfortable to do
something like this:
when
...
# $intervals - collection of intervals, which intersects new interval
$intervals : eval(newInterval)
#<check whether size of intervals is great than 0>
then
# We can insert such interval and using global variable we inform about
it. 'error' it is collection of
# mistakes
error.add("new interval can't be inserted because of " + <some information
from $intervals> );
But it will not work (or maybe new engine, version 4, will allow such 'eval'
using ?). Could you advice anything?
(Method, which I use in eval have no access to the working memory, so I
can't use global variables. Also I don't want to fire such method again in
"then" section to know "why I can't insert new interval")...
I hope I have described my problem clearly. Thanks in advance
Maxym
--
View this message in context: http://www.nabble.com/how-to-return-additional-information-from-method-in...
Sent from the drools - user mailing list archive at Nabble.com.
18 years, 6 months
about the jboss Rules UNLOOP
by jiangjinfeng 05542
Hi developer
i notice that the decision table support UNLOOP in JBoss Rules User Guide 4.0
but when i try to use it in my application I got an exception:"UNLOOP cannot be resolved".Is there anything missing or does it support UNLOOP in decision table.Any pointer would be great appreciated!
18 years, 6 months
JBoss rules and EJB3 integration best practices?
by Philip Reimer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
I'm very new to JBoss rules (or rules engines in general), so please
excuse any stupid questions.
I have to integrate jboss rules into an ejb3 project: expose rules
functionality via a session bean (and probably a web service later).
I got it basically working but it's probably not a very elegant
solution. Could anyone give me some hints for some best practices when
using rules from within a session bean? Especially, regarding the
caching of built rule bases?
Thanks in advance,
Philip
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGfm6Jzz98eoVPWsQRArJtAJ0RwT/I/PYxZN7LzVSTuejorpGo0gCeJgqX
DqgnI1JWcBzOBFsuqSqSVUo=
=26FR
-----END PGP SIGNATURE-----
18 years, 6 months
mapping different DRL files to same DSL file (Domain specific Language)
by vijay nooka
hi,
working on DomainSpecificLanguage....i am having 4 DRL files having Same
English Text sending different values and having one DSL file.....i am
reading all DRL files with a same DSL file....expecting the output for 4
fires..but its not...giving only one out put( expecting firing once)....
u will be more clear with this:
lets have DRL1, DRL2, DRL3, DRL4 and one DSL file with name DSLforALL
PackageBuilder builder = new PackageBuilder();
Reader source1 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL1.drl" ) );
Reader dsl1 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );
Reader source2 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL2.drl" ) );
Reader dsl2 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );
Reader source3 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL3.drl" ) );
Reader dsl3 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );
Reader source4 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL4.drl" ) );
Reader dsl4 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );
builder.addPackageFromDrl( source1, dsl1 );
builder.addPackageFromDrl( source2, dsl2 );
builder.addPackageFromDrl( source3, dsl3 );
builder.addPackageFromDrl( source4, dsl4 );
Package pkg = builder.getPackage();
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage(pkg);
WorkingMemory workingMemory = ruleBase.newWorkingMemory();
each DRL file sending different values to the Same DSL file...so we are
expecting the Out put for four Scenarios....but its not.... its firing only
once for one Scenario....what do u say for this...kindly help
Thanks
Vijay
--
View this message in context: http://www.nabble.com/mapping-different-DRL-files-to-same-DSL-file-%28Dom...
Sent from the drools - user mailing list archive at Nabble.com.
18 years, 6 months