Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Drools syntax error 'mismatched input '.' in rule'

I am new to drools and am receiving an error on the second line of the when clause

rule "grievancesMap_10"
    when
        $grievances:GrievanceDTO($grievances.getCategory().equals("NA"))
        $grievances.getSubcategory().equals("Access/Availability")
        $grievances.getSubIssue().equals("NA")
        $grievances.getIssueReason().equals("NA")
        $grievances.getProviderAccessType().equals("NA")
        $grievances.getSubcareType().equals("NA")
    then
        $grievances.setServiceType("Timely Access");
end

mismatched input ‘.’ in rule

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I suggest reading the Drools documentation. It’s fantastic and covers all topics in depth.

The reason your rule is throwing errors is because your syntax is completely wrong.

rule "grievancesMap_10"
when
  $grievances: GrievanceDTO( category == "NA",
                             subcategory == "Access/Availability",
                             subIssue == "NA",
                             issueReason == "NA",
                             providerAccessType == "NA",
                             subcareType == "NA")
then
  $grievances.setServiceType("Timely Access");
end
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading