<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT face=Arial 
size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT size=2><FONT 
face=Arial>&nbsp; Is it possible to mix dsl language and regular rule syntax in 
a rule file?&nbsp;I am trying to do this, but my rules 
won't&nbsp;compile.&nbsp;The "unable to expand" error is returned during 
compilation.&nbsp;I tried adding </FONT><FONT size=2><FONT 
face=Arial>[*][]"{anything}" = "{anything}" to the dsl file to fix this, but 
that didnt work. I used this strategy in Drools 4.0.7, but it doesn't seem to 
work in Drools 5.0.0 M5. Below I provided a simple example of what I would like 
to do.</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT face=Arial 
size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT face=Arial 
size=2>Dan</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT face=Arial 
size=4>animal.dslr file</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=234365514-20032009><FONT color=#808000><FONT 
color=#808000>
<P align=left><FONT size=2>#created on: Mar 12, 
2009<BR></FONT></FONT></FONT><B><FONT color=#960000><FONT color=#960000><FONT 
size=2>package</FONT></B></FONT></FONT><FONT size=2> 
com.fedex.cc.expertsystem.test<BR><B><FONT color=#960000><FONT 
color=#960000>import</B></FONT></FONT></FONT><FONT size=2> 
com.fedex.cc.expertsystem.fact.*</FONT></P>
<P align=left><FONT size=2></FONT></P><B><FONT color=#960000><FONT 
color=#960000>
<P align=left><FONT size=2>expander</FONT></B></FONT></FONT><FONT size=2> 
animal.dsl</FONT></P>
<P align=left><FONT size=2></FONT></P><B><FONT color=#960000><FONT 
color=#960000>
<P align=left><FONT size=2>rule</FONT></B></FONT></FONT><FONT size=2> 
</FONT><FONT color=#008000><FONT color=#008000 size=2>"Set dog's 
ownership"<BR></FONT></FONT><B><FONT color=#960000 
size=2>no-loop<BR></FONT></B><FONT size=2><B><FONT color=#960000><SPAN 
class=234365514-20032009>&nbsp;&nbsp;&nbsp; </SPAN>when<BR><SPAN 
class=234365514-20032009>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></FONT></B>There <B><FONT color=#960000><FONT 
color=#960000>is</B></FONT></FONT></FONT><FONT size=2> an animal lover <B><FONT 
color=#960000><FONT color=#960000>and</B></FONT></FONT></FONT><FONT size=2> dog 
<B><FONT color=#960000><FONT color=#960000>in</B></FONT></FONT></FONT><FONT 
size=2> the system<BR><SPAN class=234365514-20032009>&nbsp;&nbsp;&nbsp; 
</SPAN></FONT><B><FONT color=#960000><FONT color=#960000><FONT 
size=2>then</FONT></B></FONT></FONT><FONT size=2>&nbsp;<BR><SPAN 
class=234365514-20032009><STRONG><FONT 
color=#960000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</FONT></STRONG></SPAN>The person owns the dog<BR></FONT><B><FONT 
color=#960000><FONT color=#960000><FONT size=2>end</FONT></P></B></FONT></FONT>
<P align=left><FONT size=2></FONT></P><B><FONT color=#960000><FONT 
color=#960000>
<P align=left><FONT size=2>rule</FONT></B></FONT></FONT><FONT size=2> 
</FONT><FONT color=#008000><FONT size=2>"Tell us person doesnt like 
dogs"<BR><SPAN class=234365514-20032009>&nbsp;&nbsp;&nbsp; 
</SPAN></FONT></FONT><B><FONT color=#960000><FONT color=#960000><FONT 
size=2>when</FONT></B></FONT></FONT><FONT size=2>&nbsp;<BR><SPAN 
class=234365514-20032009><STRONG><FONT 
color=#960000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</FONT></STRONG></SPAN>person : Person(animalLover == <B>false</B>)<BR><SPAN 
class=234365514-20032009>&nbsp;&nbsp;&nbsp; </SPAN></FONT><B><FONT 
color=#960000><FONT size=2>then</FONT><SPAN class=234365514-20032009><FONT 
size=2> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</FONT></SPAN></FONT></B><FONT size=2>System.out.println(<FONT 
color=#008000><FONT color=#008000>"Person does not like 
dog"</FONT></FONT>);<BR></FONT><B><FONT color=#960000><FONT color=#960000><FONT 
size=2>end</FONT></FONT></FONT></B></P>
<P align=left><B><FONT><FONT><FONT face=Arial size=4><SPAN 
class=234365514-20032009></SPAN></FONT></FONT></FONT></B><B><FONT 
color=#960000><FONT color=#960000><FONT size=2><FONT face=Arial><FONT 
color=#0000ff><FONT size=4><FONT color=#000000>a</FONT><SPAN 
class=234365514-20032009><FONT color=#000000>nimal.dsl 
file</FONT><BR></SPAN></FONT></FONT></FONT></FONT></FONT></FONT></B><B><FONT 
color=#960000><FONT color=#960000><FONT size=2><BR>[condition][]There is an 
animal lover and dog in the system=person : Person(animalLover == true) dog : 
Dog()<BR>[consequence][]The person owns the 
dog=dog.setOwnerLastName(person.getLastName()); 
update(dog);</P></FONT></B></FONT></FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2>Daniel Quinn</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Fedex - Custom Critical</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Software Specialist I</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>234.310.4090(x2586)</FONT></DIV>
<DIV>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Jeff 
Davis<BR><B>Sent:</B> Friday, March 20, 2009 10:29 AM<BR><B>To:</B> 
rules-users@lists.jboss.org<BR><B>Subject:</B> [rules-users] Error running 
DroolsCompilerAntTask in CR1<BR></FONT><BR></DIV>
<DIV></DIV>Hi,
<DIV><BR></DIV>
<DIV>I upgraded everything from M5 to CR1 last night, but noticed that my ant 
task no longer worked and was returning an error (it had worked previously under 
M5, and I confirmed by switching everything back to test). The error I now 
receive is:</DIV>
<DIV><BR></DIV>
<DIV>
<DIV>[compiler] java.util.zip.ZipException: error in opening zip file</DIV>
<DIV>[compiler] &nbsp; &nbsp; at java.util.zip.ZipFile.open(Native Method)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:203)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:234)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:130)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.util.ChainedProperties.loadProperties(ChainedProperties.java:233)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.util.ChainedProperties.&lt;init&gt;(ChainedProperties.java:119)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.util.ChainedProperties.&lt;init&gt;(ChainedProperties.java:41)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.util.ChainedProperties.&lt;init&gt;(ChainedProperties.java:35)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.RuleBaseConfiguration.init(RuleBaseConfiguration.java:376)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.RuleBaseConfiguration.&lt;init&gt;(RuleBaseConfiguration.java:234)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.common.AbstractRuleBase.&lt;init&gt;(AbstractRuleBase.java:149)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.reteoo.ReteooRuleBase.&lt;init&gt;(ReteooRuleBase.java:144)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.reteoo.ReteooRuleBase.&lt;init&gt;(ReteooRuleBase.java:121)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.RuleBaseFactory.newRuleBase(RuleBaseFactory.java:58)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.RuleBaseFactory.newRuleBase(RuleBaseFactory.java:38)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.contrib.DroolsCompilerAntTask.createWithPackageBuilder(DroolsCompilerAntTask.java:241)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:170)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
java.lang.reflect.Method.invoke(Method.java:585)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Task.perform(Task.java:348)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Target.execute(Target.java:357)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Target.performTasks(Target.java:385)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Project.executeTarget(Project.java:1306)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Project.executeTargets(Project.java:1189)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Main.runBuild(Main.java:758)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.Main.startAnt(Main.java:217)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)</DIV>
<DIV>[compiler] &nbsp; &nbsp; at 
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)</DIV>
<DIV><BR></DIV>
<DIV>My build.xml is:</DIV>
<DIV><BR></DIV>
<DIV>
<DIV>&lt;project name="test" default="compile"&gt;</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;path 
id="drools.path.task"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;fileset 
dir="C:\Apps\drools-5.0.0.CR1-bin"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-compiler-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-ant-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-core-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-decisiontables-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-api-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/fileset&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;fileset 
dir="C:\Apps\drools-5.0.0.CR1-bin\lib"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="*.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/fileset&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/path&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;path 
id="drools.path"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;pathelement 
path="target\classes"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;fileset 
dir="C:\Apps\drools-5.0.0.CR1-bin"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-ant-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-decisiontables-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;include 
name="drools-api-5.0.0.CR1.jar"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/fileset&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/path&gt;</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;taskdef 
name="compiler" classname="org.drools.contrib.DroolsCompilerAntTask" 
classpathref="drools.path.task" /&gt;</DIV>
<DIV><BR></DIV>
<DIV>&nbsp;&nbsp; &nbsp;&lt;target name="create.rules.package" &gt;<SPAN 
class=Apple-tab-span style="WHITE-SPACE: pre"> </SPAN></DIV>
<DIV>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;compiler</DIV>
<DIV>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;srcdir="src\main\rules"</DIV>
<DIV>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;tofile="target\package\packge.pkg"</DIV>
<DIV>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;classpathref="drools.path"&gt;</DIV>
<DIV>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;include 
name="Sample.drl" /&gt;</DIV>
<DIV>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/compiler&gt;</DIV>
<DIV>&nbsp;&nbsp; &nbsp;&lt;/target&gt;</DIV>
<DIV>&nbsp;&nbsp; &nbsp;</DIV>
<DIV>&nbsp;&nbsp; &nbsp;&lt;target name="clean"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;delete 
includeemptydirs="true"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;fileset 
dir="target"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/delete&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/target&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;target 
name="compile" depends="clean"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;mkdir 
dir="target/classes"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;mkdir 
dir="logs"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;javac 
destdir="target/classes" debug="on" source="1.5" target="1.5"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;src 
path="src\main\java"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;classpath 
refid="drools.path.task"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/javac&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/target&gt;</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;target 
name="init"&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;mkdir 
dir="target/classes"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;mkdir 
dir="target"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>&lt;mkdir 
dir="target/wsdl2javasource"/&gt;</DIV>
<DIV><SPAN class=Apple-tab-span 
style="WHITE-SPACE: pre"></SPAN>&lt;/target&gt;</DIV>
<DIV>&lt;/project&gt;</DIV>
<DIV><BR></DIV>
<DIV>If anyone has any ideas, they would be much appreciated!</DIV>
<DIV><BR></DIV>
<DIV>Thanks!</DIV>
<DIV><BR></DIV>
<DIV>jeff</DIV></DIV></DIV></BODY></HTML>