Question Around Spring Context and Activiti Tasks

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Question Around Spring Context and Activiti Tasks

Hello everyone, I am working on integrating a camel route with an activiti process (using activiti-camel engine).  My question is, I have spring beans defined in a camel-beans.xml such as

        <bean id="liveDataClient" class="com.vizexplorer.techviz.client.LiveDataClient">
            <constructor-arg ref="serverConfig"/>
            <constructor-arg ref="liveDataConfig"/>

Activiti uses some POJOs for task delegation and I want to be able to reference this bean much in the same way I do via the processors where it is passed in via spring loader.  Can I just define the activiti tasks the same way I would define a processor?

        <bean id="eventProcessor" class="com.vizexplorer.techviz.processor.EventProcessor">
                <property name="liveDataClient" ref="liveDataClient"/>

I am not sure if this is a specific question around activiti or camel spring loading to be honest.  If that doesn't work, is it an accepted practice to request a context directly such as

ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:camel-beans.xml");