# REST: Task query:Get subset of process variables

**URL:** <https://forum.flowable.org/t/rest-task-query-get-subset-of-process-variables/3813>\
**Category:** Flowable Engine\
**Created:** [May 1, 2019, 6:41pm UTC](https://forum.flowable.org/t/rest-task-query-get-subset-of-process-variables/3813 "2019-05-01T18:41:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erny](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/erny/32/1186_2.png) [@erny](https://forum.flowable.org/u/erny)\
**Post date:** [May 1, 2019, 6:41pm UTC](https://forum.flowable.org/t/rest-task-query-get-subset-of-process-variables/3813/1 "2019-05-01T18:41:52Z")

</div>

Dear all.

Although we’re still not using Flowable (we still use Activiti with some customizations and still haven’t had the time to migrate)…

is there a way to get a subset of process variables.

Use case: we store some quite big data in process variables (bad practice?) and showing paged task list requires to include all variables in task query or none and doing a separate call for each variable we want to display.

With separate variable query (2 variables): 21 queries, initial task query: 18k  
With included variables: 1 query: 390k.

It would be very handy if we could specify a list of variable names to get. This could be mapped into a “in (…)” SQL query.

Thanks in advance.  
Best regards.  
Erny

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [May 7, 2019, 4:20pm UTC](https://forum.flowable.org/t/rest-task-query-get-subset-of-process-variables/3813/2 "2019-05-07T16:20:23Z")

</div>

Hey Erny,

I don’t see reason why it shouldn’t be possible to add something to the `ProcessInstanceQuery` or `TaskQuery` that would allow to include a subset of the variables.

The method can be something like `includeProcessVariables(String... variableNames)` or `includeProcessVariables(Collection<String> variablesNames)`.

Is this a feature that would prioritise your time to do the migration to Flowable 😉?

Cheers,  
Filip
