AnsweredAssumed Answered

Mule Task calling a external Mule Standalone Server

Question asked by leohackin on Jan 15, 2015
Latest reply on Jan 16, 2015 by leohackin
Hi folks,

I'm working in a Activiti + Mule integration using the Mule Task to call the Mule and get back a response.

Today, my architecture is a Tomcat with the Activiti + Mule as a Service and the Mule Standalone running on other server.
After configure the Activiti to work correctly and make the Mule Task works, I managed to send the request with this configs.

Host: http://localhost:8081/sentMuleMessage
Payload: yes
Language: juel
Result Variable: muleResponse

On Mule side, I've create a simple Http Inbound-Outbound that receives an payload with "yes" or "no" value and set the response to "1" or "0" (or "-1" when the input payload are not recognized).

Whatever, the payload is received by Mule as a org.apache.commons.httpclient.ContentLengthInputStream then when transformed using Object to String turns "??tyes". The other problem is to set the payload response: if I don't transform, the Activiti throws a Exception "Failed to read response value". If I do transform the payload using String to Byte Array, the Activiti don't trhows the exception but the muleResponse value is defined with a byte code like [B@696bba80.

Reading other topic (http://forums.activiti.org/content/using-mule-task-send-messages-activiti-mule) Joram said that to communicate through HTTP with Mule I need to use a regular task.

This is true in this new Activiti version yet and this problems that I get is expected? Or have any other ways to make this work?

Thanks a lot for any help.

Outcomes