Tihomir Surdilovic [http://community.jboss.org/people/tsurdilovic] created the discussion
"Re: Invocation of rule task in JBPM - Using JPA and within Web App" To view the discussion, visit: http://community.jboss.org/message/638491#638491 -------------------------------------------------------------- Not sure why you say you cannot use AgendaEventListener? Can you elaborate? Here is one example (you have to do a little bit of casting...) final org.drools.event.AgendaEventListener agendaEventListener = new org.drools.event.AgendaEventListener() { public void activationCreated(ActivationCreatedEvent event, WorkingMemory workingMemory){ } public void activationCancelled(ActivationCancelledEvent event, WorkingMemory workingMemory){ } public void beforeActivationFired(BeforeActivationFiredEvent event, WorkingMemory workingMemory) { } public void afterActivationFired(AfterActivationFiredEvent event, WorkingMemory workingMemory) { } public void agendaGroupPopped(AgendaGroupPoppedEvent event, WorkingMemory workingMemory) { } public void agendaGroupPushed(AgendaGroupPushedEvent event, WorkingMemory workingMemory) { } public void beforeRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event, WorkingMemory workingMemory) { } public void afterRuleFlowGroupActivated(RuleFlowGroupActivatedEvent event, WorkingMemory workingMemory) { workingMemory.fireAllRules(); } public void beforeRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event, WorkingMemory workingMemory) { } public void afterRuleFlowGroupDeactivated(RuleFlowGroupDeactivatedEvent event, WorkingMemory workingMemory) { } }; ((StatefulKnowledgeSessionImpl) ((KnowledgeCommandContext) ((CommandBasedStatefulKnowledgeSession) ksession) .getCommandService().getContext()).getStatefulKnowledgesession() ) .session.addEventListener(agendaEventListener); -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/638491#638491] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
