Re: [rules-users] how to convert drl to dsl

2009-08-13 Thread drools

thanks Isilva, i will try by using this


lsilva wrote:
> 
> We use a SQL like statements for our dsl. For example:
> 
> DRL FORM:
> rule 'Rank accomodation name'
> salience 90
> when
> $accBase: AccomodationBase()
> not AccomodationBase( eval( $accBase instanceof AccomodationRank) )
> $accRank: AccomodationRank( level == $accBase.level, description ==
> $accBase.description )
> then
> $accRank.setScore($accRank.getScore()+1);end
> 
> DSL FORM:
> when
>Select [AccomodationBase]
>Not [AccomodationBase] is kind of [AccomodationRank]
>Select [AccomodationRank] where [level] = [AccomodationBase][level] and
> [description] = [AccomodationBase][description]
> then
>Update [AccomodationRank] set [score] = [score] + 1
> end
> 
> 
> 
> 
> On Thu, Aug 13, 2009 at 11:09 AM, drools  wrote:
> 
>>
>> hi all, can any one help me how can convert drl to dsl for drools,let say
>> for
>> the following code what will be the dsl,
>>
>> rule 'Rank accomodation name'
>> salience 90
>> when
>> $accBase: AccomodationBase()
>> not AccomodationBase( eval( $accBase instanceof AccomodationRank) )
>> $accRank: AccomodationRank( level == $accBase.level, description ==
>> $accBase.description )
>> then
>> $accRank.setScore($accRank.getScore()+1);
>>
>> end
>>
>> thanks
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-convert-drl-to-dsl-tp24955345p24955345.html
>> Sent from the drools - user mailing list archive at Nabble.com.
>>
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
> 
> 
> 
> -- 
> Luis Enrique Silva Valdivieso
> Cel. 00 51 1 991546707
> Casa 00 51 1 4476616
> 
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-convert-drl-to-dsl-tp24955345p24964587.html
Sent from the drools - user 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] how to convert drl to dsl

2009-08-13 Thread Luis Silva
We use a SQL like statements for our dsl. For example:

DRL FORM:
rule 'Rank accomodation name'
salience 90
when
$accBase: AccomodationBase()
not AccomodationBase( eval( $accBase instanceof AccomodationRank) )
$accRank: AccomodationRank( level == $accBase.level, description ==
$accBase.description )
then
$accRank.setScore($accRank.getScore()+1);end

DSL FORM:
when
   Select [AccomodationBase]
   Not [AccomodationBase] is kind of [AccomodationRank]
   Select [AccomodationRank] where [level] = [AccomodationBase][level] and
[description] = [AccomodationBase][description]
then
   Update [AccomodationRank] set [score] = [score] + 1
end




On Thu, Aug 13, 2009 at 11:09 AM, drools  wrote:

>
> hi all, can any one help me how can convert drl to dsl for drools,let say
> for
> the following code what will be the dsl,
>
> rule 'Rank accomodation name'
> salience 90
> when
> $accBase: AccomodationBase()
> not AccomodationBase( eval( $accBase instanceof AccomodationRank) )
> $accRank: AccomodationRank( level == $accBase.level, description ==
> $accBase.description )
> then
> $accRank.setScore($accRank.getScore()+1);
>
> end
>
> thanks
> --
> View this message in context:
> http://www.nabble.com/how-to-convert-drl-to-dsl-tp24955345p24955345.html
> Sent from the drools - user mailing list archive at Nabble.com.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Luis Enrique Silva Valdivieso
Cel. 00 51 1 991546707
Casa 00 51 1 4476616
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] how to convert drl to dsl

2009-08-13 Thread drools

hi all, can any one help me how can convert drl to dsl for drools,let say for
the following code what will be the dsl, 

rule 'Rank accomodation name' 
salience 90 
when 
 $accBase: AccomodationBase() 
 not AccomodationBase( eval( $accBase instanceof AccomodationRank) ) 
 $accRank: AccomodationRank( level == $accBase.level, description ==
$accBase.description ) 
then 
 $accRank.setScore($accRank.getScore()+1); 

end 

thanks
-- 
View this message in context: 
http://www.nabble.com/how-to-convert-drl-to-dsl-tp24955345p24955345.html
Sent from the drools - user mailing list archive at Nabble.com.

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