<?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 Error while signaling an activity (receive task) in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117818#M83170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are facing an intermittent issue when attempting to signal an existing process instance receive task. The approach we have taken is to signal via the API as defined in &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#N12ABE" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#N12ABE&lt;/A&gt;&lt;SPAN&gt;. However, on occasion we are getting an ActivitiException indicating the target execution does not exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To try and better describe the problem, below is a summary of our execution flow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;1. An Activiti process instance is started that will generate a JMS message and post it to a queue hosted on the same application server.&lt;/UL&gt;&lt;UL&gt;2. After successfully publishing the JMS message, the process flow transitions into a receive activity, where it will wait to be signalled.&lt;/UL&gt;&lt;UL&gt;3. An external application will consume the published JMS message, do some processing and publish a response JMS message.&lt;/UL&gt;&lt;UL&gt;4. A Spring integration component will consume the JMS response message and attempt to signal the waiting receive task via &lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;runtimeService.signal(correlation, input);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt; where the correlation comes from the JMS message and was originally published by the process via &lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;execution.getId()&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/UL&gt;&lt;SPAN&gt;The above execution flow results in one of two outcomes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;a. Activiti process is successfully signalled and process flow continues without any problems.&lt;/UL&gt;&lt;UL&gt;b. The Spring integration component fails when trying to signal the process with the following exception. &lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;2012-11-19 23:00:28,169 [org.springframework.jms.listener.DefaultMessageListenerContainer#1-1][…][9e2ad17a-1077-456d-a134-9&lt;BR /&gt;efdfa046e4f] ERROR - Executing BPMN Process&lt;BR /&gt;org.activiti.engine.ActivitiException: execution 105918 doesn't exist&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.cmd.SignalCmd.execute(SignalCmd.java:53)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.activiti.engine.impl.RuntimeServiceImpl.signal(RuntimeServiceImpl.java:142)&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;/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;/UL&gt;&lt;SPAN&gt;Looking into the database I can see the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;1. ACT_HI_ACTINST table has persisted all activity up to the receive task. The record has a START_TIME_, but the END_TIME_ is empty.&lt;/UL&gt;&lt;UL&gt;2. ACT_RU_EXECUTION table has a record for the target execution. i.e. &lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;select *&lt;BR /&gt;from act_ru_execution&lt;BR /&gt;where proc_inst_id_ = 105918;&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; returns a single record. I am not sure of the meaning of all the columns, so I have included some of these below:&lt;BR /&gt;IS_ACTIVE_ = 1&lt;BR /&gt;IS_CONCURRENT_ = 0&lt;BR /&gt;IS_SCOPE_ = 1&lt;BR /&gt;IS_EVENT_SCOPE_ = 0&lt;BR /&gt;SUSPENSION_STATE_ = 1&lt;BR /&gt;CACHED_ENT_STATE_ = 7&lt;/UL&gt;&lt;SPAN&gt;I remember reading a post on this forum in the past that suggested the runtimeService would need to have the process instance persisted to the database before it can be signalled. Some debugging through the Activiti code seemed to suggest the same. Given the intermittent nature of our problem and the fact that it seems to occur at times when the external processing is very quick (see step 3. above), it would seem that this could the root cause of our problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone please confirm this understanding and if correct are there any alternative ways of signalling a process instance?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Luka&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Nov 2012 23:57:42 GMT</pubDate>
    <dc:creator>luka</dc:creator>
    <dc:date>2012-11-21T23:57:42Z</dc:date>
    <item>
      <title>Error while signaling an activity (receive task)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117818#M83170</link>
      <description>Hi,We are facing an intermittent issue when attempting to signal an existing process instance receive task. The approach we have taken is to signal via the API as defined in http://activiti.org/userguide/index.html#N12ABE. However, on occasion we are getting an ActivitiException indicating the targe</description>
      <pubDate>Wed, 21 Nov 2012 23:57:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117818#M83170</guid>
      <dc:creator>luka</dc:creator>
      <dc:date>2012-11-21T23:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error while signaling an activity (receive task)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117819#M83171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As long as the process is still "flowing", the process is not persisted up to that state and the process cannot be signaled. I'm afraid there are no alternatives for this, other than queuing/retrying the signal() API-calls after "execution nog found" exception occurs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 08:53:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117819#M83171</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-11-22T08:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error while signaling an activity (receive task)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117820#M83172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;…so can anyone suggest a workaround for this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to ensure the instance is persisted?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am about to implement this very pattern and this concerns me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2013 00:22:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117820#M83172</guid>
      <dc:creator>fitzcaraldo</dc:creator>
      <dc:date>2013-03-08T00:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error while signaling an activity (receive task)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117821#M83173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This topic has also been discussed in a separate thread that offers a solution. In short, it has to do with how you control your transactional boundaries, but for more information please see &lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=5859" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?f=6&amp;amp;t=5859&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2013 03:02:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117821#M83173</guid>
      <dc:creator>luka</dc:creator>
      <dc:date>2013-03-08T03:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error while signaling an activity (receive task)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117822#M83174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think setting attribute activiti:async=true will solve the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jul 2013 15:52:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-while-signaling-an-activity-receive-task/m-p/117822#M83174</guid>
      <dc:creator>seyyedjamal</dc:creator>
      <dc:date>2013-07-07T15:52:32Z</dc:date>
    </item>
  </channel>
</rss>

