Write your function as a static function.
Both rules have to import this function just like importing class
By using BRMS you put your function as a function asset and any rule can
(from the same package) can use it
regards
Ady Bastian wrote:
I have same functions that is used on two rule files (.drl), is it
possible to
share the functions without write it twice.. ?
Example :
-------------------
file: rule1.drl
rule "rule_on_file_1"
when
....
call_function();
end
--------------------
file: rule2.drl
rule "rule_on_file_2"
when
....
call_function();
end
---------------------
call_function is a drool function :
function call_function() {
....
}
--
View this message in context:
http://www.nabble.com/how-to-share-functions-between-drl-files---tp189764...
Sent from the drools - user mailing list archive at
Nabble.com.