<?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 Asynchronous notification on workflow progress in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/asynchronous-notification-on-workflow-progress/m-p/186908#M140038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My application's use case requires that client who starts workflow gets async notification on workflow progress.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For that purpose I have ActivitiEventListener instance and my plan was to dispatch ACTIVITY_STARTED and ACTIVITY_COMPLETED events back to the client, but if I have multiple executions going on the same engine I can't distinguish events because caller finds out it's process instance id only upon return of startWorkflow method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next idea was to employ an engine pool and execute one workflow at the time per engine, but than I have learned that in case of async activities some other engine can pick up a job and events from that job will never get to the caller.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I moved back to one engine - multiple executions, but with unique business key that will help me figure out how to dispatch events. But to my disappointment business key doesn't appear in event and it seems to me that I can only get it from execution context.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, I have added a method to ActivitiEvent interface: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExecutionContext getExecutionContext();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and implemented it in ActivitiEventImpl as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public ExecutionContext getExecutionContext() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Context.getExecutionContext();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I can get my business key from event but what bothers me is the question if there is a better way to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or, is there any reason (that I don't see yet) why not to do it this way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boris&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Oct 2014 12:09:12 GMT</pubDate>
    <dc:creator>bpran</dc:creator>
    <dc:date>2014-10-06T12:09:12Z</dc:date>
    <item>
      <title>Asynchronous notification on workflow progress</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/asynchronous-notification-on-workflow-progress/m-p/186908#M140038</link>
      <description>Hi all,My application's use case requires that client who starts workflow gets async notification on workflow progress.For that purpose I have ActivitiEventListener instance and my plan was to dispatch ACTIVITY_STARTED and ACTIVITY_COMPLETED events back to the client, but if I have multiple executio</description>
      <pubDate>Mon, 06 Oct 2014 12:09:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/asynchronous-notification-on-workflow-progress/m-p/186908#M140038</guid>
      <dc:creator>bpran</dc:creator>
      <dc:date>2014-10-06T12:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Asynchronous notification on workflow progress</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/asynchronous-notification-on-workflow-progress/m-p/186909#M140039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another way to do it, is to use a BpmnParseHandler that adds execution listeners to every of your process definitions automatically. Those listeners can then fire the stuff async.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 10:35:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/asynchronous-notification-on-workflow-progress/m-p/186909#M140039</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-10-17T10:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Asynchronous notification on workflow progress</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/asynchronous-notification-on-workflow-progress/m-p/186910#M140040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems it is the right way to do it. I should have read manual more carefully. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 08:14:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/asynchronous-notification-on-workflow-progress/m-p/186910#M140040</guid>
      <dc:creator>bpran</dc:creator>
      <dc:date>2014-10-29T08:14:09Z</dc:date>
    </item>
  </channel>
</rss>

