I have a similar question with global or fact (Foo is never modified)
What's more efficient beetwen :
1. rule Foo_globals
when
Foo(name != null) from fooGlobals
then
...
end
2. rule Foo_facts
when
Foo(name != null)
then
...
end
I think it's not in the manual.
Try this :
seller: ( seller.cheese != null, seller.active == true )
cheese: ( this != null, cheese.type == chedder ) from seller.cheese
I don't kown if it's fine but it works.
dave sinclair wrote:
read the manual
Hi,
I want to change the date in the drools execution (drools 4.0)
Example : I have this rule
rule test 1
date-effective 17-sept.-2008
when
...
then
...
end
the current date is 12-oct.-2008 but I want to force the date of the
execution to 15-juil.-2008 but just for drools
will now have shadow proxies
any more, as default.
Mark
vdelbart wrote:
I think the method cloneObject 'ShadowProxyUtils' could be improve like
follow :
public static Object cloneObject(Object original) {
Object clone = null;
if ( original instanceof Cloneable
Hello,
for hibernate reason I disable shadow facts; however I have 'update' like
this :
rule e
when
...
then
obj.attr = other;
update(obj);
end
and I can confirm, I have an unpredictable behavior.
Could I replace this sentence by this :
rule e
when
...
then
retract(obj);
I post a test case in the JIRA
Mark Proctor wrote:
Mock classes?
vdelbart wrote:
I create a JIRA : http://jira.jboss.com/jira/browse/JBRULES-1590
it's to complicate to me to create an unit test with a hibernate session.
thanks,
V.
Mark Proctor wrote:
Can you open a JIRA
Hi,
I have an object 'VenueGlobal' with a property 'sousVenues' who is a List of
SousVenue. I try to test the emptyness of this list in on sentence but i
don't know why it doesn't work :
I try this :
VenueGlobal( sousVenues == null || sousVenues.empty )
but I have this error :
I think the method cloneObject 'ShadowProxyUtils' could be improve like
follow :
public static Object cloneObject(Object original) {
Object clone = null;
if ( original instanceof Cloneable ) {
try {
Method cloneMethod =
Hi,
I have a big problem with shadowproxy.
All my objects are hibernate so they use PersistentSet in their properties.
But when the shadowproxyfactory clone the PeristentSet properties, I have
this error :
org.hibernate.LazyInitializationException: failed to lazily initialize a
collection, no
Hello,
I have an error on WorkingMemoryLogger with this rule :
package example
import mcmipih.rules.demo.model.*;
global Param param;
rule Your Third Rule
dialect mvel
when
Param( iep : IEP ) from param
then
System.out.println(Iep de
Actually !
I try with the future 4.0.5 version, and it's working !
I wait for the official new realease.
thanks,
V.
Steven Williams-5 wrote:
This may be http://jira.jboss.org/jira/browse/JBRULES-1415
cheers
Steve
On Wed, Apr 9, 2008 at 5:37 PM, vdelbart [EMAIL PROTECTED
Thanks for the answer.
I can move on now. And I'm going to use your function solution.
V.
Mark Proctor wrote:
vdelbart wrote:
I try in 4.0.4 it doesn't work.
Nobody have an idea ?
We do not currently allow any imperative code for MVEL, it is disabled.
This is on purpose
I try in 4.0.4 it doesn't work.
Nobody have an idea ?
Thanks,
V.
vdelbart wrote:
Hi,
I have a problem with this simplified rule (mvel + ternary) :
rule Your Third Rule
dialect mvel
when
v:Venue()
then
v.activite = (v.um == null
Hi,
I have a problem with this simplified rule (mvel + ternary) :
rule Your Third Rule
dialect mvel
when
v:Venue()
then
v.activite = (v.um == null ? it's null : it's not null);
end
before the execution I have this fact :
Venue(Type Hosp:
Hi,
I want to use the keyword memberOf in an eval statement (with dialect =
mvel).
rule Your 5 Rule
dialect mvel
when
$l:ArrayList()
eval(test memberOf $l)
then
#actions
System.out.println(OK);
end
)logger);
session.removeEventListener((RuleBaseEventListener)logger);
regards,
V.
vdelbart wrote:
Good morning,
I found a workaround : don't use the WorkingMemoryFileLogger !
I create an issue : http://jira.jboss.com/jira/browse/JBRULES-1325
regards,
V.
vdelbart wrote
Hello,
In my tests of the 4.0.3, I have some : java.lang.OutOfMemoryError.
So, I try a simple test with 10.000 sequential execution of 1 rule with no
context and just a workingmemorylogger and I have the error :
java.lang.OutOfMemoryError: Java heap space
My code is :
public class
Hi everyone,
I have a little problem with this plugins Drools in Eclipse.
In my Drools Project I have some xls but I haven't Decision Table.
I have this error associate with all xls files : An error occured opening
the workbook.
How to ignore this error and don't see it any more ?
I try to
If your List is not immutable, you can't use global. You have to use WM
facts.
V.
java_user_ wrote:
Thanks.
That initialized my global but the rule still runs every execution. Can I
disable the rule after the first execution?
I would like to use (if (objectList==null)). My list
It's normal.
Globally, the rule engine works in two steps :
- first : the activation (the when statement)
- second : the execution (the then statement) with salience, ruleflow ...
In your test, you have in the first step objectList = null and in the second
step objectList = [1, 2].
If you
Beware,
2.5.4.5. Globals
If you use a global on the LHS of a rule, make sure it is immutable.
regards,
V.
java_user_ wrote:
How do I initialize a global fact in the drl file? I want use the JSR94
API and avoid using the Drools API inside the Java code. I would like to
access the same
I try with this and it's working. I don't know why your case doesn't work.
public class Experience {
private String primary;
public String getPrimary() {
return primary;
}
public void setPrimary(String primary) {
this.primary=
Nobody knows what's going wrong ?
All my DSLs are wrong and in the same time my rules too... It's very
problematic...
V.
vdelbart wrote:
Hi,
I have a problem with my DSL and the 4.0.2 version :
this sentence doesn't work in 4.0.2 (work in 4.0.1) in Eclipse Editor :
[condition
only know i have this problem to when using 4.0.2 - conclusion:
don't use it ... stay with 4.0.1
2007/10/12, vdelbart [EMAIL PROTECTED]:
Nobody knows what's going wrong ?
All my DSLs are wrong and in the same time my rules too... It's very
problematic...
V.
vdelbart wrote:
Hi,
I
Hi,
I have a problem with my DSL and the 4.0.2 version :
this sentence doesn't work in 4.0.2 (work in 4.0.1) in Eclipse Editor :
[condition][]there is at least {number} {object}=ArrayList( size =
{number}) from collect( {object}() )
log :
!ENTRY org.eclipse.ui 4 0 2007-10-11 14:29:29.052
Hi,
I didn't find the class org.drools.EventManager in 4.0.2 where is it ?
And I find nothing about this in the documentation...
thanks,
V.
--
View this message in context:
http://www.nabble.com/4.0.2-%3A-Class-EventManager-tf4607170.html#a13155535
Sent from the drools - user mailing list
thanks,
for my information, what's the difference between RuleBaseEventManager
WorkingMemoryEventManager ?
thks,
V.
Mark Proctor wrote:
vdelbart wrote:
Hi,
I didn't find the class org.drools.EventManager in 4.0.2 where is it ?
http://downloads.jboss.com/drools/docs/4.0.2.15666
OK,
I open the JIRA : http://jira.jboss.com/jira/browse/JBRULES-1222
V.
Edson Tirelli-3 wrote:
Seems IDE needs fixing then. May I ask you please to open a JIRA. I
will
talk to kris about it.
Thanks.
Edson
--
View this message in context:
Hi,
I have this in my DSL consequence :
{name}.{indic}+:{value}={name}.putIndicator({indic},{name}.get({indic})+{value});
{name}.{indic}:{value}={name}.putIndicator({indic},{value});
If I write in my dslr :
...
then
ex.+:200
ex.:200
end
the mapping is :
then
Hi,
It doesn't work.
With :
[consequence][]{name}.{indic}\+:{value}={name}.putIndicator({indic},{name}.get({indic})+{value});
this code :
ex.\+:200
is mapping like that :
ex.+:200
For information, I use the 4.0.1 Drools.
thks,
V.
--
View this message in context:
Hi,
My rule is :
#created on: 29 août 2007
package example
#list any import classes here.
global Boolean test
rule Your Third Rule
#include attributes such as salience here...
when
then
#actions
test = true;
thanks,
it's working.
V.
Mark Proctor wrote:
java is pass by reference, so all you are doing is assigning the local
test pointer to point to something else; which ofcourse won't be
reflected in the global resolvers
drools.getWorkingMemory.setGlobal(test, test);
Mark
vdelbart
instead of mvel. You
can't use Map(), it's mvel coding.
Try this :
when
m:Map()
eval(!((Integer)m.get[G10.3] !=8) || ((Integer)m.get[G10.2] ==19))
then
good luck,
vdelbart
--
View this message in context:
http://www.nabble.com/How-to-use-not-operator-in-drool.-tf4430240.html
I think it's impossible... I have the same problem and to do this I mixed
globals and working memory... but I have only one Order()... It was easier.
v.
--
View this message in context:
http://www.nabble.com/Assistance-with-DSL-syntax-tf4432759.html#a12650375
Sent from the drools - user
Hello,
In my DSL, I have :
{indicator}:={boolean}
mapping with
{indicator}.setValue({boolean});
but in my rule when I write :
myIndicator:=true
In the DRL viewer, I have :
{boolean}myIndicator.setValue({boolean});
I think I can't use the = in my DSL...
I try to use simple quote or double
I create this issue :
http://jira.jboss.com/jira/browse/JBRULES-1190
http://jira.jboss.com/jira/browse/JBRULES-1190
thanks,
V.
--
View this message in context:
http://www.nabble.com/Use-of-%22%3D%22-in-DSL-tf4434499.html#a12653465
Sent from the drools - user mailing list archive at
It's true Kris Verlaenen.
But the first set is strange, isn't it?
thanks,
Vincent
--
View this message in context:
http://www.nabble.com/Ruleflow-and-persistence-tf4415033.html#a12608948
Sent from the drools - user mailing list archive at Nabble.com.
In the Ruleflow editor, there is a Router Layout properties, what is it ?
I searched in the documentation but I didn't find anything...
There are three possibility :
- Shortest Path
- Manual
- Manhatten
Best regards,
Vdelbart
--
View this message in context:
http://www.nabble.com/Router
thanks,
i have the same question with Action and Milestone buttons.
Are they work ?
regards,
vdelbart
--
View this message in context:
http://www.nabble.com/Router-Layout-%3A-what%27s-thattf4414120.html#a12592479
Sent from the drools - user mailing list archive at Nabble.com
?
thanks,
vdelbart
--
View this message in context:
http://www.nabble.com/Ruleflow-and-persistence-tf4415033.html#a12593732
Sent from the drools - user mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https
thanks el arbi !
I had a good teacher !
--
View this message in context:
http://www.nabble.com/DSL-field-constraint-question-tf4360996.html#a12472569
Sent from the drools - user mailing list archive at Nabble.com.
___
rules-users mailing list
[when]-id must be positive integer=id 0
Good luck,
vdelbart
--
View this message in context:
http://www.nabble.com/DSL-field-constraint-question-tf4360996.html#a12457145
Sent from the drools - user mailing list archive at Nabble.com.
___
rules-users
(RuleTerminalNode.java:326)
at
org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:132)
with the same rule package.
Thanks,
Vdelbart
--
View this message in context:
http://www.nabble.com/Execution-problems-with-%28or-and-%28and-tf4352997.html#a12421776
Sent from the drools
I try with the 4.0.1 release but it's the same result.
best regards,
Vdelbart
--
View this message in context:
http://www.nabble.com/Ruleflow-and-Global---tf4347589.html#a12421773
Sent from the drools - user mailing list archive at Nabble.com
Thanks a lot !
I will use your Global class :-)
vdelbart
--
View this message in context:
http://www.nabble.com/Ruleflow-and-Global---tf4347589.html#a12425923
Sent from the drools - user mailing list archive at Nabble.com.
___
rules-users mailing
Ok cool,
it's working !!
thanks a lot,
vdelbart
--
View this message in context:
http://www.nabble.com/Execution-problems-with-%28or-and-%28and-tf4352997.html#a12426264
Sent from the drools - user mailing list archive at Nabble.com.
___
rules
()
v:Venue()))
then
System.out.println(OK - 2);
end
In my WM, I have a Param and a ListeSousVenue but no Venue
But after execution, I have just this result :
OK - 1
Why the second rule doesn't execute ?
Thanks,
Vdelbart
--
View this message in context:
http://www.nabble.com/Execution
/Imports%2Beditor.jpg
but the declaration is not save :
http://www.nabble.com/file/p12409258/Imports%2Beditor_without_global.jpg
Is there a textual editor for global declaration in the ruleflow ?
thank you,
vdelbart
--
View this message in context:
http://www.nabble.com/Ruleflow-and-Global
Hello,
How to use global in my split condition of a Ruleflow ? :confused::confused:
I try this :
-
My global map is a HashMap
when I write this :
Boolean(eval((Boolean)map.get(decision) == true)) from Boolean.TRUE;
I
49 matches
Mail list logo