<?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: Calling method: saveModel() of act_re_model, throws ActivitiOptimisticLockingException when called from two different services having different transaction in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37619#M15855</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;Ami Dave&lt;/B&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't quite understand your system topology when you said 'server-server (application-application)'. Can you describe your Activiti topology more clearly?&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;I have tried to put delay of 3mins as well once first call is back to the initiator server, but still getting same Exception on second call to saveModel.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Of course this doesn't solve the problem. This is very bad programming practice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Unless I understand more about your setup and how to reproduce your issue (with a unit test), there's nothing I can do to help you.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Thong Huynh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2017 07:02:09 GMT</pubDate>
    <dc:creator>thuynh</dc:creator>
    <dc:date>2017-04-04T07:02:09Z</dc:date>
    <item>
      <title>Calling method: saveModel() of act_re_model, throws ActivitiOptimisticLockingException when called from two different services having different transaction</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37616#M15852</link>
      <description>Hi,Calling method: repositoryService.saveModel() of act_re_model, throws ActivitiOptimisticLockingException when it is called from two different Service layers having different transactions (there is no chance of Transaction being persisted).I have calls to the method initiated from application to a</description>
      <pubDate>Wed, 29 Mar 2017 12:31:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37616#M15852</guid>
      <dc:creator>ami</dc:creator>
      <dc:date>2017-03-29T12:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calling method: saveModel() of act_re_model, throws ActivitiOptimisticLockingException when called from two different services having different transaction</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37617#M15853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ami Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which Activiti version are you on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it would be easier for everybody if you can attach a unit test. This is important for people to spot where in your code that you are trying to access the same resource concurrently. Have you looked at the definition of this exception in Activiti?&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/javadocs/org/activiti/engine/ActivitiOptimisticLockingException.html" title="https://www.activiti.org/javadocs/org/activiti/engine/ActivitiOptimisticLockingException.html" rel="nofollow noopener noreferrer"&gt;ActivitiOptimisticLockingException (Activiti - Engine 5.22.0 API)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You said&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;I have calls to the method initiated from application to application, hence the previous transaction has to be committed.&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;But then the second call from application to application, redirected to Service layer and then calling this method, however throws the mentioned exception with below error:-&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Are you sure that you are not calling 'saveModel' at the same time or concurrently? You know this has to be well-controlled by the application right?&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Hope this helps,&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Thong&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 20:34:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37617#M15853</guid>
      <dc:creator>thuynh</dc:creator>
      <dc:date>2017-03-29T20:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calling method: saveModel() of act_re_model, throws ActivitiOptimisticLockingException when called from two different services having different transaction</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37618#M15854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our current Activiti Framework Version is 5.15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I feel it is easy to detremine that if I make a server-to-server (application-to-application) call then previous Transaction has to be committed. And I can see the changes in database tables, even I can't find any table is still locked after first call.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hence there is some issue from Activiti itself that it isn't committing the previous transaction of saveModel somwhow, I have tried to put delay of 3mins as well once first call is back to the initiator server, but still getting same Exception on second call to saveModel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to handle this situation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ami Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 13:15:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37618#M15854</guid>
      <dc:creator>ami</dc:creator>
      <dc:date>2017-03-30T13:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calling method: saveModel() of act_re_model, throws ActivitiOptimisticLockingException when called from two different services having different transaction</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37619#M15855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;B&gt;Ami Dave&lt;/B&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't quite understand your system topology when you said 'server-server (application-application)'. Can you describe your Activiti topology more clearly?&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;I have tried to put delay of 3mins as well once first call is back to the initiator server, but still getting same Exception on second call to saveModel.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Of course this doesn't solve the problem. This is very bad programming practice.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Unless I understand more about your setup and how to reproduce your issue (with a unit test), there's nothing I can do to help you.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Thong Huynh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 07:02:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/calling-method-savemodel-of-act-re-model-throws/m-p/37619#M15855</guid>
      <dc:creator>thuynh</dc:creator>
      <dc:date>2017-04-04T07:02:09Z</dc:date>
    </item>
  </channel>
</rss>

