<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE-AT link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Done.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>greetinx,
michael<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#1f497d" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=DE style='font-size:
10.0pt;font-family:"Tahoma","sans-serif";font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
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> Monday, May 19, 2008 9:11 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?<o:p></o:p></span></font></p>
</div>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </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>
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<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2008/5/19 Michael Katai <<a href="mailto:mk.others@gmx.at">mk.others@gmx.at</a>>:<o:p></o:p></span></font></p>
<div>
<div>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hello Shahad!</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Here my concrete
values:</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> rule</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>
when</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>
then</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>
checkHierachyInstance(...)</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> end</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> function void
checkHierachyInstance(...)</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> {</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>
checkHierachyInstanceRecursive(...);</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> }</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> function void
checkHierachyInstanceRecursive(...)</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> {</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> }</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The only combination
of function names i'm not allowed to use is checkHierachyInstance and
checkHierachyInstanceXXXXX</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I've never seen such a
curiosity before.</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Best regards, michael</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<div style='border:none;border-left:solid windowtext 1.5pt;padding:0cm 0cm 0cm 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'>
<div>
<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>
<p><b><font size=2 face=Tahoma><span lang=DE style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
<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><o:p></o:p></p>
</div>
</div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you Shahad for
your advise, but i doesn't help. I get still the error.</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>regards,</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span lang=EN-US style='font-size:
11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> michael</span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
<p><font size=2 color="#1f497d" face=Calibri><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'> </span></font><o:p></o:p></p>
</div>
<div style='border:none;border-left:solid windowtext 1.5pt;padding:0cm 0cm 0cm 4.0pt;
border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue'>
<div>
<div>
<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>
<p><b><font size=2 face=Tahoma><span lang=DE style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
<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><o:p></o:p></p>
</div>
</div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hi
Michael,<o:p></o:p></span></font></p>
</div>
<div>
<div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>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. <o:p></o:p></span></font></p>
</div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Regards<o:p></o:p></span></font></p>
</div>
<div>
<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Shahad<o:p></o:p></span></font></p>
</div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>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:<o:p></o:p></span></font></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>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><o:p></o:p></span></font></p>
</div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</div>
</div>
</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>
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>
<o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>