[rules-users] StatelessSession

2012-04-06 Thread Hassan
hello everyone

actually I'm working with stateless session, I know we can pass a list of
objects in the session but I do not know how to pass objects of different
types, I do not even know if that's possible.

I will be grateful :)

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/StatelessSession-tp3890043p3890043.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools performance

2012-04-03 Thread Hassan
Hi laune !

Sorry to be late, Actually,  all of these objects are needed in the WM. 

Concerning the idea of clearing and reinserting objects, I think that it
will take a lot of time and that what I want to avoid :(

thanks a lot :)

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-performance-tp3870569p3880275.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Fusion with stateless session

2012-04-03 Thread Hassan
Hi,

I want to know if stateless session works with Drools Fusion(sliding
windows) ??

thanks

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Fusion-with-stateless-session-tp3881399p3881399.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools performance

2012-03-30 Thread Hassan
Hi everyone,

In one of my tests, I inserted 100 objects into the working memory,
drools engine made a lot of time to execute the program and it throws
Exception : java.lang.OutOfMemoryError !!

Please if someone could help me to improve drools performance and specially
reduce the drools execution time

thanks  

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-performance-tp3870569p3870569.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools performance

2012-03-30 Thread Hassan
Hi,

Actually I m working on banking fraud monitoring project, and there are a
very lot of objects (transactions, account, authorizations ...etc) and some
rules ( 50 rules).

In the test i inserted 100 of this object
*
 private Integer chdCode;
 private int chdCardNumb;
 private Date chdDate;
 private int chdDecNumb;
 private double chdDecAmou;
 private int chdAppNumb;
 private double chdAppAmou;
 private int chdKeNumb;
 private double chdKeAmou;
 private int chdPinAttemNumb;
 private double chdPinAttemAmou;
*

and every object is matching and firing 3 times.

With this I have two problems, the first is concerning the memory and the
second which is more important is about execution time .

Thant you :)

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-performance-tp3870569p3870617.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Eclipse Agenda View

2012-03-29 Thread Hassan
Hi guys,

I want to see what is going in my drools application so, I declared a logger
file, by importing it in audit view some details But the agenda view is
always inactivated,

Can you help me please!   
youssef.  

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Eclipse-Agenda-View-tp3867158p3867158.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Eclipse Agenda View

2012-03-29 Thread Hassan
Hi guys, 

I want to see what is going in my drools application so, I declared a logger
file, By importing it in audit view some details are shown But the agenda
view and the working memory are always inactivated, 

Can you help me please!   
youssef. 

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Eclipse-Agenda-View-tp3867166p3867166.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Multi-function Accumulates

2012-03-29 Thread Hassan
Hello everybody


I don't know why the Multi-function Accumulates doesn't work,
 I m just copying the code given in he documentation

rule Max, min and average 
when
accumulate( Cheese( $price : price ),
$max : max( $price ),
$min : min( $price ),
$avg : average( $price ) )
then
 System.out.println($max+  +$min+  +$avg);
end


But it gives me some problems !!

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Multi-function-Accumulates-tp3867251p3867251.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Multi-function Accumulates

2012-03-29 Thread Hassan
Hi,

the problem is eclipse give some errors like:

[ERR 102] Line 156:8 mismatched input 'ACCUMULATE' expecting 'then' in
rule Max, min and average Regle1.drl
$price cannot be resolved to a variable
...etc

Even the results are correctly shown


-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Multi-function-Accumulates-tp3867251p3867406.html
Sent from the Drools: User forum mailing list archive at Nabble.com.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Multi-function Accumulates

2012-03-29 Thread Hassan
Ok it will be done soon :)

-
Youssef AZBAKH.
--
View this message in context: 
http://drools.46999.n3.nabble.com/Multi-function-Accumulates-tp3867251p3867846.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Slinding window !

2012-02-29 Thread Hassan
Hi Edson,

If I really understood, In the first case, the windows *are moving in time*
so all events found are activated, and are not retracted from the agenda
even after their duration.
so that:

*$a : Event1() over window:time(2s)* 

firs all events.

In the second case (with accumulate/collect ), these functions are applied
first in the moment of firing events in the agenda, and the sliding windows
is applied after so it will be applied *in one point in time*, therfore only
events occurring in the interval* ]DateOfFire-2s,DateOfFire]* will be
activated anf afer fired.

Please Edson tell me if this is exactly what the documentation means ??

--
View this message in context: 
http://drools.46999.n3.nabble.com/Slinding-window-tp3783772p3786723.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Slinding window !

2012-02-29 Thread Hassan
Hi Edson, 

If I really understood, In the first case, the windows are moving in time so
all events found are activated, and are not retracted from the agenda even
after their expiration. 
so that: 

$a : Event1() over window:time(2s)  

fires all events. 

In the second case (with accumulate/collect ), these functions are applied
in the moment of firing, so they will consider the last window before firing
events which is the interval *]DateOfFire-2s,DateOfFire]* therefore only
events occurring in this interval will be fired. 

Please Edson tell me if this is exactly what the documentation means ??

--
View this message in context: 
http://drools.46999.n3.nabble.com/Slinding-window-tp3783772p3786755.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Problem with events in thr futurs with realtime option !!

2012-02-28 Thread Hassan
Hi guys,

While trying to understand how slinding window work, I realize that all
exemples are given with accumulate or collect functions , I din't know
why ??

*$a : List() from collect(Event1() over window:time(2s) from entry-point
point) *
  // work


Bur why 

*$a : Event1() over window:time(2s) from entry-point point) * 


doesn't work ??!

Thanks, 
Youssef AZBAKH

--
View this message in context: 
http://drools.46999.n3.nabble.com/Problem-with-events-in-thr-futurs-with-realtime-option-tp3783769p3783769.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Slinding window !

2012-02-28 Thread Hassan
Hi guys, 

While trying to understand how slinding window work, I realize that all
exemples are given with accumulate or collect functions , I din't know
why ?? 

$a : List() from collect(Event1() over window:time(2s) from entry-point
point) 
  // work 


Bur why 

$a : Event1() over window:time(2s) from entry-point point)   


doesn't work ??! 

Thanks, 
Youssef AZBAKH

--
View this message in context: 
http://drools.46999.n3.nabble.com/Slinding-window-tp3783772p3783772.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hello,

It's clair that to work with thae events we have to put our  base
configuration into STREAM mode like this:

*/KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

config.setOption( EventProcessingOption.STREAM );/*

But in my code bellow I didn't use this mode and I didn't use Entry-points,
Although my events work very well !!

Help please !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/CLOUD-mode-Vs-Stream-Mode-tp3780295p3780295.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hello,

It's clair that to work with thae events we have to put our  base
configuration into STREAM mode like this:

*/KnowledgeBaseConfiguration config =
KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

config.setOption( EventProcessingOption.STREAM );/*

But in an exemple, I didn't use this mode and I didn't use Entry-points,
Although my events work very well !!

Help please !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/CLOUD-mode-Vs-Stream-Mode-tp3780297p3780297.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hi salaboy ,

Thank for your reply,

from the docs:

*/This mode does not impose any kind of additional requirements on facts. So
for instance:

