techy wrote:
Hello,
>From the below example, Do I need to make function
"incrementExecutionCount()" threadSafe here or does drools make threadSafe
call to external functions? Please someone clarify. Thanks.
Drools is single threaded, it will only execute one rule at a time, so
as long as nothing from outside of the engine is calling that function,
you don't need to worry.
global SampleDao dao;
rule "1"
when "some condition on fact"
then
Rule r = dao.getRule("1");
r.incrementExecutionCount();
end