java - Regular expression in Drools -
i keep getting compile errors when try write rules.
i trying translate condition drools
if(model.type.series != null && model.type.series.name.mathes(".*fanr.*") || model.type.series.name.matches(".*sana.*")) //do something....
this have...
rule "rule 01" salience 0 when m : model(type.series != null, type.series.name.matches(".*fanr.*") || type.series.name.matches(".*sana.*") : result(state == result.good ) a.setstate(result.bad); .... end
what trying use regular expression match part of string 'name' string type. fair new drools don't see can cause problems, appreciated
use correct drools syntax, according matches
operator, described in drools manual.
rule fanrorsana when $n: model($v: type.series.name matches ".*(fanr|sana).*")
and can use power of regular expressions testing alternatives.
Comments
Post a Comment