On 7 May 2011 07:16, boy18nj <boy18nj(a)gmail.com> wrote:
This is currently I have-
[condition][]There is fire in "{room}"=Fire({room} : room )
[condition][]"{sprinkler}" is in same "{room}" and sprinkler is
"{off}"={sprinkler}: Sprinkler( room == {room}, on == {off} )
[consequence][]Turn on the "{sprinkler}" for "{room}"=modify(
{sprinkler}
){setOn(true)}
[condition][]There is a "{room}"={room} : Room( )
[condition][]This is no fire in "{room}"=not Fire( room == {room} )
[condition][]"{sprinkler}" is in same "{room}" and is
"{off}"={sprinkler} :
Sprinkler( room == {room}, on == true )
[consequence][]Turn off the "{sprinkler}" for "{room}"=modify(
{sprinkler}
){setOn(false)}
Is it possible to further reuse or define the elements and reuse them in
further conditions?
Yes.
When asking the way to a goal, it helps to describe the goal. Otherwise, the
answer is likely to be "Just go on, you'll get there."
-W
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-further-shorten-the-DSL-code-tp2...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users