Clarity: Process Engine Post Condition executes high number of attribute isAudited checks instead of utilizing ODF cache

Document ID : KB000049042
Last Modified Date : 14/02/2018
Show Technical Document Details


Instead of accessing the ODF cache to determine whether an object's attribute is currently audited, the Post Condition threads in the process engine are executing the following query an enormous number of times on environments with large numbers of running processes:

select :"SYS_B_0"
from dual
where exists( select :"SYS_B_1" from odf_audited_attributes where object_code= :v0 and attribute_code= :v1 and is_active= :v2 )

This is a partial stack trace from a Post Condition thread, caught performing this, it is "isAttributeAuditEnabled" that is performing the query when it should just be accessing the ODF cache for the object.

at com.niku.union.persistence.PersistenceController.processRequest(
at com.niku.odf.utils.PersistenceRequestUtil.persistStatementSet(
at com.niku.odf.object.audit.Utils.isAttributeAuditEnabled(
at com.niku.bpm.ui.ExprBuilderDataService.prepareAuditTrailAttributes(
at com.niku.bpm.ui.ExprBuilderDataService.createObjectDescriptor(
at com.niku.bpm.ui.ExprBuilderDataService.createObjectDescriptors(
at com.niku.bpm.engine.exprevaluator.ExprEvaluatorDataService.getExprEvalMetaData(
at com.niku.odf.exprbuilder.ExpressionEvaluator.getExpressionVariables(
at com.niku.bpm.engine.exprevaluator.omp.OMPExpressionAdapter.getExpressionVariables(
at com.niku.odf.exprbuilder.ExpressionEvaluator.evaluate(
at com.niku.bpm.engine.exprevaluator.omp.OMPExpressionEvaluator.evaluateStepCondition(
at com.niku.bpm.engine.exprevaluator.ExpressionEvaluator.evaluate(
at com.niku.bpm.engine.rules.PostConditionTransitionPipeline.evaluatePostConditions(
at com.niku.bpm.engine.rules.PostConditionTransitionPipeline.execute(

In a customer 13.1 environment (over 9000 running processes), the query above was executed over 3.5 million times in an hour and the BG process is consuming 50% of the CPU on a 16-core machine.



This issue is documented as CLRT-71263 and is in review with development.

Keywords: CLARITYKB, CLRT-71263, clarity12open, clarity13open.