Created
July 1, 2020 16:05
-
-
Save lucamolteni/d3f499aaa953880b7fcbb5e2a0b5c4de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface DecisionTable extends Expression { | |
| List<OutputClause> getOutput(); | |
| } | |
| public interface OutputClause extends DMNElement { | |
| } | |
| public interface Expression extends DMNElement { | |
| } | |
| public interface DMNElement extends DMNModelInstrumentedBase { | |
| } | |
| public interface DMNModelInstrumentedBase { | |
| DMNModelInstrumentedBase getParent(); | |
| void setParent(DMNModelInstrumentedBase parent); | |
| } | |
| @Test | |
| public void testParent() { | |
| String str = | |
| "import " + OutputClause.class.getCanonicalName() + "\n;" + | |
| "import " + DecisionTable.class.getCanonicalName() + "\n;" + | |
| "rule r\n" + | |
| "when\n" + | |
| " $oc : OutputClause( parent instanceof DecisionTable, parent.output.size > 1 )\n" + | |
| "then\n" + | |
| "end\n"; | |
| KieSession ksession = getKieSession( str ); | |
| ksession.fireAllRules(); | |
| assertTrue(true); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment