<br>&nbsp;&nbsp; Hi Matt,<br><br>&nbsp;&nbsp; If I remember correctly, you need to use \\n to break lines. Also, I think this should work:<br><br>
rd: RuleData(offerId == &quot;{offer}&quot;, uc : userContext) &nbsp;not ( Account(where {constraints}) from uc.accounts)<br><br>&nbsp;&nbsp;&nbsp; If it is not working, maybe you can open a jira for it? Meanwhile, as a work around try adding an &quot;and&quot; there:<br>
<br>
rd: RuleData(offerId == &quot;{offer}&quot;, uc : userContext)&nbsp; and not ( Account(where {constraints}) from uc.accounts)<br><br>&nbsp;&nbsp;&nbsp; AND is supposed to be implicit, but making it explicit should create no problems.<br><br>
&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/6/12 Matt Geis &lt;<a href="mailto:mgeis@yahoo.com">mgeis@yahoo.com</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
I&#39;m having a really strange scenario. &nbsp;I have a DSL entry that I need to expand onto two lines. When I write it as plain DRL, on a single line, the rule fails. &nbsp;When I separate it into two lines, it passes. &nbsp;The problem is that I&#39;m having issues getting my DSL to insert a newline char into the drl it generates and split my resulting rule into two constraints.<br>

<br>
Here&#39;s what I want to do... (assume the &#39;\n actually works)<br>
<br>
[condition][]offer with code &quot;{offer}&quot; and no accounts present where {constraints}=rd: RuleData(offerId == &quot;{offer}&quot;, uc : userContext) \n not ( Account(where {constraints}) from uc.accounts)<br>
<br>
if you put the value into a DRL rule like this, it works:<br>
rd: RuleData(offerId == &quot;{offer}&quot;, uc : userContext)<br>
not ( Account(where {constraints}) from uc.accounts)<br>
<br>
<br>
put it in like this... it fails<br>
rd: RuleData(offerId == &quot;{offer}&quot;, uc : userContext) &nbsp;not ( Account(where {constraints}) from uc.accounts)<br>
<br>
<br>
I know that in a regex, the backslash is special, just as it is in replacement strings in Matcher.replaceAll(). &nbsp;What I can&#39;t figure out is how to split that line. &nbsp;I&#39;ve tried 1, 2, 3, 4... up to 8 backslashes, and nothing works. &nbsp;I either get an assertion failed at the end of my test, or I get &quot;unrecognized token&quot; on the \ or the n .<br>

<br>
Can someone point me in the right direction? &nbsp;Or, just tell me how to make the rule work all one one line!<br>
<br>
Thanks in advance,<br>
Matt<br>
<br>
<br>
<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>