My guvnor rule is like :

Rule "aa" 
 dialect "mvel" 
  when 
    Fund( amount> 10000 ) 

then 
 Alert fact0 = new Alert(); 
 fact0.setSummary( "hi" ); 
 insert( fact0 ); 
end 

and using stateless knowledge session. Now I want to get that fact0 in code. How to do that?
Please help me.

有帮助吗?

解决方案

The most drools-friendly way to do it is by using queries. Another option is to use ksession.getObjects(). You can take a look to this answer: Retrieving facts of a specific type from working memory

Hope it helps,

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top