Drools Expert - mvel - LHS - advanced part 3

From Training Material
Revision as of 06:54, 24 August 2016 by Bernard Szlachta (talk | contribs) (→‎Exercise 1)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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