<?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 Expose custom JMS TextMessage property to JavaDelegate in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/expose-custom-jms-textmessage-property-to-javadelegate/m-p/195633#M148763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an Activiti workflow being triggered by a queue via Camel.&amp;nbsp; Route:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;from("activemq:test.queue")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .log(LoggingLevel.INFO, "Received message ${body}")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .to("activiti:simpleProcess");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message send:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;TextMessage msg = session.createTextMessage(sw.toString());&lt;BR /&gt;msg.setStringProperty("a_value", "12345");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only Task in simpleProcess is a JavaDelegate which I will be using to interrogate the both the message body and I need exposure to the JMS property that was set on the message.&amp;nbsp; The message body is visible as variable "camelBody" as expected and I can grab the body data from the DelegateExecution, but no sign of the custom property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried setting "copyVariablesFromProperties=true" on the route per what the user guide seemed to indicate I should do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;from("activemq:test.queue")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .log(LoggingLevel.INFO, "Received message ${body}")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .to("activiti:simpleProcess?copyVariablesFromProperties=true");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But that resulted in the following exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ERROR DefaultErrorHandler - Failed delivery for (MessageId: ID:U0172348-TPD-A-58680-1405716802892-1:1:1:1:1 on ExchangeId: ID-U0172348-TPD-A-58673-1405716796591-0-1). Exhausted after delivery attempt: 1 caught: org.activiti.engine.ActivitiException: couldn't find a variable type that is able to serialize org.apache.camel.component.jms.JmsBinding@1e707c5&lt;BR /&gt;org.activiti.engine.ActivitiException: couldn't find a variable type that is able to serialize org.apache.camel.component.jms.JmsBinding@1e707c5&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how do I get access to these properties?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jul 2014 20:55:31 GMT</pubDate>
    <dc:creator>karl_berger</dc:creator>
    <dc:date>2014-07-18T20:55:31Z</dc:date>
    <item>
      <title>Expose custom JMS TextMessage property to JavaDelegate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/expose-custom-jms-textmessage-property-to-javadelegate/m-p/195633#M148763</link>
      <description>I have an Activiti workflow being triggered by a queue via Camel.&amp;nbsp; Route:from("activemq:test.queue")&amp;nbsp;&amp;nbsp;&amp;nbsp; .log(LoggingLevel.INFO, "Received message ${body}")&amp;nbsp;&amp;nbsp;&amp;nbsp; .to("activiti:simpleProcess");‍‍‍Message send:TextMessage msg = session.createTextMessage(sw.toString());msg.setStringProperty("a_value", "12</description>
      <pubDate>Fri, 18 Jul 2014 20:55:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/expose-custom-jms-textmessage-property-to-javadelegate/m-p/195633#M148763</guid>
      <dc:creator>karl_berger</dc:creator>
      <dc:date>2014-07-18T20:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Expose custom JMS TextMessage property to JavaDelegate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/expose-custom-jms-textmessage-property-to-javadelegate/m-p/195634#M148764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for posting this example. There's a problem with copying all properties from Camel to Activiti, in particular the JmsBinding. When copying the JMS message body you only get the text message right? Would it be possible to add the custom property to the text message body? For the property copy failure, would it be possible to create a unit test showing this issue? That would make it a lot easier for us to reproduce and fix it.&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>Mon, 21 Jul 2014 08:51:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/expose-custom-jms-textmessage-property-to-javadelegate/m-p/195634#M148764</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-07-21T08:51:13Z</dc:date>
    </item>
  </channel>
</rss>

