# Potential Owner not set for UserTask

**URL:** <https://forum.flowable.org/t/potential-owner-not-set-for-usertask/1877>\
**Category:** Flowable Engine\
**Created:** [April 11, 2018, 2:40pm UTC](https://forum.flowable.org/t/potential-owner-not-set-for-usertask/1877 "2018-04-11T14:40:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![donkon](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@donkon](https://forum.flowable.org/u/donkon)\
**Post date:** [April 11, 2018, 2:40pm UTC](https://forum.flowable.org/t/potential-owner-not-set-for-usertask/1877/1 "2018-04-11T14:40:51Z")

</div>

I have a trivial usertask using flowable 5.23:

```
<userTask id="edit" name="Edit something" activiti:candidateUsers="kermit"></userTask>

```

When running a process instance, the owner “kermit” is not persisted to the database, i.e. the field ACT\_RU\_TASK.OWNER\_ is always null and consequentially org.activiti.engine.task.Task.getOwner() from my TaskQuery is also null.

Am I missing something?

When I directly assign the task, everything works fine:

```
<userTask id="edit" name="Edit something" activiti:assignee="kermit"></userTask>

```

Here the assignee is available from the API

---

<div class="post-metadata">

**Author:** ![robert.hafner](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@robert.hafner](https://forum.flowable.org/u/robert.hafner)\
**Post date:** [April 12, 2018, 5:28pm UTC](https://forum.flowable.org/t/potential-owner-not-set-for-usertask/1877/2 "2018-04-12T17:28:31Z")

</div>

Hi Donkon,

A candidateUser is not the owner of a task which is why the ACT\_RU\_TASK.OWNER\_ field is always null when using the activity:candidateUsers attribute. The candidateUser value is instead stored in the ACT\_RU\_IDENTITY\_LINK table.

On the other hand, the “activity:assignee” attribute does define the owner (or the identity which has been assigned to) a task as would an API call to ‘claim’ a task.

Hope that helps a bit!  
Rob

---

<div class="post-metadata">

**Author:** ![donkon](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@donkon](https://forum.flowable.org/u/donkon)\
**Post date:** [April 13, 2018, 7:35am UTC](https://forum.flowable.org/t/potential-owner-not-set-for-usertask/1877/3 "2018-04-13T07:35:46Z")

</div>

thanks for your help, I got it.  
I was a bit confused, because I could not find a way to query the candidate users, so I mixed up assignee, owner and potentialOwners, but now I found it:  
taskService.getIdentityLinksForTask(“taskId”)
