#customquery #JPQL

How to fetch Data from BDM using a Specific Criteria

Hello Community

I am trying to Implement a scenario . I have stored user name, emails and Password expiry date in my Database.
Now Bonita process will Search the Database and for those where the Expiry date is 15 days from current date, the Application will send an email to User notifying about the Expiry date.

Please help in implementing this.
1) Could we use a JPQL query to return a List of Dates ? But we cannot assign this output to Process variable. Nor can we assign the output to BDM Object variable.

org.hibernate.exception.SQLGrammarException: could not extract ResultSet"

I have used the likes as follows in JPQL query

FROM CarProperties c
(c.pDateTime = :pDateTime or :pDateTime is NULL)
and (c.driverName like '%'||:driverName||'%' or :driverName is NULL) 
ORDER BY c.persistenceId ASC

this work in BonitaStudioTomcat and H2 DB
But dont work in Tomcat bundle and PostgreSQL and raise Error :
org.bonitasoft.engine.commons.exceptions.SRetryableException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet

Call a business data (custom) query with multiple filter

Hey guys,
I created a table like in the "getting started tutorial": https://www.bonitasoft.com/resources/videos/getting-started-tutorial?des... and everything works fine.

But now I want to get my table filled not with items via one filter, but with two.
So the actual code looks like this and its working: