문제

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