Can we do this with drools ?

8 messages Options
Embed this post
Permalink
ferry97

Can we do this with drools ?

Reply Threaded More More options
Print post
Permalink
Hi,
I don't know how to ask this in words.
But can we do something like :

rule "define trx type"
when
   Transaction(code == ${type1.code")
then
   doSomething ....

So, we define the type.code in a properties file.
Thanks
Mark Proctor

Re: Can we do this with drools ?

Reply Threaded More More options
Print post
Permalink
ferry97 wrote:
> Hi,
> I don't know how to ask this in words.
> But can we do something like :
>
> rule "define trx type"
> when
>    Transaction(code == ${type1.code")
>  
sorry no. But it's a nice idea, maybe submit a patch? You could probably
do this yourself already if you use MVEL templating as a pre-parser.
> then
>    doSomething ....
>
> So, we define the type.code in a properties file.
> Thanks
>  

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

MVEL problem

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
MVEL problem

Hello,
I took the latest 4.0.x version and did everything needed to build the solution but
1)
When using maven, I always have the same errors in those 2 tests :

  testString(org.drools.base.mvel.MVELCalendarCoercionTest)
  testString(org.drools.base.mvel.MVELDateCoercionTest)

2)
I skip the test and build everything
then I import the necessary project into eclipse 3.3 and from the plug-in I start a new eclipse
I am now in a fresh eclipse with the latest drools 4.0.x
from there, I import the code for my loyalty system.
and I have the following error :

Severity and Description        Path    Resource        Location        Creation Time   Id
org/mvel/integration/impl/LocalVariableResolverFactory  ConnecteurCaisse/src/fr/cora/moteurfidelite/drools/rules/constant       INPUT_RF_REMISECHOISIE.drl      Unknown 1206358379130   11
and the drl content is :

#created on: 15 nov. 2007
package fr.cora.moteurfidelite.drools.rules.constant
#list any import classes here.
import fr.cora.moteurfidelite.fid.pojo.impl.TicketCaisse;
#declare any global variables here
rule "Start RuleFlow Remise Choisie"
        when
        t : TicketCaisse(  )
        then
                drools.getWorkingMemory().startProcess(
                        "remisechoisie");                      
end

Here in fact, each time a TicketCaisse is asserted, a rule flow is started.

What is wrong ?
Thanks
Nicolas Heron





and the


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

RE : MVEL problem

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
RE : [rules-users] MVEL problem

Hello again,
here a small project export (which I used to test the dynamic add/remove rules ) that gets the same error message

Regards
Nicolas Heron


-------- Message d'origine--------
De: [hidden email] de la part de Héron Nicolas
Date: lun. 24/03/2008 13:05
À: Rules Users List
Objet : [rules-users] MVEL problem

Hello,
I took the latest 4.0.x version and did everything needed to build the solution but
1)
When using maven, I always have the same errors in those 2 tests :

  testString(org.drools.base.mvel.MVELCalendarCoercionTest)
  testString(org.drools.base.mvel.MVELDateCoercionTest)

2)
I skip the test and build everything
then I import the necessary project into eclipse 3.3 and from the plug-in I start a new eclipse
I am now in a fresh eclipse with the latest drools 4.0.x
from there, I import the code for my loyalty system.
and I have the following error :

Severity and Description        Path    Resource        Location        Creation Time   Id
org/mvel/integration/impl/LocalVariableResolverFactory  ConnecteurCaisse/src/fr/cora/moteurfidelite/drools/rules/constant       INPUT_RF_REMISECHOISIE.drl      Unknown 1206358379130   11
and the drl content is :

#created on: 15 nov. 2007
package fr.cora.moteurfidelite.drools.rules.constant
#list any import classes here.
import fr.cora.moteurfidelite.fid.pojo.impl.TicketCaisse;
#declare any global variables here
rule "Start RuleFlow Remise Choisie"
        when
        t : TicketCaisse(  )
        then
                drools.getWorkingMemory().startProcess(
                        "remisechoisie");                      
end

Here in fact, each time a TicketCaisse is asserted, a rule flow is started.

What is wrong ?
Thanks
Nicolas Heron





and the





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

DroolsRemoveRuleBug.zip (15K) Download Attachment
ferry97

Re: Can we do this with drools ?

Reply Threaded More More options
Print post
Permalink
In reply to this post by ferry97
Thanks Mark for the info.
Could you show me how to do it using mvel ? or refer me a link that explaining all this ?
ferry97

Re: Can we do this with drools ?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Mark Proctor
Thanks Mark for the info.
Could you show me how to do it using mvel ? or refer me a link that explaining all this ?


Mark Proctor wrote:
ferry97 wrote:
> Hi,
> I don't know how to ask this in words.
> But can we do something like :
>
> rule "define trx type"
> when
>    Transaction(code == ${type1.code")
>  
sorry no. But it's a nice idea, maybe submit a patch? You could probably
do this yourself already if you use MVEL templating as a pre-parser.
> then
>    doSomething ....
>
> So, we define the type.code in a properties file.
> Thanks
>  

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Mark Proctor

Re: Can we do this with drools ?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
ferry97 wrote:
Thanks Mark for the info.
Could you show me how to do it using mvel ? or refer me a link that
explaining all this ? 
  
http://docs.codehaus.org/display/MVEL/Templating+Guide


Mark Proctor wrote:
  
ferry97 wrote:
    
Hi,
I don't know how to ask this in words.
But can we do something like :

rule "define trx type"
when
   Transaction(code == ${type1.code")
  
      
sorry no. But it's a nice idea, maybe submit a patch? You could probably 
do this yourself already if you use MVEL templating as a pre-parser.
    
then
   doSomething ....

So, we define the type.code in a properties file.
Thanks
  
      
_______________________________________________
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
Steven Williams-5

Re: Can we do this with drools ?

Reply Threaded More More options
Print post
Permalink
In reply to this post by ferry97
There are some undocumented classes in drools-decisiontables that should let you do this. Have a look at DataProviderCompilerIntegrationTest.java

cheers
Steve

On Tue, Mar 25, 2008 at 12:03 PM, ferry97 <[hidden email]> wrote:

Thanks Mark for the info.
Could you show me how to do it using mvel ? or refer me a link that
explaining all this ?



Mark Proctor wrote:
>
> ferry97 wrote:
>> Hi,
>> I don't know how to ask this in words.
>> But can we do something like :
>>
>> rule "define trx type"
>> when
>>    Transaction(code == ${type1.code")
>>
> sorry no. But it's a nice idea, maybe submit a patch? You could probably
> do this yourself already if you use MVEL templating as a pre-parser.
>> then
>>    doSomething ....
>>
>> So, we define the type.code in a properties file.
>> Thanks
>>
>
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>

--
View this message in context: http://www.nabble.com/Can-we-do-this-with-drools---tp16244282p16266150.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________



--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[hidden email]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users