<?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: Error on loop with asynchronous activities in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130102#M91426</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A racing condition sounds really strange as we developed the job executor to cope exactly with these situations (but ofc no code is perfect).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However it might be in the area of character encodings … ie linux is case sensistive … windows is not. Just guessing here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 May 2013 13:36:33 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2013-05-15T13:36:33Z</dc:date>
    <item>
      <title>Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130098#M91422</link>
      <description>Hello Activiti developers,I wanted to better understand what is the actual behavior of the "local" and "global" process variables and started with an example, which revealed many problems.Please find attached a simplified example to demonstrate two of these problems: a process definition with three</description>
      <pubDate>Mon, 13 May 2013 13:07:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130098#M91422</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-05-13T13:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130099#M91423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First problem: I can't seem to reproduce it. When I run the process, I see this being printed out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; l = 4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; global l = 4.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; local l = 4.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second problem: yes, this is a known bug for the moment. A tricky one too. We're trying to fix it for a while now … hopefully the next release contains a fix.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 09:19:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130099#M91423</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-14T09:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130100#M91424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm very sorry that I forgot to mention that I tested with Activiti 5.12 (not 5.12.1) on Windows 7 environment. I will try to run the test on Linux.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 11:15:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130100#M91424</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-05-14T11:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130101#M91425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, I can confirm that TestLocalVariablesSimple.bpmn runs fine on Linux. It seems the guilty for the first problem (as for others reported by me) is the Windows environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently I'm trying to terminate the process instances failed during my tests and what I observe is that the termination on Windows environment fails with the same error ("&lt;/SPAN&gt;&lt;EM&gt;Query return 2 results instead of max 1&lt;/EM&gt;&lt;SPAN&gt;"), while on Linux it succeeds. This tends me to think that the problem is due to some racing conditions, which do not happen on Linux but I'm afraid that it is only matter of time they to happen.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 11:44:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130101#M91425</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-05-14T11:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130102#M91426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A racing condition sounds really strange as we developed the job executor to cope exactly with these situations (but ofc no code is perfect).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However it might be in the area of character encodings … ie linux is case sensistive … windows is not. Just guessing here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 13:36:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130102#M91426</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-15T13:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130103#M91427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did not understood your note on the OS case sensitivity… I think that it does not affect the work of the JVM (and the Java applications correspondingly).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please note that the process definition where the activities are synchronous (the "Asynchronous" flag is not set) is running "well" on both Windows and Linux, while the definition where the activities are asynchronous is running only on Linux. The state of the "Asynchronous" flag is the only difference in the activities properties - the activity names in both definitions are the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The race conditions might not be in your code - there is always a possibility the (DB) transactions to be handled differently on Windows and Linux. Actually, the error message doesn't state instances of what object were found to be surplus, so it's not easy to build guesses for the reason of the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 09:04:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130103#M91427</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-05-16T09:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130104#M91428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My point was: if it works on one JVM (Linux, which is also the most 'trustworthy' imo), it should work on other JVM's too. Unless there is a difference between the JVM confifguration, and character encoding is one of these areas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course it can be related to different threading/concurrency models and databases. Can you create a simple junit test that always fails on windows, but works on linux?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 15:12:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130104#M91428</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-21T15:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130105#M91429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've just tried to create a test case but it runs fine in Eclipse environment with the standard H2 (in memory) DB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you advice me on how to set-up my command-line environment to run the test project (ascendant/modification of activiti-unit-test-template-master)? Please note that we are using Ant and I'm not familiar to Maven, although I've managed to create the build environment for Activiti sources and installed the M2Eclipse plugin on my Eclipse IDE.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 14:27:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130105#M91429</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-05-23T14:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130106#M91430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've you've followed the activiti-unit-test-template running the test is as easy as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mvn clean test&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That runs all unit tests in src/test/java&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 15:13:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130106#M91430</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-23T15:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130107#M91431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The test is attached as &amp;lt;code&amp;gt;test.LoopWithAsynchActivities.zip&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color:silver;"&gt;_.txt&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems I found the problem and it is related to the logging listeners implemented according to &lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/content/best-process-instance-verbose-logging-strategy" rel="nofollow noopener noreferrer"&gt;this thread&lt;/A&gt;&lt;SPAN&gt;. Now the test fails also in Eclipse environment and with H2 (in-memory) DB (both command-line and in Eclipse) on Windows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following listeners are registered in the configuration:&lt;/SPAN&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="postBpmnParseHandlers"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;list&amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean class="org.activiti.engine.parse.ProcessInstanceLoggersRegistrator" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean class="org.activiti.engine.parse.ActivityInstanceLoggersRegistrator" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean class="org.activiti.engine.parse.EventDefinitionLoggersRegistrator" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/list&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;The listener classes are in the attached &amp;lt;code&amp;gt;parse.zip&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color:silver;"&gt;_.txt&lt;/SPAN&gt;&lt;SPAN&gt;. You should add them to &amp;lt;code&amp;gt;&amp;lt;Activiti-5.12&amp;gt;/modules/activiti-engine/src/main/java/org/activiti/engine/parse&amp;lt;/code&amp;gt; directory and rebuild the Activiti 5.12 engine. (At least this is where these classes are in my environment - yes, I preferred to put them in the Activiti distribution instead in my project).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems I did something wrong but what is it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 10:26:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130107#M91431</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-05-30T10:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130108#M91432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's pretty hard to test it like that. Can't you add the parsers to the maven project and change the config so it matches the setup? That way I can execute it directly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 12:41:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130108#M91432</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-05-31T12:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130109#M91433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please find attached, although I'm not sure what happens - the project points to an Activiti engine in a Maven repository, i.e. without my modifications, but the test still managed to start an engine before I to add these classes to the project, i.e. the test finds my modifications somewhere outside the project (otherwise, when &amp;lt;code&amp;gt;postBpmnParseHandlers&amp;lt;/code&amp;gt; property points to non-existing classes, no engine is started). Therefore I, unfortunately, can not guarantee the test will work correct at your side.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 10:18:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130109#M91433</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-06-04T10:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130110#M91434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, it ran perfectly now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is actually pretty simple. If you check lower in the stacktrace, you see this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.parse.ActivityInstanceLogger.formatInfo(ActivityInstanceLogger.java:47)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.parse.ActivityInstanceLogger.notify(ActivityInstanceLogger.java:26)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which matches this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;HistoricActivityInstance historicActivity = execution.getEngineServices().getHistoryService().createHistoricActivityInstanceQuery().activityId( activity.getId() ).executionId( execution.getId() ).singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, since you're looping over the same activity, there will be multiple entries in the historic activity instance table for the same activity id. That is the reason why it fails, you specifically add 'singleResult' which forces the check on one element. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what you need to do is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;HistoricActivityInstance&amp;gt; historicActivityInstances = execution.getEngineServices().getHistoryService().createHistoricActivityInstanceQuery().activityId( activity.getId() ).executionId( execution.getId() ).orderByHistoricActivityInstanceEndTime().desc().list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HistoricActivityInstance historicActivity = historicActivityInstances.isEmpty() ? null : historicActivityInstances.get(0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sort end time and take the newest from the list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 16:40:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130110#M91434</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-06-04T16:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130111#M91435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that according the process definition I expect two instances of the same activity to never co-exist. The run on Linux environment is a proof for that (on my Linux run the process instance finishes without errors). As I already stated it seems the problem is in the Windows environment and I can not find any rational explanation of this misbehavior. Actually this was the question behind the problem demonstration - what is the reason (on Windows environment) two instances of the same activity to (unexpectedly) co-exist?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My intention was additionally to warn you that you might be walking on a thin ice in some areas of the Activiti implementation (and that was the reason I mentioned "(hidden) racing conditions" in my previous posts). My fear is that the demonstrated misbehavior might be a time-bomb that could fire in a future version of Activiti, i.e. my current process definition or my (logging) tools to stop working with a future version of Activiti due to not API but implementation changes, and such changes might pass our tests and display only on production systems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually the process definition demonstrated in the test case is a huge simplification of my real process, which currently doesn't suffer of the described problem. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 07:36:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130111#M91435</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-06-05T07:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130112#M91436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I didn't say it in the previous post, but I did run the test on my machine. And their it failed the way you described it. So I don't think it is a rece condition problem at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;The problem is that according the process definition I expect two instances of the same activity to never co-exist. &amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It does when you use multi instance. or any looping for that matter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So it is not a matter of not expecting it - the way I understood your process definition … there will always be multiple records for the same activity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;The run on Linux environment is a proof for that (on my Linux run the process instance finishes without errors)&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the test you posted here runs on Linux? Cause my OS X is pretty close to Linux in that respect … but I can always retry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 14:22:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130112#M91436</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-06-10T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130113#M91437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm very sorry but I didn't paid the needed attention to this conversation (it's a small asylum here these days &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; ). Please accept my apologies. To be honest, I didn't run the unit test on the Linux environment before to sent it to you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just found some peace and re-red the thread. Definitely you're right that the history should contain several records for each activity. I also managed to run the (unit) test on an Oracle DB. It failed on both Windows and Linux, as you expected, although it was somewhat unexpected to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now the pre-history of this thread: Initially I observed the problem using an Ant task for starting process instances (once their definition(s) were uploaded in the DB). Actually it is very simple task and I could provide the code if you're still interested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently the things are still strange to me because I (still) use the same Ant task on both Windows and Linux and I still observe the behavior described above - the process instance execution fails on Windows, as expected by you, but runs fine on Linux as (wrongly) expected by me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OK, this posting is just a note on the progress. I'm not quite sure the discussion deserves more attention… It seems the problem (if it is a problem at all) is in some environment but it might became too complex to be investigated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your time and explanations,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Monique&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 15:01:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130113#M91437</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-06-12T15:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130114#M91438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No problem at all. Such discussions are needed to discover problems with Activiti. Sometimes it's nothing, sometimes it's a real bug &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It sure sounds really strange it works on Windows with ant … Are you sure it is actually executing anything at all &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 09:55:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130114#M91438</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-06-17T09:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130115#M91439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Joram,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually it fails on Windows with Ant and runs smoothly on Linux with Ant &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it executes something because it outputs all the values for the variable &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 08:22:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130115#M91439</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-06-18T08:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error on loop with asynchronous activities</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130116#M91440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Damn it! This is some kind of black magic! Or it's the moon phase… *DONT_KNOW*&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I experimented, I started process instances on Windows and was able to terminate them only on Linux exactly for this behavior difference. I tried to reproduce the execution on Linux to provide you a log as a proof but now it also fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hmmm, probably I should try to run it on Windows - the places might be exchanged… &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Whatever, strange things happen. Lets look into the future *drinks*&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 10:17:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-on-loop-with-asynchronous-activities/m-p/130116#M91440</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-06-18T10:17:37Z</dc:date>
    </item>
  </channel>
</rss>

