Question

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.

Was it helpful?

Solution

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,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top