]
Toshiya Kobayashi updated DROOLS-5107:
--------------------------------------
Story Points: 3
A rule always fires with executable model for a constraint which has
extra parentheses
--------------------------------------------------------------------------------------
Key: DROOLS-5107
URL:
https://issues.redhat.com/browse/DROOLS-5107
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.33.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
Priority: Major
When you have a constraint with extra parentheses,
{noformat}
$p : Person((age > 30))
{noformat}
executable-model generates a pattern without a constraint expr method so it always
fires.
{code:java}
public static org.drools.model.Rule rule_R() {
final org.drools.model.Variable<org.drools.modelcompiler.domain.Person>
var_$p = D.declarationOf(org.drools.modelcompiler.domain.Person.class,
DomainClassesMetadataFBDA1ED637C8B60C741C0BDB502EB8F0.org_drools_modelcompiler_domain_Person_Metadata_INSTANCE,
"$p");
org.drools.model.Rule rule = D.rule("R").build(D.pattern(var_$p),
D.execute(() -> {
{
}
}));
return rule;
}
{code}