]
Luca Molteni updated DROOLS-5877:
---------------------------------
Sprint: 2020 Week 49-51 (from Nov 30)
Support MVEL BLiteral in the exec model
---------------------------------------
Key: DROOLS-5877
URL:
https://issues.redhat.com/browse/DROOLS-5877
Project: Drools
Issue Type: Bug
Components: executable model
Reporter: Luca Molteni
Assignee: Luca Molteni
Priority: Major
{code:java}
@Test
public void prova() {
final String str =
"global java.util.List list\n" +
"import " + Person.class.getCanonicalName() + ";" +
"rule R when\n" +
"$p1 : Person(age >= 18B)" +
"then\n" +
" System.out.println($p1);" +
"end\n";
KieSession ksession = getKieSession( str );
List<String> results = new ArrayList<>();
ksession.setGlobal("list", results);
ksession.insert( new Person( "Mark", 37 ) );
ksession.insert( new Person( "Edson", 35 ) );
ksession.insert( new Person( "Mario", 40 ) );
ksession.fireAllRules();
}{code}