Hi Wolfgang,<br>Whats the advantage of option 2 over 1? Can you give sample code for option 2??<br><br><div class="gmail_quote">2010/10/13 Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">In drl, you could use<br> dialect "java"<br>at outermost level, but one never does, because that's the default.<br>
<br>I'd use option (2).<div><div></div><div class="h5"><br><br>-W<br><br><div class="gmail_quote">2010/10/13 sumatheja <span dir="ltr"><<a href="mailto:sumatheja@gmail.com" target="_blank">sumatheja@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Wolfgang,<br> I am actually writing all the rules in a .drl and importing them into a guvnor. I didn't mention the dialect explicitly anywhere in the code. Is the default dialect MVEL. Is there a way to make one time declaration of dialect in my case instead of declaring it for all the rules.<br>
<br><div class="gmail_quote">2010/10/13 Wolfgang Laun <span dir="ltr"><<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>></span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'd say you are using <br> dialect "mvel"<br>There is no try/catch statement in MVEL. You have the options:<br><br>(1) Use Java, not MVEL.<br><br>(2) Surround the fireAllRules() with try/catch and put it in a loop that's terminated<br>
if there is no exception.<br><br>-W<br><br><br><div class="gmail_quote"><div>2010/10/13 sumatheja <span dir="ltr"><<a href="mailto:sumatheja@gmail.com" target="_blank">sumatheja@gmail.com</a>></span><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All, <br><div><div></div><div> I have a set of rules. After firing the rules if an exception occurs in a rule the following rules are not getting evaluated. So i tried writing a try catch block inside the consequence part of the rule, but then i get an error saying "'unable to build the consequence.[Error:was expecting type: java.lang.Object but found type:null]"<br>
<br>Here follows my code<br><br><br clear="all"><b>rule 'Test rule'<br>ruleflow-group "Test Ruleflow"<br>no-loop<br> when<br> $c:Car()<br> Driver()<br> <br> then <br> try{<br>
$c.getModel()<br> } catch (Exception Ee) {<br> System.out.println("caught an exception: "+Ee.toString());<br> }<br>end</b><br><br>However if i remove the try catch block it buils fine.<br>
<br>Can anyone let me know if i'm missing something here.<br><br>Thanks in advance :)<br>-- <br>cheers<br><font color="#888888">Sumatheja <br><br><br>
</font><br></div></div><div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></div></blockquote></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>cheers<br>Sumatheja Dasararaju<br><br><br>
</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></blockquote></div><br>
</div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br>cheers<br>Sumatheja Dasararaju<br><br><br>