Drools 语法错误 'mismatched input '。'在规则'

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

我是 drools 的新手,我在 when 子句的第二行收到一个错误

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

我建议阅读 Drools 文档。这太棒了,涵盖了所有主题的深度。

您的规则抛出错误的原因是您的语法完全错误。

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