Very slow api call with includeProcessVariables

Hi all,

My POST to /query/historic-process-instances restful endpoint is very slow with option includeProcessVariables=true. We have only 400 historical process instances.

However I am relying on process variable to store some additional data on the process instance. Did I choose the wrong approach to store additional data? And why it is so slow? How to make it faster?

Hi,

When process variables are included, an outer join is made with the ACT_RU_VARIABLE table. Is it possible that you have a large number of variables, or a couple of big variables store in the engine database? In this case the query can be really slow. Do you need the variables to be returned together with the process instance list, or could you also fetch them when looking at the details of a specific process instance?

Best regards,

Tijs

Hi Tijs, I have about 20 variables per instance and they are all small string. Just feel it should not be this slow to return a couple hundred results.

I just want to store additional metadata like “category” on process instances, without creating my own database tables to correlate them. Process variables seemed to be the natural way. Maybe there’s some other recommended way? Native SQL query?

Hi,

Via the REST API also a count query is performed after fetching the results, so the query time is already doubled. Together with paging this could result in this response time, although it’s really a lot for just 20 variables. Which database are you using? I think the query in Flowable is just an outer join with the variables table, but it would be good indeed to see which results you get with plain SQL. You can set the log level to debug to see which query is actually performed by Flowable.

Best regards,

Tijs

Hi,

Can you please tell me how to set the log level to debug. I already changed the log4j.properties files in all unpacked folders of all the five applications but still not able to see any debug logs

See: Generate log files

I did restarted the tomcat. Here is the log4j.propeties that i changed. Please let me know if there is anything wrong in thatCapture1 .

But i didn’t see any debug log after starting the tomcat server.

See: Logging - File Output