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 - repositoryService.deleteDeployment(deploymentId, true);
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.
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.
10-May-2017[07:18:31.722]:EBUG::ajp-nio-10002-exec-18:rg.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId:132 - ==> Preparing: select * from ACT_HI_VARINST where ID_ = ?
10-May-2017[07:18:31.723]:EBUG::ajp-nio-10002-exec-18:rg.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId:132 - ==> Parameters: e4c1eeae-3575-11e7-89d1-020030001cf1(String)
10-May-2017[07:18:31.726]:EBUG::ajp-nio-10002-exec-18:rg.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId:132 - <== Total: 1
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.
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.
Any suggestions will be appreciated.
thanks,
Swamy.
By the way, I am using Oracle 11g RAC database for my application.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.