how to use SearchQueryBuilder criterion with "not"?

1
0
-1

Hi,

how do I use a "not", or something like that, in the criterion of a query?

If I want all the process intances where the active user is the logged user I can do something like this:

query.criterion(ProcessInstanceIndex.ACTIVE_USER).equalsTo(loggedUser)

But if I want the opposite? the instances where the active user is NOT the logged user?

Thanks in advance,

jCor

Comments

Submitted by rafael.vianna on Wed, 10/30/2013 - 12:43

Have you tried

query.criterion(ProcessInstanceIndex.ACTIVE_USER).notequalsTo(loggedUser)
?
Submitted by jcor on Fri, 11/01/2013 - 16:22

hi rafael.vianna,

your example returns the following error in log:

  1. groovy.lang.MissingMethodException: No signature of method: org.ow2.bonita.search.Criterion.notequalsTo() is applicable for argument types: (java.lang.String) values: [My_Process--1.4]<br />
  2. Possible solutions: equalsTo(java.lang.String)

and in the javadocs I can't see that method, at least in bonita 5.9, which is the one I'm using,

Does that work for you?

thanks for your input,

jCor

Submitted by rafael.vianna on Fri, 11/01/2013 - 16:32

Hi,

My bad on this try. I should know that wouldn't work for you.

However I've found that: http://docs.oracle.com/javase/tutorial/java/IandI/objectclass.html

Maybe it can help.

[ ]'s

No answers yet.
Notifications