<?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: MultiThread - same variable created many times on the same process instance in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172579#M125784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have optimistic locking in place for circumstances like these, although, that's only relevant if an exiting entity gets updated. Due to the fact that both threads do a simple setVariable(), 2 independent inserts will be done, not triggering any optimistic locking exceptions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since there are no constrains/indexes on the combination of variable name, rev, procId and taskId, both records will be present. This is inconvenient, although not super-critical (you'll always get one value back, depending on the order they come out of the result-set from jdbc). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The main culprit is the delete part. Variables are kept in a map (key=name) internally (inside the Execution/VariableSc - for performance reasons). We didn't anticipate multiple VariableInstances with the same name coming back from the DB, as they are always updated and updates are guarded with optimistic locking. When the execution is deleted, it will run over the VariableInstances in that map, and do a delete (is done this way to cleanup any byte arrays, which is not possible for a single-query delete). Offcourse, not deleting one of the two rows with the same variable name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll look into this and see what we can do to fix this. We can at least prevent the delete from failing, by using the full VariableInstance list instead of using the map. For the insert part, this is a bit trickier…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jan 2014 13:01:42 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2014-01-09T13:01:42Z</dc:date>
    <item>
      <title>MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172577#M125782</link>
      <description>Hello, On our diagram, we use a ReceiveNode to wait all responses from outside to decide what to do next.We use JMS to trigger the ReceiveNode, it do- search Execution of&amp;nbsp; ReceiveNode,&amp;nbsp; we know Execution by querying on it's name.- runtimeService.setVariable() on Execution. This variable is used to d</description>
      <pubDate>Thu, 09 Jan 2014 11:46:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172577#M125782</guid>
      <dc:creator>qcap</dc:creator>
      <dc:date>2014-01-09T11:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172578#M125783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have tested on activiti 5.11 &amp;amp; 5.14, same issue&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 12:53:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172578#M125783</guid>
      <dc:creator>qcap</dc:creator>
      <dc:date>2014-01-09T12:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172579#M125784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have optimistic locking in place for circumstances like these, although, that's only relevant if an exiting entity gets updated. Due to the fact that both threads do a simple setVariable(), 2 independent inserts will be done, not triggering any optimistic locking exceptions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since there are no constrains/indexes on the combination of variable name, rev, procId and taskId, both records will be present. This is inconvenient, although not super-critical (you'll always get one value back, depending on the order they come out of the result-set from jdbc). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The main culprit is the delete part. Variables are kept in a map (key=name) internally (inside the Execution/VariableSc - for performance reasons). We didn't anticipate multiple VariableInstances with the same name coming back from the DB, as they are always updated and updates are guarded with optimistic locking. When the execution is deleted, it will run over the VariableInstances in that map, and do a delete (is done this way to cleanup any byte arrays, which is not possible for a single-query delete). Offcourse, not deleting one of the two rows with the same variable name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll look into this and see what we can do to fix this. We can at least prevent the delete from failing, by using the full VariableInstance list instead of using the map. For the insert part, this is a bit trickier…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 13:01:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172579#M125784</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-01-09T13:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172580#M125785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to hear, thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 13:19:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172580#M125785</guid>
      <dc:creator>qcap</dc:creator>
      <dc:date>2014-01-09T13:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172581#M125786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A valid workaround would be to use the signal() method that takes in an execution-id an process-variables. This will ensure that the setting of the variable AND the signalling is done as a single operation. On top of that, it will force the second transaction to fail due to an optimistic locking exception in the execution itself, effectively rolling back any (duplicate) changes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 13:31:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172581#M125786</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-01-09T13:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172582#M125787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tested the do-it-all in one call, it is a GOOD workarroud&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a fine exception &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"org.activiti.engine.ActivitiOptimisticLockingException: ExecutionEntity[286f023a-7938-11e3-b92f-10ddb19c9a3a] was updated by another transaction concurrently"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And no more duplicate of variables, so it works on this case ( my case) precisely. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, it could be till problematical on delete process when having duplicate variable ( behavior&amp;nbsp; desired ). Do you plan on next release ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much, nice job.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 14:32:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172582#M125787</guid>
      <dc:creator>qcap</dc:creator>
      <dc:date>2014-01-09T14:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172583#M125788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Working on this now (&lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1887" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1887&lt;/A&gt;&lt;SPAN&gt;), will be part of the next release. I have a fix implemented for the setVariable and setTaskVariable methods on the API to do optimistic locking of the execution and task, respectively, so the duplicate inserts are impossible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm also adding an additional fix for the duplicate variables (in case they were added in a pre 5.15 version) upon deletion. This will also be part of the 5.15 release. Thanks again for the clear bug-report!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 09:58:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172583#M125788</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-01-10T09:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172584#M125789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;FYI: the bugfix is now pushed to master. Indeed, thanks for the excellent bug report.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(and frederik for fixing it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 08:39:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172584#M125789</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-01-17T08:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172585#M125790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are experiencing something similar as the issue described in this post using Activiti version 5.17.0. Let me explain the scenario first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a workflow with two java service tasks between two parallel gateways (opening and closing). The service tasks are configured as activiti:async="true" and activiti:exclusive="false", while the parallel gateways are configured with activiti:async="true". The rest of the task as configured as activiti:exclusive="true"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The service tasks look something like this (simplified - see code below) and it starts a new thread with executes a http request and waits for its reply. Once the http reply is received, it signals the service task, so that the workflow can continue. Service task does not wait for the thread to finish. Meaning there is no thread.join(). Both service tasks execute the exact same code shown below.&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;public class CopyTask extends TaskActivityBehavior {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private Expression NicknameFrom;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private Expression NicknameTo;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private Expression FolderAddress;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private Expression FileNamePattern;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public void execute(ActivityExecution execution)&amp;nbsp; throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; /*keep the current execution information that will be used to signal it later on*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; String callbackId = execution.getId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; String processInstanceId = execution.getProcessInstanceId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; String currentActivitiId = execution.getCurrentActivityId();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; /*do some preparation, and start the new thread. Function does not wait for the thread to finish. Meaning there is no thread.join()*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; leave(execution);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The thread that is executing the http request, creates a two variables that are passed to the signal function.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void signalWaitState(HashMap&amp;lt;String, String&amp;gt; Result) {&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; ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();&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; RuntimeService runtimeService = processEngine.getRuntimeService();&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; &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; Map&amp;lt;String, Object&amp;gt; variableMap = new HashMap&amp;lt;String, Object&amp;gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variableMap.put("Code", Result.get("Code"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variableMap.put("Response", Result.get("Response"));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runtimeService.signal(this.executionId, variableMap);&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; System.out.println("Signalled execution id " + this.executionId + "(" + this.activityId + ")" + "(" + this.processInstanceId + ")");&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;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The whole process executes normally and without any problem. But when Activiti tries to do the clean up of act_ru_variable, we get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### The error occurred while setting parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`activiti`.`act_ru_variable`, CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`))&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;Due to this error, the process is rollbacked to the closing parallel gateway, but it does not move forward to the next step. As a result, the process never ends.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Activiti engine and rest are configured to run in the same server and accessing the same MySQL database. Both are configured with these options:&lt;/SPAN&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;lt;property name="jobExecutorActivate" value="false" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="asyncExecutorEnabled" value="true" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="asyncExecutorActivate" value="true" /&amp;gt;&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;We ended up removing all the foreign key constrains on table act_ru_variable. Once removed, the process worked correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, we have some questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) We read that this was fixed already, but we face this problem. Is there something we missed or need to configured?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) What are the consequences of removing all the foreign key constrains on table act_ru_variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let us know if you need additional information and many thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep on the good work on Activiti. It is a great tool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 08:16:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172585#M125790</guid>
      <dc:creator>jcoveron</dc:creator>
      <dc:date>2015-04-08T08:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172586#M125791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you set the join parallel gateway to exclusive:true?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's important, because that will make sure only 1 join thread will be processed at the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are no consequences of removing the foreign key constraints. It's just there for data consistency.&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>Wed, 08 Apr 2015 10:32:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172586#M125791</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2015-04-08T10:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: MultiThread - same variable created many times on the same process instance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172587#M125792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all, thank you for your fast reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We modified both both parallel gateways and modified them to have activiti:async="true" and activiti:exclusive="true". Unfortunately, the result is the same. We get the foreign key constraint. I am attaching the process xml as a reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For know, as a workaround, we will remove the foreign key constraints until we can do further testing. If you want, we can run some test that you would like us to perform.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, many thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;José&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 13:28:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/multithread-same-variable-created-many-times-on-the-same-process/m-p/172587#M125792</guid>
      <dc:creator>jcoveron</dc:creator>
      <dc:date>2015-04-08T13:28:59Z</dc:date>
    </item>
  </channel>
</rss>

