org.apache.ibatis.transaction.managed.ManagedTransaction - Opening JDBC Connection org.activiti.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria - ooo Using Connection [Transaction-aware proxy for target Connection from DataSource [org.apache.commons.dbcp.BasicDataSource@4cede921]] org.activiti.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria - ==> Preparing: select distinct RES.* from ACT_RU_TASK RES WHERE RES.ID_ = ? and RES.TENANT_ID_ = ? order by RES.ID_ asc LIMIT ? OFFSET ? org.activiti.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria - ==> Parameters: 1630666(String), tenantId(String), 2147483647(Integer), 0(Integer) org.activiti.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria - <== Total: 0 org.activiti.engine.impl.db.DbSqlSession - flush summary: 0 insert, 0 update, 0 delete. org.activiti.engine.impl.db.DbSqlSession - now executing flush… org.apache.ibatis.transaction.managed.ManagedTransaction - Closing JDBC Connection [Transaction-aware proxy for target Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@67b2ccc4]] org.activiti.engine.impl.interceptor.LogInterceptor - — TaskQueryImpl finished ——
If I run the same query directly on mysql db, I get the expected row in the resultset. I know this might not be enough information, but just wished to know if anyone else has seen this problem before. Is it related to some cache not being refreshed and trying to read stale data or something?
Yes. I can see an entry in ACT_RU_EXECUTION for the corresponding PROC_INST_ID_ which I assume means that I'm making that call inside the process instance execution. Does that make sense?
Guess I found out the problem. I was deleting workflow instance which might be invalidating the cache, but since the transaction wasn't committed yet, it explains why I could see that taskId in the ACT_RU_TASK table but not in localCache.
So this was a non issue, but a problem in the client code.