Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JBoss Rules (Drools 4.0.3), DSL, and setting values.

Reply
Thread Tools

JBoss Rules (Drools 4.0.3), DSL, and setting values.

 
 
andrewfsears@gmail.com
Guest
Posts: n/a
 
      12-19-2007
I'm not sure of the place to post this question, but I'm trying to
create a Domain Specific Language rules file.

For this one, I would like to see if the current date/time is between
two dates, inclusive.

I would like to be able to write in my rules.dslr file:

------------------------------------------------------
package com.abc.test
expander rules.dsl
rule "Between two dates"
when
The current date is between "2007-12-01" and "2007-12-31"
then
Print "is in between"
end
----------------------------------------------------

and rules.dsl:

----------------------------------------------------
[condition][]The current date is between "{startDate}" and
"{endDate}"="{startDate}" <= new Date(); "{endDate}" >= new Date();
[consequence][]Print "{message}"=System.out.println("{message} ");
----------------------------------------------------

Clearly, the "condition" doesn't work. What should I be doing?

Thanks for anyone willing to help me with this, Andy

PS: Also, I tried going off of the documentation for 4.0.3, as well as
the examples that come with Drools, but they don't seem to help me
that much when the rules start getting a little more complicated. Is
there another source that will be more beneficial?

Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Application in JBoss Portal on Liferay JBoss LprzemekL Java 0 04-10-2008 12:03 PM
Eclipse/Lomboz/JBoss: Cannot Start JBoss (Debug) Server from Eclipse Using Lomboz Plugin Jubz Java 0 05-30-2006 10:24 PM
jboss 4.0.3 jboss portal 2.2.1 han Java 0 05-08-2006 10:35 AM
rules for Cisco PIX 525 firewall rules KAS Cisco 2 10-02-2005 07:12 PM
Canon G2 and auto-ISO setting -- what rules does it follow? John Faughnan Digital Photography 2 04-11-2004 04:19 AM



Advertisments