hi Laun,<br>   I tries with your solutions but i couldn&#39;t find the way to configure the meta - data part in rule file to read.<br>   I came across with following issues when trying to read it from a given code.<br>  <br>
  [12,2]: [ERR 102] Line 12:2 mismatched input &#39;AT&#39; expecting &#39;then&#39; in rule &quot;create new Instance&quot;<br>   Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: Could not parse knowledge.<br>
<br> i think this might be a issue with  a @ sign in the rule file but i think i this kinda of annotations will help to specify the<br> main rule name. Or is there any way to identify or filter out the main rule name from file.<br>
<br>BTW your this solution help me a lot.<br>thanks<br><br>  <br><br> <br><blockquote style="margin: 1.5em 0pt;"></blockquote><br><br><div class="gmail_quote">On Tue, Jun 30, 2009 at 2:44 PM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You might use the API to retrieve all rules in your KnowledgeBase<br><br>KnowledgeBase kBase = ...;<br>
<br>for( KnowledgePackage kp: kBase.getKnowledgePackages() ){<br>      for( Rule r: kp.getRules() ){<br>            String name = r.getName();<br>
            String purpose = r.getMetaAttribute( &quot;Purpose&quot; );  // or similar - see below<br>            System.out.println( &quot;Rule &quot; + name + &quot;, purpose: &quot; + purpose );<br>      }<br>}<br><br>

Rule names may not provide sufficient information. You could add arbitrary metadata to your rules, e.g.,<br><br>rule &quot;pqx&quot;<br>   @Purpose( &quot;locates very interesting facts&quot; )<br>   when<br>   ...<br>end <br>

<br>-W<br><br><br><br><div class="gmail_quote">2009/6/30 Amila Silva <span dir="ltr">&lt;<a href="mailto:amilac@hsenidmobile.com" target="_blank">amilac@hsenidmobile.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">
<br>hi everyone,<br>   I have requirement like to retrieve the RULE names in a given rule files. and also is there a way to map a rule names from a multiple rule files.<br>   i want to load the or show the available rules and system user to select the required rule for his program.<br>


   let me know the possible way of doing this.<br><br clear="all"><br>-- <br>Thanks,<br>Regrads,<br><br> Amila Silva,<br>Associate Software Engineer<br><br>hSenid Mobile Solutions<br><br>Phone : <br>+94-77-9983894<br>Fax     : <br>


+94-11-2673 845<br><br>Web: <br><a href="http://www.hSenid.com" target="_blank">http://www.hSenid.com</a><br> <br>Make it Happen<br><br><br><a href="http://www.hSenidMobile.com" target="_blank">http://www.hSenidMobile.com</a><br>

 <br>Enabling the Mobile World<br>
<br><br>Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. The content and opinions contained in this email are not necessarily those of hSenid Software International. If you have received this email in error please contact the sender.<br>


<br>
<br></div></div><div class="im">_______________________________________________<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>
</blockquote></div><br><br clear="all"><br>-- <br><br>