I suspect that when the REST API calls the engine API for that service/query/tasks request it does so using a query on tasks rather than tasks with variables. It probably does this because retrieving the variables too is a more complex query that returns more data and in some cases quite a lot of data (since you might have a lot of variables). But perhaps for your case you do want the variables too? I'm not sure if that's what you want or if you're looking for a custom endpoint that tells you tasks that have a task variable of a particular value. If so maybe another approach would be to query for the variable first and then use that result to find the task? I'm not entirely sure whether there is an endpoint that lets you do what you're looking for. Which version of Activiti or Alfresco Process Services are you using?
My activiti version is activiti-6.0.0 and I used activiti-rest.Yeah,we can search a variable to get a task id. Then ,use this id to query task.But I care that both document and swagger-UI show me the option about “taskVariables”:Activiti User Guide . I believe that rest-api support it and i want to use this option
I think you are right. I am not immediately sure where to check though. Maybe some searches/digging in the v6 code base for those rest end points or some strings that appear in the swagger Activiti/ at 6.x · Activiti/Activiti · GitHub