[rules-users] query regarding drl to xml conversion...

Niloy Debnath niloy_rcc at yahoo.co.in
Wed Apr 11 02:45:45 EDT 2007


hi,

  I'm going to convert a PackageDescr object which has the rules to XML file.I'm trying to convert it into xml using dump method of XmlDumper class. The problem with that is while the rest of the code is fine i cannot get the lhs part. There is no method in fact as far as i know to actually specify the lhs. The setLhs method does not help in this regard. I tried to construct all the parameters ususally specified in the lhs like the ColumnDescr object and FieldBinding object but there is no way to bind these to the PackageDescr object. 
So the lhs is coming out as null while the rest of the code is fine ...even the rhs..

I am attaching the code and the output again. please go through and advise.

 thanking you,

Niloy Debnath
student(comp sc & engg)




OUTPUT OF TEST2 :
  <?xml version="1.0" encoding="UTF-8"?> 
 <package name="org.drools.examples" 
 xmlns="http://drools.org/drools-3.0" 
 xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" 
 xs:schemaLocation="http://drools.org/drools-3.0 drools-3.0.xsd"> 
 <import name="org.drools.examples.Hell.Message" /> 
     
<rule name="Hell">
  <lhs>null
 null
  </lhs><rhs>System.out.println( message );m.setMessage( "Goodbye cruel world " );m.setStatus( Message.GOODBYE );modify( m );</rhs>
 </rule><rule name="Good">
 <rule-attribute name="activation-group" value="dekhajak" />
  <lhs><rule-attribute name="activation-group" value="dekhajak" />
  <rule-attribute name="activation-group" value="dekhajak" />
   
 </lhs><rhs>System.out.println( message ); m.setMessage( message );</rhs>
 </rule>
 </package>
 no visitor implementation for : class org.drools.lang.descr.PatternDescr : org.drools.lang.descr.PatternDescr at 14318bb
 no visitor implementation for : class org.drools.lang.descr.PatternDescr : org.drools.lang.descr.PatternDescr at 14318bb
 no visitor implementation for : class org.drools.lang.descr.PatternDescr : org.drools.lang.descr.PatternDescr at 14318bb
 no visitor implementation for : class org.drools.lang.descr.PatternDescr : org.drools.lang.descr.PatternDescr at 14318bb



       
---------------------------------
 Check out what you're missing if you're not on Yahoo! Messenger 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070411/63b29596/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.java
Type: application/octet-stream
Size: 2117 bytes
Desc: 2929146081-test2.java
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20070411/63b29596/attachment.obj 


More information about the rules-users mailing list