cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in 'Like' expressions in Activiti Rest?

jindal8787
Champ in-the-making
Champ in-the-making
Hi Team

We were exploring the options of using 'like' expressions in Activiti Rest API (v5.17.0) for getting the list of tasks. However, for our surprise.. like seems to be working for certain query parameters but not on others. For e.g., it works fine with task name & tenant ID, however it doesn't work with assignee & process-instance business key like parameters.

URLs that works fine -

/activiti-rest/service/runtime/tasks?nameLike=my%25
/activiti-rest/service/runtime/tasks?tenantIdLike=m%25

URLs NOT working -

/activiti-rest/service/runtime/tasks?assigneeLike=j%25 (It gives me all the tasks in Activiti Engine rather it should give a handful)
/activiti-rest/service/runtime/tasks?processInstanceBusinessKeyLike=myB%25 (same, it gives me all the tasks in Activiti Engine rather it should give a handful).

Please confirm if it is a bug in Activiti Rest (v5.17.0)? Any resolution?

Thanks
Amit Jindal
4 REPLIES 4

jindal8787
Champ in-the-making
Champ in-the-making
Anyone?

jbarrez
Star Contributor
Star Contributor
I checked the current code on master, and it simply passes it to the Java API. It should work.

Did you test this on a recent Activiti version? 5.17 is quite a while ago.

jindal8787
Champ in-the-making
Champ in-the-making
Hi Jbarrez, I tried with Activiti 5.21.0 version. No luck. Same result. Smiley Sad

jbarrez
Star Contributor
Star Contributor
You are correct. Fix is here: https://github.com/Activiti/Activiti/commit/47253b7edc10720a4f9d0c203eb225f14e7215a6

Also not that you need to replace % with %25 if you're the browser for example.