you need to change <br><font face="Courier New" size="2"><span style="font-size: 10pt;">[consequence][]LOGGING=System.out.println("hello");<br>to<br></span></font><font face="Courier New" size="2"><span style="font-size: 10pt;">[then][]LOGGING=System.out.println("hello");</span></font><br clear="all">
Regards,<br>Prem<br>
<br><br><div class="gmail_quote">2009/8/14 Vijay K Pandey <span dir="ltr"><<a href="mailto:VPandey@mdes.ms.gov">VPandey@mdes.ms.gov</a>></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 link="blue" vlink="blue" lang="EN-US">
<div>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thanks, but I have gone through this
before and I don’t see any issue in the DRL & DSL file I wrote. Also
within the eclipse plug-in, “Rete View” comes up fine for the DRL
but while running as java application, “Unable to expand:” error
comes.</span></font></p>
<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<div>
<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">
<hr align="center" size="2" width="100%">
</span></font></div>
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Premkumar Stephen<br>
<b><span style="font-weight: bold;">Sent:</span></b> Friday, August 14, 2009
11:53 AM<br>
<b><span style="font-weight: bold;">To:</span></b> Rules Users List<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users] Drools
5 - Not sure why this simple DSL not working</span></font></p>
</div><div><div></div><div class="h5">
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><a href="http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html" target="_blank">http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html</a>
Section 4.10.2<br>
<br>
</span></font></p>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2009/8/14 Vijay K Pandey <<a href="mailto:VPandey@mdes.ms.gov" target="_blank">VPandey@mdes.ms.gov</a>></span></font></p>
<div link="blue" vlink="purple">
<div>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">Hi,</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">I am trying to get a very simple DSL working but all the time it
gives the error of <b><span style="font-weight: bold;">Unable to expand:</span></b>
If I take the DSL away everything runs fine, not sure whats going on. </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">So what I did is strip away all other stuff and just added a
plain simple DSL -- but still the same error</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><b><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; font-weight: bold;">Unable to expand:
LOGGING</span></font></b></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><b><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; font-weight: bold;">DSLR file Contents:</span></font></b></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">package test.rules</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">dialect "mvel" </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">expander testing.dsl</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">rule "TestingCheck"</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> when</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> then</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">
<b><span style="font-weight: bold;">LOGGING </span></b></span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">end</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><b><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; font-weight: bold;">DSL file content</span></font></b></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">[consequence][]LOGGING=System.out.println("hello");</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><b><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; font-weight: bold;">ChangeSet XML file (test_changeset.xml)</span></font></b></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"><change-set xmlns='<a href="http://drools.org/drools-5.0/change-set" target="_blank">http://drools.org/drools-5.0/change-set</a>'</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">
xmlns:xs='<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>'</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">
xs:schemaLocation='<a href="http://drools.org/drools-5.0/change-set%0Adrools-change-set-5.0.xsd" target="_blank">http://drools.org/drools-5.0/change-set
drools-change-set-5.0.xsd</a>'
> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> <add></span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> <resource
source='classpath:test/rules/test.drl' type='DSLR' /></span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> <resource
source='classpath:test/rules/testing.dsl' type='DSL' /></span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </add></span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"></change-set></span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><b><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; font-weight: bold;">I am loading the changeset set via</span></font></b></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"),
ResourceType.CHANGE_SET);</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">Any hint what is going wrong?</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">Thanks</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";">Vijay</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
</div>
</div>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
_______________________________________________<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></span></font></p>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div></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>