# SQLServer taskQuery different then H2

**URL:** <https://forum.flowable.org/t/sqlserver-taskquery-different-then-h2/5928>\
**Category:** Uncategorized\
**Created:** [April 30, 2020, 12:00pm UTC](https://forum.flowable.org/t/sqlserver-taskquery-different-then-h2/5928 "2020-04-30T12:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjmac](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@tjmac](https://forum.flowable.org/u/tjmac)\
**Post date:** [April 30, 2020, 12:00pm UTC](https://forum.flowable.org/t/sqlserver-taskquery-different-then-h2/5928/1 "2020-04-30T12:00:58Z")

</div>

When I run the following taskQuery, cmmnTaskQueryService, I get different results if running in H2 vs running in SQLServer. The issue is with the scopeId and subScopeId being null in the SQLServer.

def taskQuery = taskService.createTaskQuery().  
caseInstanceId(caseId).  
includeProcessVariables().  
includeTaskLocalVariables().  
list()

taskQuery.each {  
println "task: name: {it.name} id: {it.id} scopeId: {it.scopeId} subScopeId: {it.subScopeId} propagatedStageInstanceId: ${it.propagatedStageInstanceId} "  
}

H2 Results, as I expected:

task: name: Human Task 1  
id: e4736ce3-8ad8-11ea-802a-a21879b72449  
scopeId: e4608115-8ad8-11ea-802a-a21879b72449  
subScopeId: e47345d0-8ad8-11ea-802a-a21879b72449  
propagatedStageInstanceId: e4619288-8ad8-11ea-802a-a21879b72449

SQLServer Results, missing id’s:

task: name: Human Task 1  
id: f9987044-8ad7-11ea-a597-a21879b72449  
scopeId: null  
subScopeId: null  
propagatedStageInstanceId: null

I can see the id’s in the SQLServer database when I query the task table.

Any ideas how to get the id’s in the SQLServer to populate?

---

<div class="post-metadata">

**Author:** ![apk](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@apk](https://forum.flowable.org/u/apk)\
**Post date:** [April 30, 2020, 3:27pm UTC](https://forum.flowable.org/t/sqlserver-taskquery-different-then-h2/5928/2 "2020-04-30T15:27:59Z")

</div>

Looks like this might have been resolved by a commit about a month ago.  
[https://github.com/flowable/flowable-engine/blame/3761fcad0f6b60cba695719e6f9181f9d6710ad3/modules/flowable-task-service/src/main/resources/org/flowable/task/service/db/mapping/entity/Task.xml#L492](https://github.com/flowable/flowable-engine/blame/3761fcad0f6b60cba695719e6f9181f9d6710ad3/modules/flowable-task-service/src/main/resources/org/flowable/task/service/db/mapping/entity/Task.xml#L492)

Does anyone know if there is a timeline for the next release that would incorporate this change?

---

<div class="post-metadata">

**Author:** ![dbmalkovsky](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/dbmalkovsky/32/31_2.png) [@dbmalkovsky](https://forum.flowable.org/u/dbmalkovsky)\
**Post date:** [May 2, 2020, 7:19pm UTC](https://forum.flowable.org/t/sqlserver-taskquery-different-then-h2/5928/3 "2020-05-02T19:19:33Z")

</div>

It appears that the team is still trying to determine a realistic date for the release per this [post](https://forum.flowable.org/t/flowable-6-5-1-release-date/5613/2).