There is no notion of time. No requirements clock synchronization.
There is no requirement on event ordering. The engine looks at the events as
an unnordered cloud against which the engine tries to match rules./*



So the engine can not known if this event is after another, for exemple,
Despite After work !! 

thanks !

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-CLOUD-mode-Vs-Stream-Mode-tp3780299p3780337.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hi,

Exactly ! But when I want to test if the sliding windows work in both
cases (with end without Stream Mode), It doesn't work !!
for exemple:
this is my rule

rule sliding windows
when
$a : Event1() over window:time(2s)
then
System.out.println(ok);   
end

these are mu events

Event1 ev1=new Event1((long)1,(long)2);  // the event will occur in 1s
and finish in 3s
Event1 ev2=new Event1((long)3,(long)4);  // the event will occur in 3s
and finish in 4s
session.insert(ev1);
session.insert(ev2);
clock.advanceTime(4, TimeUnit.SECONDS); // we are nom in 4s so only
event that happen in [2s,4s] have to fire -ev2-.
session.fireAllRules();


// But the probleme that, it gives me 2 ok so the 2 object are fired !!
I don't inderstand why ??



2012/2/27 salaboy [via Drools] ml-node+s46999n3780514...@n3.nabble.com:
 If you are not using sliding windows and you are not expecting a retraction
 of your not relevant events, it will work.
 Cheers

 On Mon, Feb 27, 2012 at 12:06 PM, Wolfgang Laun [hidden email] wrote:

 All events have a timestamp.

 -W



 On 27/02/2012, Hassan [hidden email] wrote:
  Hi salaboy ,
 
  Thank for your reply,
 
  from the docs:
 
  */This mode does not impose any kind of additional requirements on
  facts. So
  for instance:
 
  There is no notion of time. No requirements clock synchronization.
  There is no requirement on event ordering. The engine looks at the
  events as
  an unnordered cloud against which the engine tries to match rules./*
 
 
 
  So the engine can not known if this event is after another, for exemple,
  Despite After work !!
 
  thanks !
 
  --
  View this message in context:
 
  http://drools.46999.n3.nabble.com/rules-users-CLOUD-mode-Vs-Stream-Mode-tp3780299p3780337.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  [hidden email]

  https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
  - CTO @ http://www.plugtree.com
  - MyJourney @ http://salaboy.wordpress.com
  - Co-Founder @ http://www.jugargentina.org
  - Co-Founder @ http://www.jbug.com.ar

  - Salatino Salaboy Mauricio -


 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users


 
 If you reply to this email, your message will be added to the discussion
 below:
 http://drools.46999.n3.nabble.com/rules-users-CLOUD-mode-Vs-Stream-Mode-tp3780299p3780514.html
 To unsubscribe from [rules-users] CLOUD mode Vs Stream Mode., click here.
 NAML



-- 
Youssef AZBAKH
Elève ingénieur en 3ème année informatique.
Institut National de Statiqtique et d'Economie Appliquée (INSEA).


--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-CLOUD-mode-Vs-Stream-Mode-tp3780299p3780817.html
Sent from the Drools: User forum mailing list archive at Nabble.com.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
I wanna just rectify

Event1 ev1=new Event1((long)1000,(long)2000);  // occur in 1s and finishes
in 2s
Event1 ev2=new Event1((long)3000,(long)4000);  // occur in 3s and finishes
in 4s

thanks :)



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-CLOUD-mode-Vs-Stream-Mode-tp3780299p3780882.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] A problem in sliding windows.

2012-02-27 Thread Hassan
when I was testing the sliding windows, I was blocked becouse this concept
doesn't work for me, It's becouse of my misunderstanding of the concept, I
looking for the error which I do:


for exemple: 
== the rule:
*/

rule sliding windows 
when 
$a : Event1() over window:time(2s) 
then 
System.out.println(ok);   
end /*

== Events

Event1 ev1=new Event1((long)1000,(long)2000);  // the event will occur in 1s
and finish in 3s 
Event1 ev2=new Event1((long)3000,(long)4000);  // the event will occur in 3s
and finish in 4s 
session.insert(ev1); 
session.insert(ev2); 
clock.advanceTime(4, TimeUnit.SECONDS); // we are now in 4s so only event
that happen in [2s,4s] have 
 
session.fireAllRules(); // to fire -ev2-. 



// But the probleme that, it gives me 2 ok so the 2 object are fired !!  I
don't inderstand why ?? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/A-problem-in-sliding-windows-tp3781402p3781402.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] getStartTimestamp() and getEndTimestamp() give the same values ??!!

2012-02-24 Thread Hassan
Hello !

My problem is that the 2 methods getStartTimestamp() and getEndTimestamp() 
give me the same value 
I don't know why (the duration of any event is 0 !!)


Thank you very much :)

--
View this message in context: 
http://drools.46999.n3.nabble.com/getStartTimestamp-and-getEndTimestamp-give-the-same-values-tp3772788p3772788.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] getStartTimestamp() and getEndTimestamp() give the same values ??!!

2012-02-24 Thread Hassan
Thank you very much !!

yess you are right, becouse my declaration of the event didn't montionne the
duration attribute so my event is a point in time event.


if we add @duration(attr3) and the attr3 takes a value  0 so the 2methodes
won't give the same value.


Thank you again :)

--
View this message in context: 
http://drools.46999.n3.nabble.com/getStartTimestamp-and-getEndTimestamp-give-the-same-values-tp3772788p3772918.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] (no subject)

2012-02-24 Thread Hassan
Hi ,

First of all thank you very much for responding me,

Yes you're rights getEndTimestamp() == getStartTimestamp()+duration.

I thought that the when we give the attribute to timestamp, tha value of the
attribute will be token from the session clock.
BUT the real senario is that the StartTimestamp() retourne the value given
throught the attribute, that is like we specify the moment when the event
will occur.


I waste a lot of time in this point :( But I m progressing in Drools Fusion
:)

Thank you very much :)  

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-no-subject-tp3772684p3773092.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users