<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Wolffgang,<br>
    <br>
    Thanks for your quick response. I did as you say. now my rule file
    when generated from excel sheet and printed in console looks like
    this.<br>
    <br>
    package alertRouting;<br>
    #generated from Decision Table<br>
    import com.sify.beacon.events.RouteEvent;<br>
    import com.sify.beacon.events.trapevent.Varbind;<br>
    #From row number: 10<br>
    rule "210.210.122.100 GroupA"<br>
    &nbsp;&nbsp; <br>
    &nbsp;&nbsp;&nbsp; when<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $event : RouteEvent(nodeIp == "210.210.122.100")<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $varbind : Varbind(oid == "1.3.6.1.2.1.2.2.1.1" &amp;&amp;
    value == "5")<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; from $event.varbindings<br>
    &nbsp;&nbsp;&nbsp; then<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; event.setGroup("GroupA");<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("set to Group A");<br>
    <br>
    end<br>
    <br>
    it seems that the "from" clause is in the next line as a separate
    condition. so, drools have considered it as a separate condition.<br>
    <br>
    the error message is <br>
    <br>
    &nbsp;error java.lang.RuntimeException: Rule Compilation error : [Rule
    name='210.210.122.100 GroupA']<br>
    &nbsp;&nbsp;&nbsp; alertRouting/Rule_210_210_122_100_GroupA_0.java (7:397) : event
    cannot be resolved<br>
    <br>
    also, i don't understand about implementing the dependency to the
    cell in left. i tried logical, mathematical dependency conditions.
    sorry for my ignorance.<br>
    <br>
    please help me resolve this issue.<br>
    <pre class="moz-signature" cols="72"> _ _     _ _ |.    
| | ||_|| (_|||  \/

</pre>
    On 01/11/2011 01:56 PM, Wolfgang Laun wrote:
    <blockquote
      cite="mid:AANLkTi=WUbaM3aFg2yxTaqmaTYJuJmkYs2KJL3e-PiqY@mail.gmail.com"
      type="cite">There is a limit to what can be implemented using
      decision tables. Some constructs are possible with hacks.<br>
      <br>
      In your case, you cannot have constraints with parameters and
      "from" in the same column. You need 2 adjacent columns.<br>
      <br>
      CONDITION<br>
      $varbind : Varbind<br>
      oid == $1 &amp;&amp; value == $2<br>
      the pattern and constraints<br>
      ".1.3.6.1.2.1.2.2.1.1.0","5"<br>
      ----------------------------------------------------------------<br>
      CONDITION<br>
      <br>
      from $event.varbindings<br>
      the from clause<br>
      x<br>
      ------------------------------------------------------------------<br>
      <br>
      Note the blank cell below CONDITION. The 'x' triggers the
      insertion of the from clause. (It should be possible to implement
      the dependency on the cell to the left by a simple spreadsheet
      formula.)<br>
      <br>
      -W<br>
      <br>
      <br>
      <br>
      <br>
      2011/1/11 Murali Venugopal &lt;<a moz-do-not-send="true"
        href="mailto:murali.venugopal@sifycorp.com">murali.venugopal@sifycorp.com</a>&gt;<br>
      &gt;<br>
      &gt; hi,<br>
      &gt;<br>
      &gt; i'm facing a problem with decision tables. i've got a .drl
      working file. but when i happen to take that into a .xls file (
      decision table ) it throws some errors.<br>
      &gt;<br>
      &gt; my actual rule in .drl file has got something like this.<br>
      &gt;<br>
      &gt; when<br>
      &gt;<br>
      &gt; &nbsp;&nbsp;&nbsp; $event : RouteEvent( nodeIp == "192.168.1.12 )<br>
      &gt; &nbsp;&nbsp;&nbsp; $varbind : Varbind ( oid == ".1.3.6.1.2.1.2.2.1.1.0"
      &amp;&amp; value == "5" ) from $event.varbindings<br>
      &gt;<br>
      &gt; then<br>
      &gt; &nbsp;&nbsp;&nbsp;<br>
      &gt; &nbsp;&nbsp;&nbsp; System.out.println("some text")<br>
      &gt;<br>
      &gt; here in my decision table, my first cell would have the first
      condition<br>
      &gt;<br>
      &gt; $event : RouteEvent<br>
      &gt; nodeIp == "$param"<br>
      &gt; that is, i've to omit my "(" and ")" braces.<br>
      &gt;<br>
      &gt; so now, my second condition is<br>
      &gt;<br>
      &gt; $varbind : Varbind<br>
      &gt; ( oid == "$1" &amp;&amp; value == "$2" ) from
      $event.varbindings<br>
      &gt;<br>
      &gt; here i don't know how to omit the "(" and ")" braces. or
      should i add and other layer of those braces.<br>
      &gt;<br>
      &gt; anyway, the decision table is not working, where as my rule
      file does.<br>
      &gt;<br>
      &gt; the error message is<br>
      &gt;<br>
      &gt; &nbsp;error java.lang.RuntimeException: [10,55]: [ERR 102] Line
      10:55 mismatched input 'FROM' expecting ')' in rule
      "210.210.122.100 GroupA" in pattern Varbind[10,77]: [ERR 102] Line
      10:77 mismatched input ')' expecting 'then' in rule
      "210.210.122.100 GroupA"<br>
      &gt;<br>
      &gt; my doubt is,<br>
      &gt; in the first case all my condition expression is contained
      with in braces. where as in second case, it's not. so how do i've
      to handle this. do i've have to omit the braces in the second case
      or not.<br>
      &gt;<br>
      &gt; please help me. i've been struggling to solve this error.
      also, i couldn't find references in the documentation.<br>
      &gt; thanks in advace.<br>
      &gt;<br>
      &gt; &nbsp;_ _ &nbsp; &nbsp; _ _ |. &nbsp; &nbsp;<br>
      &gt; | | ||_|| (_||| &nbsp;\/<br>
      &gt;<br>
      &gt; Whoever wants to be happy, let him be so: of tomorrow there's
      no knowing<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; rules-users mailing list<br>
      &gt; <a moz-do-not-send="true"
        href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
      &gt; <a moz-do-not-send="true"
        href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
      &gt;<br>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
  </body>
</html>