Specific eventListeners for specific type

Hi, My application has two flows for different types like “Task” and “Invoicing”.both of them have different flows.
I have two EventListeners (onExecutionEvent and onTaskEvent) . both of these EventListeners do very specific things related to Invoicing. I think I should have another EventListeners specific to “Task”. But then, all of these will get called regardless of the type. How can I get only a specific EventListener to get executed for a specific type? I can pass conditions to EventListeners but should that information be passed when creating the process definition?.

Hey @tusharaga,

if the “type” you are talking about is the task type, then I think what you are looking for are BPMN Parse Listener. You should have a look at the following example, showing how to use them as a process engine plugin: camunda-bpm-examples/process-engine-plugin/bpmn-parse-listener/

Happy to help you :slight_smile:
Luc

Hi @lwluc ,
By type, I am referring to different process definitions. and “Task” is not Camunda/BPMN tasks, it is my own Entity.