I am just trying to learn DSL and have immediately run into issues.

I have a simple DSL in the file named XEasyApp.dsl :
    *[condition][]{value} is an invalid Boolean={value} not
in("T","t","1","F","f","0")*

and then a simple DSLR in the file named Test.dslr:
*    package com.onfs.easyapp.rules
    import com.onfs.easyapp.EasyApp
    expander XEasyApp.dsl

    rule "EasyApp Insured is Citizen Validation"
        when
            $ea : EasyApp(priIns_eaInsuredIsCitizenInd is an invalid
Boolean)
        then
            $ea.addError(drools.getRule().getName());
    end*

I get the expected expansion in the DRL Viewer:
    package com.onfs.easyapp.rules
    import com.onfs.easyapp.EasyApp

    rule "EasyApp Insured is Citizen Validation"
        when
            $ea : EasyApp(priIns_eaInsuredIsCitizenInd not
in("T","t","1","F","f","0"))
        then

            $ea.addError(drools.getRule().getName());
    end

There are no Red X's when I view Test.dslr in the editor, however a problem
shows up in the Problems area below:
*Description    Resource    Path    Location    Type
[13] Unable to expand:         $ea.addError(drools.getRule().getName());
    Test.dslr    /TermXpressRules/src/main/rules    Unknown    Drools Error*
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to