Thanks for the link, wasn’t aware of some of the features like the custom queries and never saw a native query example before tbh, but still I think it would be a good addition to the engine to have the OR queries for at least the process instances.
I’m more or less done with the or/endOr feature for process instance, historic process instance and historic task queries, but I’m not able to initialize the or queries or variables like in the TaskQueryImpl, I’m getting a NPE when trying to access the ProcessEngineConfiguration which seems to be null in the current Context. Does anybody have an idea why the ProcessEngineConfiguration is null for the HistoricProcessInstanceQuery?
Here is the stacktrace I’m getting:
java.lang.NullPointerException: while trying to invoke the method org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.getVariableSerializers() of a null object returned from org.camunda.bpm.engine.impl.context.Context.getProcessEngineConfiguration()
at org.camunda.bpm.engine.impl.HistoricProcessInstanceQueryImpl.ensureVariablesInitialized(HistoricProcessInstanceQueryImpl.java:408)
at org.camunda.bpm.engine.impl.HistoricProcessInstanceQueryImpl.executeList(HistoricProcessInstanceQueryImpl.java:378)
at org.camunda.bpm.engine.impl.AbstractQuery.evaluateExpressionsAndExecuteList(AbstractQuery.java:189)
at org.camunda.bpm.engine.impl.AbstractQuery.list(AbstractQuery.java:142)
And here are my current sources (based on the tag of 7.10.0):
FYI: I found the issue regarding the NPE, it was more or less related to my application which uses camunda. It’s a spring application with separate application database and camunda database and I was switching the transaction context from my spring and the camunda context within one bean which is not a good idea.
So I’m about to finalize the OR conditions feature and then I’m going to raise a PR.