Hi Wolfgang,
Thank you for answering, here is the rule rewritten but closer to reality:
// package
// imports
global java.util.Date now;
rule "MyRule"
salience 5
when
// Prevent rule activation for other offer types.
MyObject(type == Type.TYPE_SOUGHT)
$candidate : Candidate(
subObject.dateField != null && subObject.dateField.time >=
now.time)
then
// do something
end
A value for 'now' being set like so:
session.setGlobal("now", new Date()); // Date being the java.util.Date.
But I do not think that matters because 'compilation' fails at this point.
Thank you in advance for your time.
--
View this message in context:
http://drools.46999.n3.nabble.com/Issue-using-global-variable-with-Drools...
Sent from the Drools: User forum mailing list archive at
Nabble.com.