[rules-users] how to convert drl to dsl

Luis Silva lesilvav at gmail.com
Thu Aug 13 20:08:16 EDT 2009


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 <d.devendran at yahoo.com> 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090813/277b9a2d/attachment.html 


More information about the rules-users mailing list