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-AfterE...
Sent from the Drools: User forum mailing list archive at
Nabble.com.