Can we do this with drools ?

View: New views
8 Messages — Rating Filter:   Alert me  

Can we do this with drools ?

by ferry97 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Can we do this with drools ?

by Mark Proctor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
https://lists.jboss.org/mailman/listinfo/rules-users

MVEL problem

by nheron :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
rules-users@...
https://lists.jboss.org/mailman/listinfo/rules-users

RE : MVEL problem

by nheron :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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: rules-users-bounces@... 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
rules-users@...
https://lists.jboss.org/mailman/listinfo/rules-users

DroolsRemoveRuleBug.zip (15K) Download Attachment

Re: Can we do this with drools ?

by ferry97 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Can we do this with drools ?

by ferry97 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Can we do this with drools ?

by Mark Proctor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
rules-users@...
https://lists.jboss.org/mailman/listinfo/rules-users


    

  


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

Re: Can we do this with drools ?

by Steven Williams-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <vri_97@...> 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
> rules-users@...
> 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
steven.williams@...
www.objectconsulting.com.au

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