<br><br><div class="gmail_quote">On 7 May 2011 07:16, boy18nj <span dir="ltr">&lt;<a href="mailto:boy18nj@gmail.com">boy18nj@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is currently I have-<br>
<br>
<br>
[condition][]There is fire in &quot;{room}&quot;=Fire({room} : room )<br>
[condition][]&quot;{sprinkler}&quot; is in same &quot;{room}&quot; and sprinkler is<br>
&quot;{off}&quot;={sprinkler}: Sprinkler( room == {room}, on == {off} )<br>
[consequence][]Turn on the &quot;{sprinkler}&quot; for &quot;{room}&quot;=modify( {sprinkler}<br>
){setOn(true)}<br>
[condition][]There is a &quot;{room}&quot;={room} : Room( )<br>
[condition][]This is no fire in &quot;{room}&quot;=not Fire( room == {room} )<br>
[condition][]&quot;{sprinkler}&quot; is in same &quot;{room}&quot; and is &quot;{off}&quot;={sprinkler} :<br>
Sprinkler( room == {room}, on == true )<br>
[consequence][]Turn off the &quot;{sprinkler}&quot; for &quot;{room}&quot;=modify( {sprinkler}<br>
){setOn(false)}<br>
<br>
Is it possible to further reuse or define the elements and reuse them in<br>
further conditions?<br></blockquote><div><br>Yes.<br><br>When asking the way to a goal, it helps to describe the goal. Otherwise, the<br>answer is likely to be &quot;Just go on, you&#39;ll get there.&quot;<br><br>-W<br><br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-further-shorten-the-DSL-code-tp2911052p2911052.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-further-shorten-the-DSL-code-tp2911052p2911052.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>