Drools Expert - mvel - LHS - advanced part 3

From Training Material
Jump to navigation Jump to search

Exercise 1

What this will return

rule "Rule 1"
when
        accumulate ($e : Emp(), s: sum($e.sal))
then    
        System.out.println(s);
end

rule "Rule 2"
when
	eval(true)
then    
	insert( new Emp(5839, "ANBO", "UNIVERSE PRESIDENT", 0, 1981, 50000, 10))
end