Created
December 22, 2015 15:13
-
-
Save DuncanDoyle/28923c42bbaa96758d0e to your computer and use it in GitHub Desktop.
This file contains 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
rule "Average weight of last 5 bags that entered Sorting stage." | |
enabled true | |
when | |
$number: Number() from accumulate ($b:BagScannedEvent(location == Location.SORTING) over window:length(5), average($b.getWeight())) | |
then | |
System.out.println("\nAverage weight of last 5 bags: " + $number + ". CurrentTime: " + drools.getWorkingMemory().getSessionClock().getCurrentTime()); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment