AnsweredAssumed Answered

Activiti 5.17.0 and spring configuration

Question asked by butik on Feb 25, 2015
Latest reply on Feb 28, 2015 by jbarrez

I have rest web application who were based on previous version of activiti rest(5.16.4), now I'm migrating it to latest version and faced some problem with circular spring dependency.

here is my spring config:
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
    <property name="typedEventListeners">
            <entry key="TASK_ASSIGNED" >
                   <ref bean="setTaskVariablesListener" />

<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
     <property name="processEngineConfiguration" ref="processEngineConfiguration" />

<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />

<bean id="setTaskVariablesListener" class="com.project.engine.event.SetTaskVariablesListener">
       <property name="taskService" ref="taskService" />  —-   problem is here


I have to set some listener to process engine configuration, this listener depends on task service, but task service couldn't be created without process engine who depends on process engine configuration, so I'm getting some initialization exception.

At previous activiti version it was solved with AcivitiUtil.getTaskService(), but it's removed from version 5.17.0.

Could, somebody, please advise how it can be solved?