fix NPE from rule timers 53/66753/2
authorJim Hahn <jrh3@att.com>
Fri, 14 Sep 2018 20:30:51 +0000 (16:30 -0400)
committerJim Hahn <jrh3@att.com>
Fri, 14 Sep 2018 21:17:53 +0000 (17:17 -0400)
commit0bd7ab17674ca4eee396dfe8df3a769632a6e733
treeff7a2e7b7c51783a5779caa21fb6a221dab3c4f5
parent97956f188f4a8d92d734bf491d5e15a78a03459f
fix NPE from rule timers

This problem occurs in rules that have "timer(expr)" expressions before
the "when" clause.  If a working memory element, other than the timer
object, appears in the "when" clause and is updated BY ANY RULE, then
an NPE is thrown.  The solution is to segregate the objects so that
rules having "timer(expr)" expressions only refer to one object, the
XxxTimer object.  In particular, the rule simply sets an "expired" flag
in the XxxTimer object and then all other rules check that flag, rather
than having their own "timer(expr)" expressions.

Corrected comment associated with rule TIMER.FIRED.

Change-Id: I9e6c20ee46af99234daee8ece4862edbd41ba714
Issue-ID: POLICY-1106
Signed-off-by: Jim Hahn <jrh3@att.com>
controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl