cancel
Showing results for 
Search instead for 
Did you mean: 

Camel InOut ExchangePattern with Activiti

mitchworld
Champ in-the-making
Champ in-the-making
Hi there,

I need help with the following setup:

Camel manages a CXF SOAP/HTTP web service endpoint for incoming requests (orders).
When a order-request comes in, Camel activates the corresponding route.
Once the corresponding camel route is called, I want Camel to delegate the request processing to an activiti process.

So far, so good. The problem is that I want to create a synchronous SOAP response from the result of the activiti process.

Is there a way to have an Activiti process produce a result that is fed back to the Camel-setup that initially triggered the Activiti-process? In other words: Does the activiti-component support the Camel InOut exchange-pattern? And how?

I'm using something like:

<camelContext>
  <route>
    <from uri="cxf:bean:mySoapEndpoint" />
    <to uri="activiti:myprocess" />
  </route>
</camelContext>

Any ideas?
2 REPLIES 2

mitchworld
Champ in-the-making
Champ in-the-making
Here's the code that I am using.

<camelContext>
  <route>
    <from uri="cxf:bean:mySoapServiceEndpoint" />
    <to uri="activiti:myProcess" />
  </route>
</camelContext>

mitchworld
Champ in-the-making
Champ in-the-making
Answering my own question:
Looking at the activiti implementation code, Activiti doesn't set the body of the output message. So the Camel activiti-component itself doesn't support the InOut pattern.
To workaround this, after executing the Activiti process from Camel, you have to explicitly set the body content by adding something like:


    <to uri="acticiti:myProcess" />
    <setBody>…</setBody>
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.