<?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 Undeploy workflow taking long time and UI page timeouts meantime in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/undeploy-workflow-taking-long-time-and-ui-page-timeouts-meantime/m-p/31523#M13370</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;I am using Activiti v5.21 and I have a real time workflow with 70 active instances(in least case) and each process instance consists of 150 tasks. I am using API call to delete deployment -&amp;nbsp;&lt;EM&gt;repositoryService.deleteDeployment(deploymentId, true);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am trying to undeploy that workflow, its took almost 3 minutes and mean time my UI page timeout happened. When I gone inside of the undeploy, I found some interesting things as below.&lt;/P&gt;&lt;P&gt;1) select queries on ACT_HI_VARINST and ACT_RU_VARIABLE tables. For instance, there are 70*150 *2 (instances * variable count * 2 VAR tables) = 21000 select queries which is consuming most of the execution time (~2/3 of execution time) which can be minimized by considering process_inst_id_ value.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial;"&gt;&lt;CODE style="font-size: 9pt;"&gt;10-May-2017[07:18:31.722]::smileyvery-happy:EBUG::ajp-nio-10002-exec-18::smileysurprised:rg.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId:132 - ==&amp;gt; Preparing: select * from ACT_HI_VARINST where ID_ = ? &lt;BR /&gt;10-May-2017[07:18:31.723]::smileyvery-happy:EBUG::ajp-nio-10002-exec-18::smileysurprised:rg.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId:132 - ==&amp;gt; Parameters: e4c1eeae-3575-11e7-89d1-020030001cf1(String) &lt;BR /&gt;10-May-2017[07:18:31.726]::smileyvery-happy:EBUG::ajp-nio-10002-exec-18::smileysurprised:rg.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId:132 - &amp;lt;== Total: 1 &lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) After collecting entities using select queries, While deleting Its doing bulk deletes for few tables but not for ACT_RU_VARIABLE and ACT_HI_VARINST tables. Not sure why these 2 tables not considered for bulk deletes using process instance Id which is consuming more time during un deployment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other way to do faster un deployment process to avoid UI page timeouts. Attached my use case activiti log file for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Swamy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 May 2017 16:03:37 GMT</pubDate>
    <dc:creator>swamy2156</dc:creator>
    <dc:date>2017-05-10T16:03:37Z</dc:date>
    <item>
      <title>Undeploy workflow taking long time and UI page timeouts meantime</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploy-workflow-taking-long-time-and-ui-page-timeouts-meantime/m-p/31523#M13370</link>
      <description>Hi,I am using Activiti v5.21 and I have a real time workflow with 70 active instances(in least case) and each process instance consists of 150 tasks. I am using API call to delete deployment -&amp;nbsp;repositoryService.deleteDeployment(deploymentId, true);When I am trying to undeploy that workflow, its took</description>
      <pubDate>Wed, 10 May 2017 16:03:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploy-workflow-taking-long-time-and-ui-page-timeouts-meantime/m-p/31523#M13370</guid>
      <dc:creator>swamy2156</dc:creator>
      <dc:date>2017-05-10T16:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Undeploy workflow taking long time and UI page timeouts meantime</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploy-workflow-taking-long-time-and-ui-page-timeouts-meantime/m-p/31524#M13371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the way, I am using Oracle 11g RAC database for my application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 10:29:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploy-workflow-taking-long-time-and-ui-page-timeouts-meantime/m-p/31524#M13371</guid>
      <dc:creator>swamy2156</dc:creator>
      <dc:date>2017-05-11T10:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Undeploy workflow taking long time and UI page timeouts meantime</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploy-workflow-taking-long-time-and-ui-page-timeouts-meantime/m-p/31525#M13372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this appears to be a duplicate of :&amp;nbsp;&lt;A __default_attr="231320" __jive_macro_name="thread" _jive_internal="true" class="jive_macro_thread jive_macro link-titled" href="https://community.alfresco.com/thread/231320-undeploying-workflow-taking-long-time" rel="nofollow noopener noreferrer"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 16:48:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploy-workflow-taking-long-time-and-ui-page-timeouts-meantime/m-p/31525#M13372</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-11T16:48:25Z</dc:date>
    </item>
  </channel>
</rss>

