public RemoveEventListenerCommand(ProcessEventListener listener) {
this.processEventListener = listener;
}
public Object execute(Context context) {
StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
if ( workingMemoryEventListener != null ) {
ksession.removeEventListener( workingMemoryEventListener );
} else if ( agendaEventListener != null ) {
ksession.removeEventListener( agendaEventListener );
} else {
ksession.removeEventListener( processEventListener );
}
return null;
}