JBoss Community

Re: fireAllRules() in a loop issue

created by Miloud Haimoune in jBPM - View the full discussion

I am already using the AgendaEventListener to automatically fireAllRules, I added a ProcessEventListner to update the working memory, and now it's working fine.

 

the method to override (more here : https://community.jboss.org/message/608017):

 

public void afterVariableChanged(ProcessVariableChangedEvent event) {

                 org.drools.runtime.rule.FactHandle handle = event.getKnowledgeRuntime().getFactHandle( event.getProcessInstance() );

                 if(handle != null){

                                event.getKnowledgeRuntime().update( handle, event.getProcessInstance() );

                 }

}

 

Many thanks

Reply to this message by going to Community

Start a new discussion in jBPM at Community