<?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: Synchronization puzzle in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157908#M112052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That sounds very very weird … can't really explain why the exact code does two different things dependending on the setup.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Oct 2013 09:55:12 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2013-10-21T09:55:12Z</dc:date>
    <item>
      <title>Synchronization puzzle</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157903#M112047</link>
      <description>To understand why I decide to use a semaphore for async process launching You should use the whole post In other case you can read only question section.Question:Can I synchronously launch asynchronous subprocess? I mean (see code below), if I release semaphore inside a asynchronous subprocess, can</description>
      <pubDate>Thu, 03 Oct 2013 14:37:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157903#M112047</guid>
      <dc:creator>fritz128</dc:creator>
      <dc:date>2013-10-03T14:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Synchronization puzzle</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157904#M112048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think I understand it yet. If you want each sub process to have it's own scope of variables I would recommend to use a call activity. Is than an option for you?&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>Thu, 03 Oct 2013 19:09:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157904#M112048</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-10-03T19:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Synchronization puzzle</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157905#M112049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As I understand I can't simultaneously launch multiple async callActivities from one user task. &lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;Question1&lt;/EM&gt;&lt;SPAN&gt; Can I?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;main point&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;And another question. I've already written a demo with the same Activiti/Spring configurations, the same workflow and the same way to call asynchronous subprocesses.&amp;nbsp; And it works! But the same doesn't work in my application! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I debuged it and it appeares that in my app after &lt;/SPAN&gt;&lt;EM&gt;signalEventReceived&lt;/EM&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;doesn't invoke next method of java.lang.Thread class&lt;/STRONG&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;STRONG&gt;In my demo where all works fine it the proceeding of new async subprocess begins from those method.&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void run() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (target != null) {&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; target.run();&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;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;Question2&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN&gt;How does &lt;/SPAN&gt;&lt;EM&gt;signalEventReceived&lt;/EM&gt;&lt;SPAN&gt; works. Does it directly invoke&amp;nbsp; Thread.run method??&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 21:12:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157905#M112049</guid>
      <dc:creator>fritz128</dc:creator>
      <dc:date>2013-10-03T21:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Synchronization puzzle</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157906#M112050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;signavlEventReceived uses the current thread, ie the thread which calls that method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In case of async, it will hand it over to the job executor. Is the job executor running?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 08:33:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157906#M112050</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-10-04T08:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Synchronization puzzle</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157907#M112051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;EM&gt;How can I check if the JobExecutor is running?&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN&gt;I've set the next option &lt;/SPAN&gt;&lt;EM&gt;property name="jobExecutorActivate" value="true"&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN&gt;As I mentioned above, in case when it doesn't work it doesn't invole &lt;/SPAN&gt;&lt;EM&gt;Thread.run&lt;/EM&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;EM&gt;ExecuteJobRunnable.run&lt;/EM&gt;&lt;SPAN&gt; methods!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;What is VERY STRANGE:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I've the same code in two places of my application: in first it works, in the second it doesn't!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first (works fine):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;runMainProcess();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (int i = 0; i &amp;lt; 10; i++)&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; SemaphoreWrapper.acquire();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; runtimeService.signalEventReceived("signal", executionId);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if to move for-loop and runMainProcess() to two different requests it DOESN'T work. I've checked in debug: executionId, commandExecutor and all other parameters are the same!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;In which cases Activiti doesn't run new async subprocess before next cycle of for-loop?&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 10:39:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157907#M112051</guid>
      <dc:creator>fritz128</dc:creator>
      <dc:date>2013-10-04T10:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Synchronization puzzle</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157908#M112052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That sounds very very weird … can't really explain why the exact code does two different things dependending on the setup.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 09:55:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/synchronization-puzzle/m-p/157908#M112052</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-10-21T09:55:12Z</dc:date>
    </item>
  </channel>
</rss>

