<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I should&#8217;ve mentioned this was in
Drools 5.0.1.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I&#8217;ve created a small test app which
demonstrates the issue.&nbsp;&nbsp; I&#8217;ve attached it to this message:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Macon<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Pegram, Macon<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, October 26, 2009
4:36 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Users List<br>
<b><span style='font-weight:bold'>Subject:</span></b> [rules-users] DSL, DSLR
and Changesets...</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>All,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Are DSL and DSLR files supported by the KnowledgeAgent /
Changeset code.&nbsp; Here&#8217;s the details of my test case:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have a Changeset file I&#8217;m trying to load which looks
like the following:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=teal
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>&lt;?</span></font><font size=2 color="#3f7f7f" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>xml</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
<font color="#7f007f"><span style='color:#7F007F'>version</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>&quot;1.0&quot;</span></font></i> <font
color="#7f007f"><span style='color:#7F007F'>encoding</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>&quot;UTF-8&quot;</span></font></i><font
color=teal><span style='color:teal'>?&gt;</span></font><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=teal
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>&lt;</span></font><font size=2 color="#3f7f7f" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>change-set</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
<font color="#7f007f"><span style='color:#7F007F'>xmlns</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>'http://drools.org/drools-5.0/change-set'</span></font></i><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#7f007f"><span style='color:#7F007F'>xmlns:xs</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>'http://www.w3.org/2001/XMLSchema-instance'</span></font></i>
<font color=teal><span style='color:teal'>&gt;</span></font><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp; </span></font><font size=2 color=teal
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>&lt;</span></font><font size=2 color="#3f7f7f" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>add</span></font><font
size=2 color=teal face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:teal'>&gt;</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </span></font><font size=2
color=teal face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>&lt;</span></font><font size=2 color="#3f7f7f" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>resource</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
<font color="#7f007f"><span style='color:#7F007F'>source</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>&quot;classpath:com/test/general/&quot;</span></font></i>
<font color="#7f007f"><span style='color:#7F007F'>type</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>&quot;DSL&quot;</span></font></i> <font
color=teal><span style='color:teal'>/&gt;</span></font><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </span></font><font size=2
color=teal face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>&lt;</span></font><font size=2 color="#3f7f7f" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>resource</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
<font color="#7f007f"><span style='color:#7F007F'>source</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>&quot;classpath:com/test/general/&quot;</span></font></i>
<font color="#7f007f"><span style='color:#7F007F'>type</span></font><font
color=black><span style='color:black'>=</span></font><i><font color="#2a00ff"><span
style='color:#2A00FF;font-style:italic'>&quot;DSLR&quot;</span></font></i> <font
color=teal><span style='color:teal'>/&gt;</span></font><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp; </span></font><font size=2 color=teal
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>&lt;/</span></font><font size=2 color="#3f7f7f" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>add</span></font><font
size=2 color=teal face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:teal'>&gt;</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=teal face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>&lt;/</span></font><font
size=2 color="#3f7f7f" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>change-set</span></font><font size=2
color=teal face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=teal face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>There&#8217;s a single DSL and a
single DSLR file in this folder.&nbsp;&nbsp; I&#8217;m loading the change set
as follows:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-indent:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>KnowledgeAgent ka = KnowledgeAgentFactory.<i><span
style='font-style:italic'>newKnowledgeAgent</span></i>(agentName);</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ka.applyChangeSet(ResourceFactory.<i><span
style='font-style:italic'>newClassPathResource</span></i>(agentName + </span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;-changeset.xml&quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>, getClass()));</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>When I run this code, the logger suggests the DSL and DSLR
are being loaded and compiled:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:52:info] KnowledgAgent created, with
configuration:</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>monitorChangeSetEvents=true scanResources=true
scanDirectories=true</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>++ Constructing and applying changeSet: dsl-test</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:52:info] KnowledegAgent has started listening
for ChangeSet notifications</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>(null: 3, 68): cvc-elt.1: Cannot find the declaration of element
'change-set'.</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:info] KnowledgAgent applying ChangeSet</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to
directory=[ClassPathResource path='com/test/general/']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] ResourceChangeNotification
subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to
resource=[ClassPathResource path='com/test/general/']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@61ec49
to resource=[ClassPathResource path='com/test/general/']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to
directory content resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] ResourceChangeNotification
subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to
resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] ResourceChangeScanner subcribing
notifier=org.drools.io.impl.ResourceChangeNotifierImpl@61ec49 to
resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to
directory content resource=[FileResource
file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] ResourceChangeNotification
subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to
resource=[FileResource
file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] ResourceChangeScanner subcribing
notifier=org.drools.io.impl.ResourceChangeNotifierImpl@61ec49 to
resource=[FileResource file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] KnowledgeAgent subscribing to
directory=[ClassPathResource path='com/hmc/test/general/']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] ResourceChangeNotification
subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@b9b618 to
resource=[ClassPathResource path='com/hmc/test/general/']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] KnowledgeAgent ChangeSet requires
KnowledgeBuilder</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] KnowledgeAgent rebuilding KnowledgeBase
using ChangeSet</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:317:debug] KnowledgeAgent building
resource=[FileResource
file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test.dsl']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:333:debug] KnowledgeAgent building
resource=[FileResource
file='C:\bea\user_projects\workspaces\alerts\rules-kb\test-kb\target\test-classes\com\test\general\test-dsl.dslr']</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>[2009:10:299 16:10:333:info] KnowledgeAgent new KnowledgeBase now
built and in use</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>However after load is completed I try to run the following
code:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.</span></font><i><font
size=2 color="#0000c0" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#0000C0;font-style:italic'>out</span></font></i><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>.println(</span></font><font size=2 color="#2a00ff"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#2A00FF'>&quot;KB Info&quot;</span></font><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>);</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Collection&lt;KnowledgePackage&gt;
pkgs = ka.getKnowledgeBase().getKnowledgePackages();</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><b><font size=2
color="#7f0055" face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:#7F0055;font-weight:bold'>for</span></font></b><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'> (KnowledgePackage kp : pkgs) {</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><b><font size=2 color="#7f0055" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055;font-weight:
bold'>for</span></font></b><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> (Rule rule :
kp.getRules()) {</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.</span></font><i><font size=2 color="#0000c0" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0;font-style:
italic'>out</span></font></i><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>.println(</span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;Rule: &quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'> + rule.getName() + </span></font><font size=2
color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:#2A00FF'>&quot;, &quot;</span></font><font size=2
color=black face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> + ule.getPackageName());</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><b><font size=2 color="#7f0055" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055;font-weight:
bold'>for</span></font></b><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> (String attribs
: rule.listMetaAttributes())</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.</span></font><i><font size=2 color="#0000c0" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0;font-style:
italic'>out</span></font></i><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>.println(</span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;---- &quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'> + attribs);</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></font><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></font><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I get NO output (except of course &#8220;KB Info&#8221;).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>If I initialize the knowledgebase like this:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style='background:silver'>KnowledgeBuilder</span> kbuilder =
KnowledgeBuilderFactory</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.<i><span style='font-style:italic'>newKnowledgeBuilder</span></i>();</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
kbuilder.add(ResourceFactory</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.<i><span style='font-style:italic'>newClassPathResource</span></i>(</span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;com/test/general/test.dsl&quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>),</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ResourceType.</span></font><i><font size=2 color="#0000c0" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0;font-style:
italic'>DSL</span></font></i><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
kbuilder.add(ResourceFactory</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.<i><span style='font-style:italic'>newClassPathResource</span></i>(</span></font><font
size=2 color="#2a00ff" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#2A00FF'>&quot;com/test/general/test-dsl.dslr&quot;</span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>),</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ResourceType.</span></font><i><font size=2 color="#0000c0" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#0000C0;font-style:
italic'>DSLR</span></font></i><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>);</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><b><font size=2 color="#7f0055" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055;font-weight:
bold'>if</span></font></b><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
(kbuilder.hasErrors()) {</span></font><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><b><font size=2 color="#7f0055" face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:#7F0055;font-weight:
bold'>throw</span></font></b><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></font><b><font
size=2 color="#7f0055" face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:#7F0055;font-weight:bold'>new</span></font></b><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'> Exception(kbuilder.getErrors().toString());</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></font><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
KnowledgeBase kbase = KnowledgeBaseFactory.<i><span style='font-style:italic'>newKnowledgeBase</span></i>();</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());</span></font><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></font><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&#8230; and run the same output code I get a list of the
rules that were loaded.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Any clues why the different behavior?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><font size=2
  face=Arial><span style='font-size:10.0pt;font-family:Arial'>Macon</span></font></st1:City></st1:place><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

</div>

</body>

</html>