-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
7.66.0.Final
-
None
-
NEW
-
NEW
Currently, RhsParser.processInsert() doesn't parse a constructor with arguments so results in null insertedProperties, hence, no link or UNKNOWN link. (It can parse setters after the creation: See BasicGraphTest.testInsertRelation())
@Test public void testInsertConstuctorWithArguments() { String str = "package mypkg;\n" + "import " + Person.class.getCanonicalName() + ";" + "rule R1 when\n" + " $t : String(this == \"Start\")\n" + "then\n" + " insert(new Person(\"Mario\", 40));\n" + "end\n" + "rule R2 when\n" + " $p : Person(age > 15)\n" + "then\n" + "end\n"; runRule(str, "Start"); AnalysisModel analysisModel = new ModelBuilder().build(str); System.out.println(analysisModel); ModelToGraphConverter converter = new ModelToGraphConverter(); Graph graph = converter.toGraph(analysisModel); assertLink(graph, "mypkg.R1", "mypkg.R2", ReactivityType.POSITIVE); }
Rule{pkg='mypkg', name='R1', resource='r0.drl', ... rhs=RightHandSide{actions=, InsertAction{actionClass=class org.drools.impact.analysis.integrationtests.domain.Person, insertedProperties=[]}}}
This looks similar to DROOLS-6711 but not directly related.