AnsweredAssumed Answered

TaskQuery vs HistoricTaskInstanceQuery

Question asked by jdev.hari on Jun 24, 2013
Latest reply on Jun 25, 2013 by frederikheremans1
I was taking a look at both these classes and I was wondering if they should be a hierarchial relationship between them. i.e. HistoricTaskInstanceQuery must extend TaskQuery.

I have a scenario where I need to query process variables for a given task (which I wont know whether it is an active task or achived). Currently I have it code flow as follows

1. Create an instance of task query
2. Set the query params that I have (task id and few others)
3. Fire the query and get task instances
4. Create an Historic instance of task query
5. Set the query params that I have (task id and few others)
6. Fire the query and get historic task instances
7. club (3) & (6)

Whereas if we had this hierarchial relationship, I would have to construct the query object only once. Same concept applies for the result i.e Task and HistoricTaskInstance. Can someone explain why they are currently unrelated class hierachies?

Outcomes