<br> Michael,<br><br> Can you please open a JIRA for it?<br> It is probably a problem with a text replace algorithm that is being used.<br><br> []s<br> Edson<br><br><div class="gmail_quote">2008/5/19 Michael Katai <<a href="mailto:mk.others@gmx.at">mk.others@gmx.at</a>>:<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="purple" lang="DE-AT">
<div>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Hello
Shahad!</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Now,
i've a solution for my problem and it looks like a Bug. First, the order
of the functions isn't important, but I think it's a very strange
problem with the name of my functions.</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Here
my concrete values:</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
rule</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
when</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
then</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
checkHierachyInstance(...)</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
end</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
function void checkHierachyInstance(...)</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
{</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
checkHierachyInstanceRecursive(...);</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
}</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
function void checkHierachyInstanceRecursive(...)</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
{</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
}</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">As
far as i have found out, the error occurs ONLY if I append anything to the
functionname "checkHierachyInstance", in my case the word "Recursive".
It works if I use a completely different name instead of "checkHierachyInstanceRecursive"
or exchange a character in "checkHierachyInstanceRecursive". For
example i can use "function void myFunc(...)" or "function
void checkHierachyInstancRecursive(...)".</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">The
only combination of function names i'm not allowed to use is checkHierachyInstance
and checkHierachyInstanceXXXXX</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">I've
never seen such a curiosity before.</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Best
regards, michael</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0cm 0cm 0cm 4pt;">
<div>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-weight: bold;" lang="DE">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt;" lang="DE">
<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>Michael Katai<br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, May 19, 2008 6:00 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] Call a
function from a function?</span></font></p>
</div>
</div><div class="Ih2E3d">
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Thank
you Shahad for your advise, but i doesn't help. I get still the error.</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">regards,</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
michael</span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></font></p>
<p><font color="#1f497d" face="Calibri" size="2"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></font></p>
</div><div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0cm 0cm 0cm 4pt;"><div class="Ih2E3d">
<div>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-weight: bold;" lang="DE">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt;" lang="DE">
<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>Shahad Ahmed<br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, May 19, 2008 3:57 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] Call a
function from a function?</span></font></p>
</div>
</div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div><div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi Michael,</span></font></p>
</div><div><div></div><div class="Wj3C7c">
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">I had a similar problem, but found that if I declared func2 before
func1 (i.e. func2 appears above func1 in a drl file) then you can call func2 in
func1. I'm not sure if this is a bug in drools or a limitation of the parser. </span></font></p>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Regards</span></font></p>
</div>
<div>
<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Shahad</span></font></p>
</div>
<div>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Mon, May 19, 2008 at 1:58 PM, Michael Katai <<a href="mailto:mk.others@gmx.at" target="_blank">mk.others@gmx.at</a>> wrote:</span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hello!<br>
<br>
Is it possible to call a Function in a Function?<br>
<br>
For example:<br>
<br>
rule<br>
when<br>
then<br>
func1(data1, data2);<br>
end<br>
<br>
function void func1(MyClass1 data1, MyClass2 data2)<br>
{<br>
func2(data1, data2);<br>
}<br>
<br>
function void func2(MyClass1 data1, MyClass2 data2)<br>
{<br>
}<br>
<br>
When I do so, i get the error message:<br>
<br>
func1 : Function Compilation error<br>
func1 (line:x): The method func2(MyClass1, MyClass2) is undefined for the<br>
type Func1<br>
<br>
Any suggestions?<br>
michael<br>
<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>
</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><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>