Skip to content

Instantly share code, notes, and snippets.

@lucamolteni
Created July 1, 2020 16:05
Show Gist options
  • Select an option

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

Select an option

Save lucamolteni/d3f499aaa953880b7fcbb5e2a0b5c4de to your computer and use it in GitHub Desktop.
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