<?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 Receive Task does not subscribe and receive message event in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/receive-task-does-not-subscribe-and-receive-message-event/m-p/235006#M188136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a process which defines a 'message' event&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;message id="Task_Message" name="Task Message"/&amp;gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and includes a ReceiveTask to receive that particular message&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;receiveTask id="Receive_Balance_Message" name="Receive Balance Message" messageRef="Task_Message"/&amp;gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When the process starts and eventually reaches the ReceiveTask node, with new entry created in ACT_RU_EXECUTION table as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the event subscription (correlation to message name) is not established, with ACT_RU_EVENT_SUBSCR table remaining empty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When we we try to post the message, the event subscription query returns no active subscribers for that message, and the process ever advances past the receive task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;Execution&amp;gt; executions = runtimeService.createExecutionQuery().messageEventSubscriptionName("Task Message").list();&lt;BR /&gt;for (Execution execution : executions) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;runtimeService.messageEventReceived("Task Message", execution.getId()));&lt;BR /&gt;}&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;/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;Does Activiti 5.21 fully implement ReceiveTask functionality? What could be the reason that the message correlation is not established?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The user guide mentions "currently we have only implemented Java semantics for this task" but suggests messages can be received nevertheless. If that is still the case, could we expect message events are implemented in Activiti 6.0?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please advise!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2016 00:51:21 GMT</pubDate>
    <dc:creator>andrey_nikolov</dc:creator>
    <dc:date>2016-09-20T00:51:21Z</dc:date>
    <item>
      <title>Receive Task does not subscribe and receive message event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/receive-task-does-not-subscribe-and-receive-message-event/m-p/235006#M188136</link>
      <description>I have a process which defines a 'message' event&amp;lt;message id="Task_Message" name="Task Message"/&amp;gt;‍‍‍and includes a ReceiveTask to receive that particular message&amp;lt;receiveTask id="Receive_Balance_Message" name="Receive Balance Message" messageRef="Task_Message"/&amp;gt;‍‍‍When the process starts a</description>
      <pubDate>Tue, 20 Sep 2016 00:51:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/receive-task-does-not-subscribe-and-receive-message-event/m-p/235006#M188136</guid>
      <dc:creator>andrey_nikolov</dc:creator>
      <dc:date>2016-09-20T00:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Receive Task does not subscribe and receive message event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/receive-task-does-not-subscribe-and-receive-message-event/m-p/235007#M188137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Andrey!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ReceiveTask is not intended to receive messages by subscription, it merely persists process and waits for any signal on its execution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at "8.5.10. Java Receive Task" section in activiti user guide:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessInstance pi = runtimeService.startProcessInstanceByKey("receiveTask");&lt;BR /&gt;Execution execution = runtimeService.createExecutionQuery()&lt;BR /&gt;&amp;nbsp; .processInstanceId(pi.getId())&lt;BR /&gt;&amp;nbsp; .activityId("waitState")&lt;BR /&gt;&amp;nbsp; .singleResult();&lt;BR /&gt;assertNotNull(execution);&lt;BR /&gt;&lt;BR /&gt;runtimeService.signal(execution.getId());&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to send signal/message through subscription, you need either signalCatchingEvent or messageCatchingEvent. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 09:38:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/receive-task-does-not-subscribe-and-receive-message-event/m-p/235007#M188137</guid>
      <dc:creator>warper</dc:creator>
      <dc:date>2016-09-20T09:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Receive Task does not subscribe and receive message event</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/receive-task-does-not-subscribe-and-receive-message-event/m-p/235008#M188138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Andrey,&lt;/P&gt;&lt;P&gt;Warper has provided a good technical explanation, but I wanted to add a little more "colour" to your questions below....&lt;/P&gt;&lt;P&gt;&amp;lt;snip&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Does Activiti 5.21 fully implement ReceiveTask functionality? What could be the reason that the message correlation is not established?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;The user guide mentions "currently we have only implemented Java semantics for this task" but suggests messages can be received nevertheless. If that is still the case, could we expect message events are implemented in Activiti 6.0?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;lt;/snip&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;BR /&gt;Activiti (5 and 6) rely on a message framework injecting messages into the workflow engine. We have done this using message driven beans when running on a J2EE app server, or more easily using Camel or Mule.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;The easiest way (IMO) to tie activiti into a JMS, ActiveMQ, email or other messaging system is to use the available camel (or mule) service tasks.&lt;BR /&gt;&lt;BR /&gt;If you want to use the generic receive message, you will need to have a class "signal" the execution :&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: black; background: #eeeeee; border: 1px dashed #666666; padding: 1.25em 1.5625em 1.125em;"&gt;&lt;CODE data-lang="java" style="color: black;"&gt;runtimeService.signal(execution.getId());&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;In order to let it proceed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Hope this helps,&lt;BR /&gt;Greg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 14:06:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/receive-task-does-not-subscribe-and-receive-message-event/m-p/235008#M188138</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2016-12-15T14:06:40Z</dc:date>
    </item>
  </channel>
</rss>

