Configuring ActivitiEventListener as managed bean (CDI)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2016 06:57 AM
Hi,
I am using Activiti+CDI and need to register ActivitiEventListener. It works well if configured in activiti cfg xml:
But if I need to configure my listener using CDI (injecting logger, services …), it doesn't work. I tried add annotation @Named to the class, but it doesn't help:
Is this use case supported?
Thx
Miran
I am using Activiti+CDI and need to register ActivitiEventListener. It works well if configured in activiti cfg xml:
<bean id="processEngineConfiguration" class="org.activiti.cdi.CdiStandaloneProcessEngineConfiguration"> …. <property name="eventListeners"> <list> <bean class="mycompany.activiti.impl.ActivitiProcessListener" /> </list> </property> </bean>
But if I need to configure my listener using CDI (injecting logger, services …), it doesn't work. I tried add annotation @Named to the class, but it doesn't help:
@Namedpublic class ActivitiProcessListener implements ActivitiEventListener { …}
Is this use case supported?
Thx
Miran
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 05:24 AM
No, I don't think so. You'd need to get your process engine or your engine configuration bean and add it programmatically.
