alice
January 9, 2018, 3:09pm
1
The 7.8 version of the REST API seems to suffer to a similar bug of the 7.6 when filtering tasks by variables value.
To get a list of task filtered by a variable it is sufficient to make a call using the following parameter
taskVariables&variableName_operator_value.
In previous version filtering with ‘like’ did not work:
I’m not sure you’ll consider this a “workaround”, but you can just go directly to the database. In our case we use MySQL, that’s what the following will address. We’re using Camunda 7.6.2. Assume the back end Camunda database is called “camunda”. You can adjust the columns returned as needed.
These statements apply to variables stored in the TEXT_ column of the database.
This will get you historical variables:
SELECT * FROM camunda.ACT_HI_VARINST WHERE NAME_ LIKE 'Bob%';
If you want runti…
now, in 7.8, variable_like_value does return a status of 200 but does not correctly get the tasks.
it has the same behaviour as eq if the value is complete, for example
company_like_acme gets 10 task
company_eq_acme gets 10 task
it gets 0 tasks if the value is just a piece of our word, such as
company_like_ac gets 0 tasks
Any news regarding this functionality?
Hi @alice ,
do you mean historic task instances?
Can you past which REST request are you using?
alice
January 9, 2018, 4:16pm
3
I’m using the get task query https://docs.camunda.org/manual/7.5/reference/rest/task/get-query/ , not the History one, i hope they work similarly.
GET
/engine-rest/task?active=true&processVariables=company_like_acme
if “acme” get truncated, the ‘like’ operator gets the same result as the ‘equal’ operator.
What happens if you try this:
GET /engine-rest/task?active=true&processVariables=company_like_acm%
alice
January 9, 2018, 4:37pm
5
sdorokhova:
%
Thanks to sdorokhova suggestion, now I’m able to search for the truncated words, many thanks.
GET
‘…/engine-rest/task?active=true&taskVariables=company_like_’+company+“%25”;
Regards,
Alice
1 Like