Skip to content

Instantly share code, notes, and snippets.

@lucamolteni
Last active January 28, 2020 16:13
Show Gist options
  • Select an option

  • Save lucamolteni/91f39d89bdce9c505be082d90a693484 to your computer and use it in GitHub Desktop.

Select an option

Save lucamolteni/91f39d89bdce9c505be082d90a693484 to your computer and use it in GitHub Desktop.
org.drools.model.Rule rule = D.rule("org.acme.test_generateModel_kjararchetype",
"will execute per each Measurement having ID color").attribute(Rule.Attribute.NO_LOOP,
true)
.build(D.pattern(var_GENERATED_$pattern_Measurement$1$).expr("819AEEBB391F281267C56FEF6FFF8D0E",
org.acme.test_generateModel_kjararchetype.LambdaPredicate8A083A1BFD61A2FB8590738F7DC4ADC3.INSTANCE,
D.alphaIndexedBy(java.lang.String.class,
org.drools.model.Index.ConstraintType.EQUAL,
DomainClassesMetadatae850f50b3748486d87589b6ddfaf826e.org_acme_test_generateModel_kjararchetype_Measurement_Metadata_INSTANCE.getPropertyIndex("id"),
org.acme.test_generateModel_kjararchetype.LambdaExtractor5FA08D53E158A9E97DD93C98849556A8.INSTANCE,
"color"),
D.reactOn("id")).bind(var_$colorVal,
(org.acme.test_generateModel_kjararchetype.Measurement _this) -> _this.getVal(),
D.reactOn("val")),
D.on(var_$colorVal,
var_controlSet).execute(org.acme.test_generateModel_kjararchetype.LambdaConsequence9394DEA8C6CA6BC4D84148825E2C5035.INSTANCE));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment