AnsweredAssumed Answered

Configuring ActivitiEventListener as managed bean (CDI)

Question asked by miran on May 23, 2016
Latest reply on May 31, 2016 by jbarrez
Hi,

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:


@Named
public class ActivitiProcessListener implements ActivitiEventListener {
   …
}


Is this use case supported?

Thx
Miran

Outcomes