[rules-users] Dates in an XLS decision table
tad628
tad at deffler.com
Tue Jan 15 13:11:00 EST 2013
I'm new to Drools and trying to figure out how to build a condition around a
date. Using DRL, it might look something like this:
rule "Simple percentage with incentive date X"
when
$i : LineItem( status == LineItem.PROCESSING, $amount : amount,
$orderDate : orderDate )
then
Date $incentiveDate = new GregorianCalendar(2012, 0, 1).getTime();
Date $incentiveDate2 = new GregorianCalendar(2013, 0, 1).getTime();
if ( $orderDate.before( $incentiveDate ) )
....
else if ( $orderDate.before( $incentiveDate2 ) )
...etc.
I can't figure out how to do this in a spreadsheet, however. For the
condition I have the two lines below the "CONDITION" cell as:
LineItem
orderDate.before( $param )
with the various dates as rows down in the data section.
When I run this, I get an exception of that "unable to resolve method using
strict-mode: java.util.Date.before(java.lang.Double)"
How do I specify dates in the data field to get around this?
--
View this message in context: http://drools.46999.n3.nabble.com/Dates-in-an-XLS-decision-table-tp4021546.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list