<?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 Re: ActivitiException: this activity doesn't accept signals in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40592#M21702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, that's also not it. &lt;/SPAN&gt;&lt;CODE&gt;ProcessInstance pi = runtimeService.createProcessInstanceQuery().processDefinitionKey("helloworld").variableValueEquals("vehicleId", 42L).singleResult();&lt;BR /&gt;List&amp;lt;Execution&amp;gt; execution = runtimeService.createExecutionQuery().processInstanceId(pi.getProcessInstanceId()).activityId("receiveTask").list();&lt;/CODE&gt;&lt;SPAN&gt;Your code results in an empty list execution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Receive tasks only seem to work in a single execution path - if I have Start - receiveTask - End the code works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I file a bug?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Feb 2011 11:47:40 GMT</pubDate>
    <dc:creator>derkoe</dc:creator>
    <dc:date>2011-02-22T11:47:40Z</dc:date>
    <item>
      <title>ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40588#M21698</link>
      <description>When I signal a receive task after a parallel gateway, I get "ActivitiException: this activity doesn't accept signals".Am I doing something wrong?Here's the Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;final String deploymentId = repositoryService.createDeployment()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.addClasspathResource("diagrams/test.activiti.bpmn20.xml").</description>
      <pubDate>Tue, 22 Feb 2011 10:08:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40588#M21698</guid>
      <dc:creator>derkoe</dc:creator>
      <dc:date>2011-02-22T10:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40589#M21699</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;SPAN&gt;I think that probably your executionQuery does not return correct execution. When you execute it, there are in fact 3 executions for this process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - global process execution&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - 2 executions for both concurrent flows&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Your query returns more or less random one I think - and only one of them (the one representing execution waiting in receive node) can be signalled. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can either:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - get all executions using .list() instead of .singleResult() and manually find the one you want to signal &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - or (much better solution IMHO) restrict returned activities by adding .activityId("ID_OF_RECEIVE_TASK") to the query fluent builder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 11:06:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40589#M21699</guid>
      <dc:creator>mproch</dc:creator>
      <dc:date>2011-02-22T11:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40590#M21700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I thought about it … but this query returns null:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;runtimeService.createExecutionQuery()&lt;BR /&gt;&amp;nbsp;&amp;nbsp; .processDefinitionKey("helloworld")&lt;BR /&gt;&amp;nbsp;&amp;nbsp; .variableValueEquals("vehicleId", 42L)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; .list();&lt;/CODE&gt;&lt;SPAN&gt;And this one the list with only the process instance ([ProcessInstance[5]])&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;Execution execution = runtimeService.createExecutionQuery()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .processDefinitionKey("helloworld")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .variableValueEquals("vehicleId", 42L)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .activityId("receiveTask")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .singleResult();&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 11:13:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40590#M21700</guid>
      <dc:creator>derkoe</dc:creator>
      <dc:date>2011-02-22T11:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40591#M21701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're right, there is some problem here - seems like variableValue parameter finds only executions where variable was declared, and not child executions (at least it seems like that…) - don't know if it's intended - maybe it's a bug?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the workaround is to find process instance first:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;ProcessInstance pi = runtimeService.createProcessInstanceQuery().processDefinitionKey("helloworld").variableValueEquals("vehicleId", 42L).singleResult();&lt;BR /&gt;List&amp;lt;Execution&amp;gt; execution = runtimeService.createExecutionQuery().processInstanceId(pi.getProcessInstanceId()).activityId("receiveTask").list();&lt;/CODE&gt;&lt;SPAN&gt;-it's somewhat less efficient but should work I think.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 11:24:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40591#M21701</guid>
      <dc:creator>mproch</dc:creator>
      <dc:date>2011-02-22T11:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40592#M21702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, that's also not it. &lt;/SPAN&gt;&lt;CODE&gt;ProcessInstance pi = runtimeService.createProcessInstanceQuery().processDefinitionKey("helloworld").variableValueEquals("vehicleId", 42L).singleResult();&lt;BR /&gt;List&amp;lt;Execution&amp;gt; execution = runtimeService.createExecutionQuery().processInstanceId(pi.getProcessInstanceId()).activityId("receiveTask").list();&lt;/CODE&gt;&lt;SPAN&gt;Your code results in an empty list execution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Receive tasks only seem to work in a single execution path - if I have Start - receiveTask - End the code works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I file a bug?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 11:47:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40592#M21702</guid>
      <dc:creator>derkoe</dc:creator>
      <dc:date>2011-02-22T11:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40593#M21703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you ost also the process definition (xml)? I made small test case (with paralell gateway) and the code I pasted seems to be working… and btw. - which activiti version are you using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 11:56:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40593#M21703</guid>
      <dc:creator>mproch</dc:creator>
      <dc:date>2011-02-22T11:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40594#M21704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, now I have it. This works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;Execution execution = runtimeService.createExecutionQuery()&lt;BR /&gt; .processInstanceId(processInstance.getId())&lt;BR /&gt; .activityId("receivetask1")&lt;BR /&gt; .singleResult();&lt;/CODE&gt;&lt;SPAN&gt;This doesn't:&lt;/SPAN&gt;&lt;CODE&gt;execution = runtimeService.createExecutionQuery()&lt;BR /&gt; .variableValueEquals("vehicleId", 42L)&lt;BR /&gt; .activityId("receivetask1")&lt;BR /&gt; .singleResult();&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a test case added, that shows this. Is this a bug? If not this should be defined in the docs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@mproch: thx for helping,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:04:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40594#M21704</guid>
      <dc:creator>derkoe</dc:creator>
      <dc:date>2011-02-22T15:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: ActivitiException: this activity doesn't accept signals</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40595#M21705</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;When a variable value is set on an execution using DelegateExecution.setVariable(s) or runtimeService.setVariable(s) the folowing happens:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Execution checks if a variable with the given name is present in collection of variables stored on that execution.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If the variable is present, the value is set.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If not present, the parent execution's setVariable(s) is called and this will do the same as the steps above.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;When non of the child-executions in the hierarchy has the var defined locally, the top-execution parent (processInstance, with parent-execution = null) will set the variable locally.&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN&gt;Because of this process, all variables set on executions will be set on the underlying process-instance, which will be queryable using processInstanceQuery.variableValueEquals(…), the execution where the variable was set on (and didn't have the var declared localy) won't return in query results of an executionQuery.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can explicitally set a execution variable on the execution (and not have it bubble up to a parent which has it defined or root execution) by using setVariableLocal() on the execution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope my explaination is clear for you, still early morning &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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 07:00:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activitiexception-this-activity-doesn-t-accept-signals/m-p/40595#M21705</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-02-23T07:00:13Z</dc:date>
    </item>
  </channel>
</rss>

