[jboss-user] [jBPM] - Re: Inserting new facts into a running process?
Miloud Haimoune
do-not-reply at jboss.com
Tue Jun 19 04:41:48 EDT 2012
Miloud Haimoune [https://community.jboss.org/people/milhaim] created the discussion
"Re: Inserting new facts into a running process?"
To view the discussion, visit: https://community.jboss.org/message/742606#742606
--------------------------------------------------------------
Hi,
First you need to add a AgendaEventListener to fire all rules automatically :
new AgendaEventListener() {
.....
public void afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event,
WorkingMemory workingMemory) {
* workingMemory.fireAllRules();*
}
second an other listner to update the working memery after a change on the processInstane
return new ProcessEventListener() {
....
public void afterVariableChanged(ProcessVariableChangedEvent event) {
org.drools.runtime.rule.FactHandle handle = event.getKnowledgeRuntime().getFactHandle( event.getProcessInstance() );
event.getKnowledgeRuntime().update( handle, event.getProcessInstance() );
}
more here : https://community.jboss.org/message/608017#608017 https://community.jboss.org/message/608017
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742606#742606]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120619/533a2490/attachment-0001.html
More information about the jboss-user
mailing list