use of org.drools.modelcompiler.builder.generator.AggregateKey in project drools by kiegroup.
the class PatternDSL method generatePatternIdentifierIfMissing.
private void generatePatternIdentifierIfMissing() {
if (pattern.getIdentifier() == null) {
final String generatedName = generateName("pattern_" + patternType.getSimpleName());
final String patternNameAggregated = findFirstInnerBinding(constraintDescrs, patternType).map(ib -> context.getAggregatePatternMap().putIfAbsent(new AggregateKey(ib, patternType), generatedName)).orElse(generatedName);
pattern.setIdentifier(GENERATED_VARIABLE_PREFIX + patternNameAggregated);
}
}
Aggregations