]
Edson Tirelli closed JBRULES-273.
---------------------------------
Resolution: Done
I reopened the wrong ticket. Sorry.
Nesting function calls, and functions calling anther function
-------------------------------------------------------------
Key: JBRULES-273
URL:
http://jira.jboss.com/jira/browse/JBRULES-273
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Reporter: Michael Neale
Assigned To: Edson Tirelli
Fix For: 3.0-rc3
Attachments: FunctionBuilder.java, FunctionFixer.java
Ricardo Barone (ricardo.barone(a)auster.com.br) contributed some improvements around
function handling.
I've applied a couple of small changes that enables to 1) call a function from the
body of another function (same DRL) and 2) call a function inside the parameter of another
method call as in:
rule
when
...
then
if ( function1() ) {
System.out.println( function2() );
}
end
In FunctionFixer, I've changed "matcher.find()" to
"matcher.find(startIndex)" to be able to search inside method parameters (after
a '(').
In FunctionBuilder, I've changed "functionDescr.getText()" to
"functionFixer.fix(functionDescr.getText())".
Since FunctionFixer is temporary, I don't know if you'll want to add those.
Ricardo
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: