I found out that some queries are not optimal, for example:
select count(distinct RES.ID_) from ACT_RU_TASK RES inner join ACT_RU_VARIABLE A0 on RES.PROC_INST_ID_ = A0.PROC_INST_ID_ WHERE ( exists(select LINK.USER_ID_ from ACT_RU_IDENTITYLINK LINK where USER_ID_ = ? and LINK.TASK_ID_ = RES.ID_) or RES.ASSIGNEE_ = ? or RES.OWNER_ = ? ) and A0.TASK_ID_ is null and A0.NAME_= ? and A0.TYPE_ = ? and A0.TEXT_ = ?
I want to override this query
You probably can, but you will need to make sure that your query is correct for all the use cases that the previous one was defined.
I would rather recommend to submit a PR with a test case that demonstrate that the new query is better, so we can all benefit from it.
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.