<!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">
Niloy,<br>
<br>
I suggest you make a drl first and then look at the AST it creates in
memory and then make sure that the programmatic descr tree you are
making matches that.<br>
<br>
Mark<br>
Niloy Debnath wrote:
<blockquote cite="mid:467143.451.qm@web7909.mail.in.yahoo.com"
 type="cite">hi,<br>
  <br>
&nbsp; I'm going to convert a <span style="font-weight: bold;">PackageDescr</span>
object which has the rules to <span style="font-weight: bold;">XML</span>
file.I'm trying to convert it into xml using <span
 style="font-weight: bold;">dump </span>method of <span
 style="font-weight: bold;">XmlDumper</span> class. The problem with
that is while the rest of the code is fine i cannot get the <span
 style="font-weight: bold;">lhs part</span>. There is no method in fact
as far as i know to actually specify the lhs. The <span
 style="font-weight: bold;">setLhs</span> method does not help in this
regard. I tried to construct all the parameters ususally specified in
the lhs like the <span style="font-weight: bold;">ColumnDescr</span>
object and <span style="font-weight: bold;">FieldBinding</span> object
but there is no way to bind these to the <span
 style="font-weight: bold;">PackageDescr</span> object. <br>
So the lhs is coming out as null while the rest of the code is fine
...even the rhs..<br>
  <br>
I am attaching the code and the output again. please go through and
advise.<br>
  <br>
&nbsp;thanking you,<br>
  <br>
  <span style="font-weight: bold;">Niloy Debnath</span><br
 style="font-weight: bold;">
  <span style="font-weight: bold;">student(comp sc &amp; engg)<br>
  <br>
  <br>
  <br>
  </span><strong><br>
OUTPUT OF TEST2 :</strong><br>
&nbsp;
  <div>&nbsp;<font size="2">
  <div align="left">&lt;?xml version="1.0" encoding="UTF-8"?&gt; </div>
  <div align="left">&lt;package name="org.drools.examples" </div>
  <div align="left">xmlns="<a moz-do-not-send="true" rel="nofollow"
 target="_blank" href="http://drools.org/drools-3.0">http://drools.org/drools-3.0</a>"
  </div>
  <div align="left">xmlns:xs="<a moz-do-not-send="true" rel="nofollow"
 target="_blank" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"
  </div>
  <div align="left">xs:schemaLocation="<a moz-do-not-send="true"
 rel="nofollow" target="_blank" href="http://drools.org/drools-3.0">http://drools.org/drools-3.0</a>
drools-3.0.xsd"&gt; </div>
  <div align="left">&lt;import name="org.drools.examples.Hell.Message"
/&gt; </div>
  <div align="left">&nbsp;<br>
&lt;rule name="Hell"&gt;</div>
  <div align="left">&lt;lhs&gt;null</div>
  <div align="left">null</div>
  <div align="left">&lt;/lhs&gt;&lt;rhs&gt;System.out.println( message
);m.setMessage( "Goodbye cruel world " );m.setStatus( Message.GOODBYE
);modify( m );&lt;/rhs&gt;</div>
  <div align="left">&lt;/rule&gt;&lt;rule name="Good"&gt;</div>
  <div align="left">&lt;rule-attribute name="activation-group"
value="dekhajak" /&gt;</div>
  <div align="left">&lt;lhs&gt;&lt;rule-attribute
name="activation-group" value="dekhajak" /&gt;</div>
  <div align="left">&lt;rule-attribute name="activation-group"
value="dekhajak" /&gt;</div>
  <div align="left">&nbsp;</div>
  <div align="left">&lt;/lhs&gt;&lt;rhs&gt;System.out.println( message
); m.setMessage( message );&lt;/rhs&gt;</div>
  <div align="left">&lt;/rule&gt;</div>
  <div align="left">&lt;/package&gt;</div>
  </font><font color="#ff0000" size="2">
  <div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
  <div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
  <div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
  <div align="left">no visitor implementation for : class
org.drools.lang.descr.PatternDescr :
org.drools.lang.descr.PatternDescr@14318bb</div>
  </font></div>
  <br>
  <p> </p>
  <hr size="1"> Check out what you're missing if you're not on <a
 moz-do-not-send="true"
 href="http://us.rd.yahoo.com/mail/in/ymessenger/*http://in.messenger.yahoo.com/">Yahoo!
Messenger</a>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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>
<br>
</body>
</html>