<?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 Undeploying workflow taking long time in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32369#M13714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Hi,&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;I am using Activiti v5.21 with Oracle 11g RAC database and I have a real time workflow with 70 active instances(in least case) and each process instance consists of 150 variables of each processInstance. I am using API call to delete deployment -&amp;nbsp;&lt;EM style="border: 0px; font-weight: inherit;"&gt;repositoryService.deleteDeployment(deploymentId, true);&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&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 style="color: #727174; background-color: #ffffff; border: 0px;"&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 style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; 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 style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&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 style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&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 style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Any suggestions will be appreciated.&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;thanks,&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;Swamy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 May 2017 11:57:13 GMT</pubDate>
    <dc:creator>swamy2156</dc:creator>
    <dc:date>2017-05-11T11:57:13Z</dc:date>
    <item>
      <title>Undeploying workflow taking long time</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32369#M13714</link>
      <description>Hi,&amp;nbsp;I am using Activiti v5.21 with Oracle 11g RAC database and I have a real time workflow with 70 active instances(in least case) and each process instance consists of 150 variables of each processInstance. I am using API call to delete deployment -&amp;nbsp;repositoryService.deleteDeployment(deploymentId,</description>
      <pubDate>Thu, 11 May 2017 11:57:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32369#M13714</guid>
      <dc:creator>swamy2156</dc:creator>
      <dc:date>2017-05-11T11:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Undeploying workflow taking long time</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32370#M13715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it completely necessary to have 150 process variables?&lt;/P&gt;&lt;P&gt;Best practice says that you carry the minimum data to orchestrate the process in the instance, all other data should be retrieved as necessary from a system of record and discarded immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems this is the root cause of your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 16:36:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32370#M13715</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-11T16:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Undeploying workflow taking long time</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32371#M13716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your reply. What is a System of record? and Please explain me in detail(please don't mind) how I can use it. In my case, Workflow consists of 20 form variables but the other variables are configurable data(may be specific to each request) priority color, email fields, auto reassign task to some one if actually assigned user not responded for a particular time. All these data are varied for each request and all this data comes through xml format. How do we can handle these configurable data through System of Record?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Swamy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 12:04:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32371#M13716</guid>
      <dc:creator>swamy2156</dc:creator>
      <dc:date>2017-05-12T12:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Undeploying workflow taking long time</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32372#M13717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a pretty decent description of process solutions and SOR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://soapower.com/IBMBPM/Whitepapers/IBM-BPM-BP-BestPractices-SystemOfRecord-BPM-SOR-Architecture.pdf" title="http://soapower.com/IBMBPM/Whitepapers/IBM-BPM-BP-BestPractices-SystemOfRecord-BPM-SOR-Architecture.pdf" rel="nofollow noopener noreferrer"&gt;http://soapower.com/IBMBPM/Whitepapers/IBM-BPM-BP-BestPractices-SystemOfRecord-BPM-SOR-Architecture.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 12:08:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32372#M13717</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-12T12:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Undeploying workflow taking long time</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32373#M13718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing I understand is that we can achieve this using &lt;STRONG&gt;store entity task&lt;/STRONG&gt; feature as per this blog(&lt;A href="https://community.alfresco.com/community/bpm/blog/2016/11/17/activiti-enterprise-developer-series-custom-data-models" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/community/bpm/blog/2016/11/17/activiti-enterprise-developer-series-custom-data-models&lt;/A&gt;&amp;nbsp;). But I couldn't see this activity in the version I am using Activiti community version 5.21. Is this not available in Activiti community edition? Does this available in Activiti v6?&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>Mon, 15 May 2017 15:20:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32373#M13718</guid>
      <dc:creator>swamy2156</dc:creator>
      <dc:date>2017-05-15T15:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Undeploying workflow taking long time</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32374#M13719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data models are an Enterprise Only feature.&lt;/P&gt;&lt;P&gt;You can achieve pretty much the same thing (just without the tooling integration) using JPA Entities (which is all data models do anyway).&lt;/P&gt;&lt;P&gt;JPA is well documented in the Activiti Community Edition Users Guide here:&amp;nbsp;&lt;A class="link-titled" href="https://www.activiti.org/userguide/#_jpa" title="https://www.activiti.org/userguide/#_jpa" rel="nofollow noopener noreferrer"&gt;Activiti User Guide - JPA&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As a best practice, only data required to orchestrate the process logic and to retrieve data used in services and forms should be stored in the process, everything else should be retrieved as needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are many good books on the subject.&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2017 15:30:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/undeploying-workflow-taking-long-time/m-p/32374#M13719</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-05-15T15:30:36Z</dc:date>
    </item>
  </channel>
</rss>

