<br>2011/1/11 Murali Venugopal <span dir="ltr">&lt;<a href="mailto:murali.venugopal@sifycorp.com">murali.venugopal@sifycorp.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


  
    
  
  <div 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<div class="im"><br>
    rule &quot;210.210.122.100 GroupA&quot;<br>
       <br></div>
        when<br>
            $event : RouteEvent(nodeIp == &quot;210.210.122.100&quot;)<br>
            $varbind : Varbind(oid == &quot;1.3.6.1.2.1.2.2.1.1&quot; &amp;&amp;
    value == &quot;5&quot;)<br>
            from $event.varbindings<br>
        then<br>
            event.setGroup(&quot;GroupA&quot;);<br>
            System.out.println(&quot;set to Group A&quot;);<br>
    <br>
    end<br>
    <br>
    it seems that the &quot;from&quot; clause is in the next line as a separate
    condition. so, drools have considered it as a separate condition.<br></div></blockquote><div><br>DRL is free form, so line breaks don&#39;t matter.<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;">
<div bgcolor="#ffffff" text="#000000">
    <br>
    the error message is <br>
    <br>
     error java.lang.RuntimeException: Rule Compilation error : [Rule
    name=&#39;210.210.122.100 GroupA&#39;]<br>
        alertRouting/Rule_210_210_122_100_GroupA_0.java (7:397) : event
    cannot be resolved<br></div></blockquote><div><br>&quot;event&quot; is the culprit. Now where is this &quot;event&quot;? Has it been declared? Where? Perhaps a typo?...<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
    <br>
    also, i don&#39;t understand about implementing the dependency to the
    cell in left. i tried logical, mathematical dependency conditions.
    sorry for my ignorance.<br></div></blockquote><div><br>This requires spreadsheet functions, e.g.<br>   =IF( D12=&quot;&quot;,&quot;&quot;,&quot;X&quot; )<br>would be in E12. The cell reference is relative, so copying it dowm automatically changes D12 to D13, etc.<br>
<br>-W<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div bgcolor="#ffffff" text="#000000">
    <br>
    please help me resolve this issue.<br>
    <pre cols="72"> _ _     _ _ |.    
| | ||_|| (_|||  \/

</pre><div><div></div><div class="h5">
    On 01/11/2011 01:56 PM, Wolfgang Laun wrote:
    <blockquote 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
      &quot;from&quot; 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>
      &quot;.1.3.6.1.2.1.2.2.1.1.0&quot;,&quot;5&quot;<br>
      ----------------------------------------------------------------<br>
      CONDITION<br>
      <br>
      from $event.varbindings<br>
      the from clause<br>
      x<br>
      ------------------------------------------------------------------<br>
      <br>
      Note the blank cell below CONDITION. The &#39;x&#39; 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 href="mailto:murali.venugopal@sifycorp.com" target="_blank">murali.venugopal@sifycorp.com</a>&gt;<br>
      &gt;<br>
      &gt; hi,<br>
      &gt;<br>
      &gt; i&#39;m facing a problem with decision tables. i&#39;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;     $event : RouteEvent( nodeIp == &quot;192.168.1.12 )<br>
      &gt;     $varbind : Varbind ( oid == &quot;.1.3.6.1.2.1.2.2.1.1.0&quot;
      &amp;&amp; value == &quot;5&quot; ) from $event.varbindings<br>
      &gt;<br>
      &gt; then<br>
      &gt;    <br>
      &gt;     System.out.println(&quot;some text&quot;)<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 == &quot;$param&quot;<br>
      &gt; that is, i&#39;ve to omit my &quot;(&quot; and &quot;)&quot; braces.<br>
      &gt;<br>
      &gt; so now, my second condition is<br>
      &gt;<br>
      &gt; $varbind : Varbind<br>
      &gt; ( oid == &quot;$1&quot; &amp;&amp; value == &quot;$2&quot; ) from
      $event.varbindings<br>
      &gt;<br>
      &gt; here i don&#39;t know how to omit the &quot;(&quot; and &quot;)&quot; 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;  error java.lang.RuntimeException: [10,55]: [ERR 102] Line
      10:55 mismatched input &#39;FROM&#39; expecting &#39;)&#39; in rule
      &quot;210.210.122.100 GroupA&quot; in pattern Varbind[10,77]: [ERR 102] Line
      10:77 mismatched input &#39;)&#39; expecting &#39;then&#39; in rule
      &quot;210.210.122.100 GroupA&quot;<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&#39;s not. so how do i&#39;ve
      to handle this. do i&#39;ve have to omit the braces in the second case
      or not.<br>
      &gt;<br>
      &gt; please help me. i&#39;ve been struggling to solve this error.
      also, i couldn&#39;t find references in the documentation.<br>
      &gt; thanks in advace.<br>
      &gt;<br>
      &gt;  _ _     _ _ |.    <br>
      &gt; | | ||_|| (_|||  \/<br>
      &gt;<br>
      &gt; Whoever wants to be happy, let him be so: of tomorrow there&#39;s
      no knowing<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; rules-users mailing list<br>
      &gt; <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
      &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
      &gt;<br>
      <br>
      <pre><fieldset></fieldset>
_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
  </div></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>