<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Mule Task calling a external Mule Standalone Server in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185158#M138288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working in a Activiti + Mule integration using the Mule Task to call the Mule and get back a response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Today, my architecture is a Tomcat with the Activiti + Mule as a Service and the Mule Standalone running on other server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After configure the Activiti to work correctly and make the Mule Task works, I managed to send the request with this configs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Host: &lt;/SPAN&gt;&lt;A href="http://localhost:8081/sentMuleMessage" rel="nofollow noopener noreferrer"&gt;http://localhost:8081/sentMuleMessage&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Payload: yes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Language: juel&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Result Variable: muleResponse&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Reading other topic (&lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/content/using-mule-task-send-messages-activiti-mule" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/content/using-mule-task-send-messages-activiti-mule&lt;/A&gt;&lt;SPAN&gt;) Joram said that to communicate through HTTP with Mule I need to use a regular task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for any help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jan 2015 19:57:56 GMT</pubDate>
    <dc:creator>leohackin</dc:creator>
    <dc:date>2015-01-15T19:57:56Z</dc:date>
    <item>
      <title>Mule Task calling a external Mule Standalone Server</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185158#M138288</link>
      <description>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</description>
      <pubDate>Thu, 15 Jan 2015 19:57:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185158#M138288</guid>
      <dc:creator>leohackin</dc:creator>
      <dc:date>2015-01-15T19:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Mule Task calling a external Mule Standalone Server</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185159#M138289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the payload you are sending to Mule exactly? Is it a Java object? You would need to make sure that the payload is a String to have it sent correctly to Mule and vice versa. We have a couple of simple unit tests available that do exactly this in the activiti-mule module.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 11:31:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185159#M138289</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-01-16T11:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Mule Task calling a external Mule Standalone Server</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185160#M138290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad to hear you. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to the unit tests it's works now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the great help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 16:02:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185160#M138290</guid>
      <dc:creator>leohackin</dc:creator>
      <dc:date>2015-01-16T16:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Mule Task calling a external Mule Standalone Server</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185161#M138291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One more help: when I send "yes" on payload expression, no matter what I do in Mule, the results is ??t"yes".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried convert using Object-to-String trasformer only, Object-to-Byte-Array transformer followed by Byte-Array-to-String transformer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result is always this &amp;lt;code&amp;gt;??t[payload-expression]&amp;lt;/code&amp;gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tested sending a similar request from other ways and worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ON the unit tests, don't have any example of Mule's transformation with the received Activiti data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you help me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 17:25:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185161#M138291</guid>
      <dc:creator>leohackin</dc:creator>
      <dc:date>2015-01-16T17:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Mule Task calling a external Mule Standalone Server</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185162#M138292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've managed to get the right value from Activiti. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To achieve this, I've used this sequence of transformers inside Mule:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;Object To Byte Array –&amp;gt; Byte Array to Object –&amp;gt; Object to String&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that it is needed because the Activiti sends a Object instead of a pure String, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, thanks again. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 18:02:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mule-task-calling-a-external-mule-standalone-server/m-p/185162#M138292</guid>
      <dc:creator>leohackin</dc:creator>
      <dc:date>2015-01-16T18:02:14Z</dc:date>
    </item>
  </channel>
</rss>

