[rules-users] Guvnor only: NullPointerException AfterEvaluator.evaluateCachedRight

kappert kappert at hotmail.com
Tue Jan 8 08:14:20 EST 2013


We were able to narrow it down a bit further: It is sufficient to remove this
part of the rule to make the problem go away:

    *, this after[0, 2m] $tk1*

In the meantime I have also used "New Declarative Model" to declare our
events in Guvnor. Now the events are available in the guided rule editor.
But the additional declarative model did not solve the NullPointerException.
Of course, the event declarations have always been in the rules file that
was pushed to Guvnor from Eclipse.

Am I right in assuming that the declarative model in Guvnor is not required
for execution, but only for guided rule editing?

Having narrowed down the problem to the above time restriction clause: Does
anybody have an idea what could cause the NPE? Should we state the rule
differently?


rule "Kundenbelohnung"
    when
        $tk1 : TicketKaufEvent( $k : kunde )
        $tk2 : TicketKaufEvent( kunde == $k, produktinformation.preis >=
2*($tk1.produktinformation.preis), this != $tk1*, this after[0, 2m] $tk1*)
        not KundeRewarded( kunde == $k )
    then
        service.notifyKunde($k.vorname + " " + $k.name + " hat innerhalb von
2 Minuten zwei Tickets gekauft, wobei das zweite Ticket mind. doppelt so
teuer wie das erste war und erhaelt deshalb einmalig einen Kaffeegutschein")
        insert(new KundeRewarded( $k ));
end



--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-only-NullPointerException-AfterEvaluator-evaluateCachedRight-tp4021368p4021402.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list