TaskEntity does not populate processInstanceId

Description

When I query for a Task (i.e. I am looking for unassigned tasks) with:

taskService.createTaskQuery().candidateUser( ... ).list()

The TaskEntity objects that I get back do not populate the processInstanceId field:

task: <org.activiti.engine.impl.task.TaskEntity@7e869fcb id=5 revision=1 assignee=null name=Investigate description=Investigate potential duplicate invoices. formResourceKey=null priority=50 createTime=Tue Oct 05 10:04:43 EST 2010 isIdentityLinksInitialized=false taskIdentityLinkEntities=[] executionId=3 execution=null processInstanceId=null processInstance=null processDefinitionId=duplicateInvoice:1>

However when I look at the database I see that the task involved does have a processInstancId populated:

ID_ REV_ PROC_INST_ID_ BUSINESS_KEY_ PARENT_ID_ PROC_DEF_ID_ SUPER_EXEC_ ACTIVITY_ID_ IS_ACTIVE_ IS_CONCURRENT_ IS_SCOPE_
3 1 3 NULL NULL duplicateInvoice:1 NULL investigate 1 0 1

Environment

OSX, MySQL

Assignee

Joram Barrez

Reporter

Michael Lawler

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure