<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="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]-->
<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:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
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=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Yes&#8230;.for the most part, a non
developer wouln&#8217;t be able to write the rules anyway&#8230;.you need
someone with domain knowledge of the objects being injected, so I don&#8217;t
see a non developer writing rules. &nbsp;&nbsp;&nbsp;I was trying to take the
approach that if, from the application code perspective, I only worrry about
injecting objects I wish to reason on, and not try to think of new functions,
new stats/bookkeeping classe I might need..if I can demonstrate doing that all
within the rule, it seems to show it&#8217;s flexibility more than having to
modify your codebase(beyond simple session/api calls) to analyze those objects
you are injecting. &nbsp;<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'>One think to keep in mind is that I am
utilizing mainly Fusion&#8230;since I am dealing with sensor type data simply
being fed into the system contintuously, so It&#8217;s very fluid as to the types
of calculations/rules I might have to implement compared perhaps with a
standard business object type of data. &nbsp;&nbsp;I want to become a guru and
munging, creating, and using all sorts of constructs within Fusion for being
able to accomplish almost any rule withought having to do anything besides
simply injecting my sensor data ojbects into the memory stream&#8230;in my
mind, that will lead me to the greatest flexibility and demostration of the power
of being able to add the rules engine onto an already fully functioning and
robust application that was written without planning for rules automation. &nbsp;<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 should mention I do not use the eclipse
plugin or eclipse at all for my rules testing/development, so I don&#8217;t
have any issues with eclipse plugin not breaking. <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'>So&#8230;.assuming I *<b><span
style='font-weight:bold'>did</span></b>* want to put a simple function in my
.drl file&#8230;.*where* do I have to put it? &nbsp;My oringal question about
how to make a simple function declaration is still a mystery to me. &nbsp;<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'>Thanks<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'>Chris<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=3 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>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, June 18, 2009 2:25
PM<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]
functions</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 style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
&nbsp;&nbsp; Chris,<br>
<br>
&nbsp;&nbsp; I understand. Although functions in DRL files where conceived to
be very simple things to reside with the rules. So, although you can have a DRL
file with all your functions and, as long as this file is the first you load
into your knowledge builder, use the functions on other files, we did not
implement any king of specific multifile import... meaning that the eclipse
plugin, for instance, will raise errors when accessing functions from one file
into another... but your application will run fine...<br>
<br>
&nbsp;&nbsp; Regarding recompiling the application, I think you just said that
meaning recompiling the java file with the functions right? since the java file
can be anywhere, including your domain model jar or even in a jar by himself...
in any case, be it a function or a java static method, it is code and you will
need a developer to do it, right?<br>
<br>
&nbsp;&nbsp; []s<br>
&nbsp;&nbsp; Edson<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2009/6/18 Chris Richmond &lt;<a href="mailto:crichmond@referentia.com">crichmond@referentia.com</a>&gt;<o:p></o:p></span></font></p>

<div link=blue vlink=blue>

<div>

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

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

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Thanks&#8230;and I am considering that option as
well&#8230;but the nice thing about the functions in the drl file is the system
remains much more fluid..in other words, if I can focus on doing what I want to
do all within the DRL file, it proves the flexibility of the system more to me
than having to have&nbsp; developer recompile the application itself with new
classes. &nbsp;Does that make sense?&nbsp;&nbsp; Also, I would just like to
know that I can actually make functions work for future reference.</span></font><o:p></o:p></p>

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

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

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

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

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></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=3 width="100%" align=center>

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

<p><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'> <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>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, June 18, 2009 1:15
PM<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]
functions</span></font><o:p></o:p></p>

</div>

<div>

<div>

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

<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
&nbsp;&nbsp; Chris,<br>
<br>
&nbsp;&nbsp; If you are creating a function library, why don't you create it as
static methods in a java class? easier to develop, to unit test and you can use
&quot;import function&quot; in the DRL to import all of them.<br>
<br>
&nbsp;&nbsp; []s<br>
&nbsp;&nbsp; Edson<o:p></o:p></span></font></p>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>2009/6/18
Chris Richmond &lt;<a href="mailto:crichmond@referentia.com" target="_blank">crichmond@referentia.com</a>&gt;<o:p></o:p></span></font></p>

<div link=blue vlink=purple>

<div>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Ok&#8230;I
am trying to build a function library in my .drl file and I added this one test
function</span></font><o:p></o:p></p>

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

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>function
String outputString(String sData){</span></font><o:p></o:p></p>

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

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

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

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>And
no matter where I place this in my .drl file, I get an exception one way or the
other with compiling when I try instaniate and fire my rules. &nbsp;The .drl
file works exactly as expected if I remove this function declaration, and when
I *<b><span style='font-weight:bold'>do</span></b>* try to add it, I do not
actually call it anywhere&#8230;but get those errors. &nbsp;</span></font><o:p></o:p></p>

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

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>So
my question is, where exactly do I need to place function declarations..</span></font><o:p></o:p></p>

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

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

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

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><br>
Chris</span></font><o:p></o:p></p>

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

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

</div>

</div>

<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><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><o:p></o:p></span></font></p>

</div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
<br clear=all>
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com"
target="_blank">www.jboss.com</a><o:p></o:p></span></font></p>

</div>

</div>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><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><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><o:p></o:p></span></font></p>

</div>

</body>

</html>