AnsweredAssumed Answered

Camel integration

Question asked by mas82 on Jul 9, 2014
Latest reply on Jul 29, 2014 by mas82
Hi All,

I followed this article http://bpmn20inaction.blogspot.co.uk/2013/03/using-camel-routes-in-activiti-made.html and the Activiti in action book to setup Activiti with Camel. The examples provided work fine but I wanted Camel to use an external ActiveMQ broker. I set this up like this:

<bean id="activemq"
        class="org.apache.activemq.camel.component.ActiveMQComponent">
        <property name="brokerURL" value="tcp://somehost:60616"/>
</bean>

I wanted the message to be passed from Activiti to an external queue ("activemq:firstQueue"), from where it would be consumed by some application. This application would do some processing and put the message onto "activemq:secondQueue". From there the message would be routed back to Activiti:
My routes are:

from("activiti:process_camel:camelTask").to("seda:asyncQueue");
from("seda:asyncQueue").to("activemq:firstQueue");
from("activemq:secondQueue").to("seda:receiveQueue");
from("seda:receiveQueue").to("activiti:process_camel:receiveTask");

When I run a process instance using these routes I get this:

org.activiti.engine.ActivitiIllegalArgumentException: Business key is null

Is it possible to use an external ActiveMQ broker in this way with Activiti and Camel?

Outcomes