megachucky (17) [Avatar] Offline
#1
Hello,

I really like this combination. Though, I do not like Spring that much. I tried to use Activiti without or at least with less Spring configuration. I get several different exceptions when trying to change some code of your book examples.

You write in the book: "The Activiti Camel module uses Spring as a container to bind the Activiti engine beans with the Camel context beans."

So, is it possible to use Activiti and Camel without or with less Spring, or does the implementation require Spring that much? In your example, you have acitviti-application-context and spring-application-context. I would like to create CamelContext in Java, not Spring. I also looked at the source code of the component a little bit, but I did not find out how I can add the activiti-component to the CamelContext respecitvely how to use CamelBehaviour without Spring.

I also tried to use org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration instead of org.activiti.spring.SpringProcessEngineConfiguration to use @Deployment, new Rule("config.xml"), rule.getRuntimeService(), and so on. Again, I got several problems which I could not solve in an acceptable time.

Maybe you can give an example? Probably, several people do not want to use so much Spring configuration ?! (of course, I do not want to start the "Spring vs. no Spring" flame war here).

Thanks for help...
tijs.rademakers (494) [Avatar] Offline
#2
Re: Activiti and Camel without Spring?
Hi,

Well, I don't see a real reason why this should be dependent on the Spring container. The issue is that you need a container where both Camel and Activiti can run in. So you would need a way to make the Activiti Engine available in the Camel context. Are you that familiar with Camel that you can tell if this would be possible?

Best regards,

Tijs
megachucky (17) [Avatar] Offline
#3
Re: Activiti and Camel without Spring?
Hey Tijs,

thanks for the quick answer. I am not THAT familiar with Camel.

As you mention, both Activiti and Camel run in the Spring container. Probably, it is some effort to use this combination without Spring. I will stop trying for the moment and use the Spring container smilie

By the way:
I investigated the source code of Activiti and its Camel component a little bit more, yesterday in the evening. I still do not understand how or where the camel component "ActivitiComponent" is added to the CamelContext. But I found out that it is no configuration, because "activiti" as part of the camel endpoint url is a hardcoded String in the source code...