[rules-users] Drools Rules : Getting Started Tutorial Link Required

2013-10-22 Thread Zahid Ahmed
Hi,

I am new to Drools Rules and using Drools-5.5.0.Final in my project. I need to 
know , how to setup JBPM runtime engine to perform rule evaluation for 
BusinessRule Nodes. Is there any separate server required for it or can it be 
done with in JBPM runtime. I need a tutorial on setup/configurations and a 
tutorial on rule writing, model uploading. I need to know that how to pass fact 
dynamically at runtime when a Business Rule Node is reached.

Thanks and Best Regards,

Zahid Ahmed
Senior Software Engineer



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] multiple expiration definitions for the same face type in different drl files

2013-10-22 Thread Elran Dvir
Hi all,

I am examining Drools Fusion in stream mode.

This is my case:
I have several drl files.
Each drl file contains one rule.
Each drl file is built to a knowledge package.
Each drl file contains declaration of the same fact (referencing to a imported 
class defined outside of the drl). The fact's role is of course event.

Can I define different expiration (@expires) for the fact in each drl?
Is expiration relevant only to the same drl?
Is the answer different if the fact is created in the rule's RHS or if it 
inserted to the session's working memory outside of the drl?

Thanks.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] threw error java.lang.ClassCastException: org.drools.reteoo.FromNode$FromMemory cannot be cast to org.drools.reteoo.BetaMemory

2013-10-22 Thread krkry
Hi,

I am facing similar issue  when I am trying to execute on updated rule .
Below is the exception I am getting .
java.lang.ClassCastException: org.drools.reteoo.FromNode$FromMemory cannot
be cast to org.drools.reteoo.RightInputAdapterNode$RIAMemory

Drools version 5.5.0.Final.

Is there any update on this issue.

Regards
Ravi Kishore



--
View this message in context: 
http://drools.46999.n3.nabble.com/threw-error-java-lang-ClassCastException-org-drools-reteoo-FromNode-FromMemory-cannot-be-cast-to-orgy-tp4023497p4026454.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] threw error java.lang.ClassCastException: org.drools.reteoo.FromNode$FromMemory cannot be cast to org.drools.reteoo.BetaMemory

2013-10-22 Thread Davide Sottara
Can you reproduce it in a unit test?
https://issues.jboss.org/browse/DROOLS-215

This is a very serious isse, but any attempt to reproduce it so far have
failed
Thanks
Davide


On 10/22/2013 06:22 AM, krkry wrote:
 Hi,

 I am facing similar issue  when I am trying to execute on updated rule .
 Below is the exception I am getting .
 java.lang.ClassCastException: org.drools.reteoo.FromNode$FromMemory cannot
 be cast to org.drools.reteoo.RightInputAdapterNode$RIAMemory

 Drools version 5.5.0.Final.

 Is there any update on this issue.

 Regards
 Ravi Kishore



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/threw-error-java-lang-ClassCastException-org-drools-reteoo-FromNode-FromMemory-cannot-be-cast-to-orgy-tp4023497p4026454.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Free Drools jBPM Workshops in London

2013-10-22 Thread Mauricio Salatino
Hi everyone, tomorrow we (Michael Anstis)  are doing a couple of workshops
about the new Drools and jBPM 6 platform. Here you can find more details
about the event:

http://salaboy.com/2013/10/04/drools-and-jbpm-6-workshops-2324-october-london/

There are very few seats available, so get in touch if you want to secure
your place.



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

 - Salatino Salaboy Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Free Drools jBPM Workshops in London

2013-10-22 Thread Genene Geda
Hi, is there any chance to attend this workshop online ? Thanks,

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Tuesday, October 22, 2013 8:49 AM
To: Rules Users List; Rules Dev List
Subject: [rules-users] Free Drools  jBPM Workshops in London

Hi everyone, tomorrow we (Michael Anstis)  are doing a couple of workshops 
about the new Drools and jBPM 6 platform. Here you can find more details about 
the event:

http://salaboy.com/2013/10/04/drools-and-jbpm-6-workshops-2324-october-london/

There are very few seats available, so get in touch if you want to secure your 
place.



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

 - Salatino Salaboy Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Free Drools jBPM Workshops in London

2013-10-22 Thread Mauricio Salatino
A community member will be trying to broadcast the workshop, so tomorrow we
will be sharing the stream URL, but it's not guaranteed to work.

Cheers


On Tue, Oct 22, 2013 at 3:58 PM, Genene Geda gg...@ghx.com wrote:

  Hi, is there any chance to attend this workshop online ? Thanks,

 ** **

 *From:* rules-users-boun...@lists.jboss.org [mailto:
 rules-users-boun...@lists.jboss.org] *On Behalf Of *Mauricio Salatino
 *Sent:* Tuesday, October 22, 2013 8:49 AM
 *To:* Rules Users List; Rules Dev List
 *Subject:* [rules-users] Free Drools  jBPM Workshops in London

 ** **

 Hi everyone, tomorrow we (Michael Anstis)  are doing a couple of workshops
 about the new Drools and jBPM 6 platform. Here you can find more details
 about the event:

 ** **


 http://salaboy.com/2013/10/04/drools-and-jbpm-6-workshops-2324-october-london/
 

 ** **

 There are very few seats available, so get in touch if you want to secure
 your place.

 ** **


 

 ** **

 -- 

  - MyJourney @ http://salaboy.com http://salaboy.wordpress.com

  - Co-Founder @ http://www.jugargentina.org
  - Co-Founder @ http://www.jbug.com.ar

  - Salatino Salaboy Mauricio -

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




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

 - Salatino Salaboy Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Help on writing a rule

2013-10-22 Thread calcacuervo
Hi Guys. I have one quesiton on how could I implement my rule.
I have this rule:
when
t : PriceChange() over window:length(1)
signal : Signal( id == 1234 ) over window:length(1)
not OrderCreated( id == 1234 ) over window:time (1m)
then
insert(new OrderCreated(1234));

Basically, when there is some signal and some price change, create a new
order if  there has no been any other order in the last minute.
But this sometimes is being fired twice:
12:31:01,121 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
(camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
rule:ertetr activationId:ertetr [393, 392, 0] declarations: t=PriceChange
[](392); signal=Signal@1413ddef(393)
12:31:01,160 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
(camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
rule:ertetr activationId:ertetr [393, 394, 0] declarations: t=PriceChange
[](394); signal=Signal@1413ddef(393)

I think that, when the 1m window have passed, it creates twice the
activations, as I have not called fire all rules yet. Does is make sense? Do
you have some idea on how could I implement this rule? when there has been
some price change and some signal, and I did not create a new order in the
last minute, just create a new order.

Thanks in advance!

Demian



--
View this message in context: 
http://drools.46999.n3.nabble.com/Help-on-writing-a-rule-tp4026461.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] Help on writing a rule

2013-10-22 Thread Davide Sottara
Am I wrong or do you have two PriceChange events - 392 and 394 ?
If so, you can expect two activations.. when you fire al rules, one of
the two
will insert the OrderCreated, which in turn will cancel the other
 
On 10/22/2013 01:34 PM, calcacuervo wrote:
 Hi Guys. I have one quesiton on how could I implement my rule.
 I have this rule:
 when
   t : PriceChange() over window:length(1)
   signal : Signal( id == 1234 ) over window:length(1)
   not OrderCreated( id == 1234 ) over window:time (1m)
   then
 insert(new OrderCreated(1234));

 Basically, when there is some signal and some price change, create a new
 order if  there has no been any other order in the last minute.
 But this sometimes is being fired twice:
 12:31:01,121 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
 (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
 rule:ertetr activationId:ertetr [393, 392, 0] declarations: t=PriceChange
 [](392); signal=Signal@1413ddef(393)
 12:31:01,160 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
 (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
 rule:ertetr activationId:ertetr [393, 394, 0] declarations: t=PriceChange
 [](394); signal=Signal@1413ddef(393)

 I think that, when the 1m window have passed, it creates twice the
 activations, as I have not called fire all rules yet. Does is make sense? Do
 you have some idea on how could I implement this rule? when there has been
 some price change and some signal, and I did not create a new order in the
 last minute, just create a new order.

 Thanks in advance!

 Demian



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Help-on-writing-a-rule-tp4026461.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Help on writing a rule

2013-10-22 Thread Mauricio Salatino
Just curious here, why do you have this - signal : Signal( id == 1234 )
over window:length(1)?


On Tue, Oct 22, 2013 at 9:40 PM, Davide Sottara dso...@gmail.com wrote:

 Am I wrong or do you have two PriceChange events - 392 and 394 ?
 If so, you can expect two activations.. when you fire al rules, one of
 the two
 will insert the OrderCreated, which in turn will cancel the other

 On 10/22/2013 01:34 PM, calcacuervo wrote:
  Hi Guys. I have one quesiton on how could I implement my rule.
  I have this rule:
  when
t : PriceChange() over window:length(1)
signal : Signal( id == 1234 ) over window:length(1)
not OrderCreated( id == 1234 ) over window:time (1m)
then
  insert(new OrderCreated(1234));
 
  Basically, when there is some signal and some price change, create a new
  order if  there has no been any other order in the last minute.
  But this sometimes is being fired twice:
  12:31:01,121 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 392, 0] declarations: t=PriceChange
  [](392); signal=Signal@1413ddef(393)
  12:31:01,160 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 394, 0] declarations: t=PriceChange
  [](394); signal=Signal@1413ddef(393)
 
  I think that, when the 1m window have passed, it creates twice the
  activations, as I have not called fire all rules yet. Does is make
 sense? Do
  you have some idea on how could I implement this rule? when there has
 been
  some price change and some signal, and I did not create a new order in
 the
  last minute, just create a new order.
 
  Thanks in advance!
 
  Demian
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Help-on-writing-a-rule-tp4026461.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 mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




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

 - Salatino Salaboy Mauricio -
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Help on writing a rule

2013-10-22 Thread Demian Calcaprina
Yes! I receive many price change events.. but, as I am using window length
= 1, I would expect to have the activation cancelled for the previous one?

I am not sure how to express this:
when there is some price change, and some signal, and there has not been
any order over the last minute, then place an order

The price change and signal are like existence facts.. If there is some
price change change.. if there is some signal ...

Would this be another way to achieve what I am trying to do?

Thanks,

Demian

PS: This is a simple rule, but then, the idea is to have more complex
rules.. like, if there has been 10 signals in the last time, place an
order, etc.


On Tue, Oct 22, 2013 at 5:40 PM, Davide Sottara dso...@gmail.com wrote:

 Am I wrong or do you have two PriceChange events - 392 and 394 ?
 If so, you can expect two activations.. when you fire al rules, one of
 the two
 will insert the OrderCreated, which in turn will cancel the other

 On 10/22/2013 01:34 PM, calcacuervo wrote:
  Hi Guys. I have one quesiton on how could I implement my rule.
  I have this rule:
  when
t : PriceChange() over window:length(1)
signal : Signal( id == 1234 ) over window:length(1)
not OrderCreated( id == 1234 ) over window:time (1m)
then
  insert(new OrderCreated(1234));
 
  Basically, when there is some signal and some price change, create a new
  order if  there has no been any other order in the last minute.
  But this sometimes is being fired twice:
  12:31:01,121 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 392, 0] declarations: t=PriceChange
  [](392); signal=Signal@1413ddef(393)
  12:31:01,160 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 394, 0] declarations: t=PriceChange
  [](394); signal=Signal@1413ddef(393)
 
  I think that, when the 1m window have passed, it creates twice the
  activations, as I have not called fire all rules yet. Does is make
 sense? Do
  you have some idea on how could I implement this rule? when there has
 been
  some price change and some signal, and I did not create a new order in
 the
  last minute, just create a new order.
 
  Thanks in advance!
 
  Demian
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Help-on-writing-a-rule-tp4026461.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 mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Help on writing a rule

2013-10-22 Thread Demian Calcaprina
Mauricio,

In fact, I used to have this and the price change without window:length..
but
when
t : PriceChange()
signal : Signal( id == 1234 )
not OrderCreated( id == 1234 ) over window:time (1m)

But this will cause more and more duplicates orders (and it have sense!). I
added the length window to 1, as I would only like to create an order if
there is some signal in the window, it can place an order..


On Tue, Oct 22, 2013 at 5:42 PM, Mauricio Salatino sala...@gmail.comwrote:

 Just curious here, why do you have this - signal : Signal( id == 1234
 ) over window:length(1)?


 On Tue, Oct 22, 2013 at 9:40 PM, Davide Sottara dso...@gmail.com wrote:

 Am I wrong or do you have two PriceChange events - 392 and 394 ?
 If so, you can expect two activations.. when you fire al rules, one of
 the two
 will insert the OrderCreated, which in turn will cancel the other

 On 10/22/2013 01:34 PM, calcacuervo wrote:
  Hi Guys. I have one quesiton on how could I implement my rule.
  I have this rule:
  when
t : PriceChange() over window:length(1)
signal : Signal( id == 1234 ) over window:length(1)
not OrderCreated( id == 1234 ) over window:time (1m)
then
  insert(new OrderCreated(1234));
 
  Basically, when there is some signal and some price change, create a new
  order if  there has no been any other order in the last minute.
  But this sometimes is being fired twice:
  12:31:01,121 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 392, 0] declarations:
 t=PriceChange
  [](392); signal=Signal@1413ddef(393)
  12:31:01,160 INFO  [org.drools.audit.WorkingMemoryConsoleLogger] (Camel
  (camel-1) thread #4 - JmsConsumer[marketDataTopic]) ACTIVATION CREATED
  rule:ertetr activationId:ertetr [393, 394, 0] declarations:
 t=PriceChange
  [](394); signal=Signal@1413ddef(393)
 
  I think that, when the 1m window have passed, it creates twice the
  activations, as I have not called fire all rules yet. Does is make
 sense? Do
  you have some idea on how could I implement this rule? when there has
 been
  some price change and some signal, and I did not create a new order in
 the
  last minute, just create a new order.
 
  Thanks in advance!
 
  Demian
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Help-on-writing-a-rule-tp4026461.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 mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




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

  - Salatino Salaboy Mauricio -

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Why no rule will be fired if class name and attribute name is same

2013-10-22 Thread richie
Why no rule will be fired if class name and attribute name is same?

Following is my drl file content:
package test

declare input
input : String
end

declare output
taskname : String
end

rule Rule A
dialect mvel
salience 0
no-loop
when
$input:input(input == a)
$output:output()
then
modify ($output) {taskname = Hello};
end

But if I created a fact object of input and set attribute input to a, it
did not fire any rules.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Why-no-rule-will-be-fired-if-class-name-and-attribute-name-is-same-tp4026466.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