<?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 Execution with id $FOO does not have a subscription to a message event with name $BAR in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141875#M99361</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a simple process that looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;definitions xmlns="&lt;A href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;" xmlns:xsi="&lt;A href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;" xmlns:activiti="&lt;A href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer"&gt;http://activiti.org/bpmn&lt;/A&gt;" xmlns:bpmndi="&lt;A href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/DI&lt;/A&gt;" xmlns:omgdc="&lt;A href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DC&lt;/A&gt;" xmlns:omgdi="&lt;A href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DI&lt;/A&gt;" typeLanguage="&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;" expressionLanguage="&lt;A href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/1999/XPath&lt;/A&gt;" targetNamespace="&lt;A href="http://www.activiti.org/test" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/test&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;message id="message1" name="message1"&amp;gt;&amp;lt;/message&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;process id="sampleProcess1" name="Sample Process 1"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="startevent1" name="Start"&amp;gt;&amp;lt;/startEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serviceTask id="servicetask1" name="Service Task" activiti:async="true" activiti:exclusive="false" activiti:class="org.example.activiti.service.ServiceClass1"&amp;gt;&amp;lt;/serviceTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;userTask id="usertask1" name="User Task"&amp;gt;&amp;lt;/userTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;intermediateCatchEvent id="messageintermediatecatchevent1" name="MessageCatchEvent"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;messageEventDefinition messageRef="message1"&amp;gt;&amp;lt;/messageEventDefinition&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/intermediateCatchEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"&amp;gt;&amp;lt;/exclusiveGateway&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="endevent1" name="End"&amp;gt;&amp;lt;/endEvent&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serviceTask id="servicetask2" name="Service Task" activiti:class="org.example.activiti.service.ServiceClass2"&amp;gt;&amp;lt;/serviceTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;scriptTask id="scripttask1" name="Script Task" scriptFormat="groovy"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&amp;lt;![CDATA[println( "resuming after receiving message1 event" );]]&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;scriptTask id="scripttask2" name="Script Task" scriptFormat="groovy"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&amp;lt;![CDATA[println( "Flow NOT altered" );]]&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;scriptTask id="scripttask3" name="Script Task" scriptFormat="groovy"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="servicetask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow2" name="" sourceRef="servicetask1" targetRef="usertask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow4" name="" sourceRef="usertask1" targetRef="exclusivegateway1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow5" name="" sourceRef="exclusivegateway1" targetRef="scripttask2"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${alterFlowFlag == false}]]&amp;gt;&amp;lt;/conditionExpression&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow6" name="" sourceRef="exclusivegateway1" targetRef="scripttask3"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;conditionExpression xsi:type="tFormalExpression"&amp;gt;&amp;lt;![CDATA[${alterFlowFlag == true}]]&amp;gt;&amp;lt;/conditionExpression&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow7" name="" sourceRef="messageintermediatecatchevent1" targetRef="scripttask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow8" name="" sourceRef="scripttask1" targetRef="servicetask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow9" name="" sourceRef="scripttask2" targetRef="endevent1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow10" name="" sourceRef="scripttask3" targetRef="servicetask2"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/process&amp;gt;&lt;BR /&gt;&amp;lt;/definitions&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;/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;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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The goal is to alter the execution after the completion of the user task, based on the receipt of an external message.&amp;nbsp; So we have some Java code that will locate the process instance based on a variable set by ServiceClass1, and then inject a flag we use in the Exclusive Gateway that comes after the User Task.&amp;nbsp; If the flag is false, we simply proceed as normal, if it's true we want to do something different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That part works as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What doesn't work is this: In ServiceClass2, which comes after the UserTask in the "special case" we send a message, which we expect to cause execution to pick up at the Message Intermediate Catching Event.&amp;nbsp; The code in question is very simple and looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void execute( DelegateExecution exec ) throws Exception {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RuntimeService runtimeService = engine.getRuntimeService();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;runtimeService.messageEventReceived("message1", exec.getId(), null );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&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;/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;But when we send that message, Activiti gives us the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;org.activiti.engine.ActivitiException: Execution with id '24801' does not have a subscription to a message event with name 'message1'&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I'm missing here?&amp;nbsp; &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 18:55:05 GMT</pubDate>
    <dc:creator>mindcrime</dc:creator>
    <dc:date>2013-04-26T18:55:05Z</dc:date>
    <item>
      <title>Execution with id $FOO does not have a subscription to a message event with name $BAR</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141875#M99361</link>
      <description>I have a simple process that looks like this:&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&amp;lt;definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/2010</description>
      <pubDate>Fri, 26 Apr 2013 18:55:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141875#M99361</guid>
      <dc:creator>mindcrime</dc:creator>
      <dc:date>2013-04-26T18:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Execution with id $FOO does not have a subscription to a message event with name $BAR</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141876#M99362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, never mind that.&amp;nbsp; I was doing something dumb after all.&amp;nbsp; I should have been querying for the execution with the message subscription:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp; ProcessEngine engine = ProcessEngines.getDefaultProcessEngine();&lt;BR /&gt;&amp;nbsp; RuntimeService runtimeService = engine.getRuntimeService();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; Execution msgExec = runtimeService.createExecutionQuery().processInstanceId(exec.getProcessInstanceId()).messageEventSubscriptionName("message1").singleResult();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; runtimeService.messageEventReceived("message1", msgExec.getId(), null );&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;The bigger issue is whether not not this whole approach is even feasible.&amp;nbsp; Basically, the client is trying to avoid having certain sequence flows in the BPMN because the make the diagram too "noisy" for some people.&amp;nbsp; So they are trying to cheat and use this "send and receive a message within the same process" mechanism to avoid those flows. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know if that is possible / supported?&amp;nbsp; After I fixed the problem with passing the wrong execution ID (which was causing the original problem I posted about), I find that the execution will, indeed, pick back up at the Message Intermediate Catching Event, but somewhere after that I start getting exceptions from PostgreSQL where it detects a DB deadlock.&amp;nbsp; Should I just tell them "don't do that" or is there a way to make this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 20:02:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141876#M99362</guid>
      <dc:creator>mindcrime</dc:creator>
      <dc:date>2013-04-26T20:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Execution with id $FOO does not have a subscription to a message event with name $BAR</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141877#M99363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is not a good way of implementing message events, no. So if you don't want to clutter the diagrams for the client, so may want to make 2 versions. But technically it should work. So if you run into DB deadlock issues can you post the stacktrace and maybe a unit test showing the issue?&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, 29 Apr 2013 12:05:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141877#M99363</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-04-29T12:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Execution with id $FOO does not have a subscription to a message event with name $BAR</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141878#M99364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, thanks.&amp;nbsp; For now I've had them just accept drawing all the flows explicitly on the diagram.&amp;nbsp; I'll rerun this and grab a stacktrace to post in a bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 14:58:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/execution-with-id-foo-does-not-have-a-subscription-to-a-message/m-p/141878#M99364</guid>
      <dc:creator>mindcrime</dc:creator>
      <dc:date>2013-04-29T14:58:50Z</dc:date>
    </item>
  </channel>
</rss>

