# Claim button is missing

**URL:** <https://forum.flowable.org/t/claim-button-is-missing/916>\
**Category:** Flowable Application\
**Created:** [September 1, 2017, 1:09pm UTC](https://forum.flowable.org/t/claim-button-is-missing/916 "2017-09-01T13:09:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastiaan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sebastiaan](https://forum.flowable.org/u/Sebastiaan)\
**Post date:** [September 1, 2017, 1:09pm UTC](https://forum.flowable.org/t/claim-button-is-missing/916/1 "2017-09-01T13:09:51Z")

</div>

In certain conditions A cadidate user doesn’t have a claim button.  
The users do however show in the candidate users.  
Screenshot as example.  
 ![flowable](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/flowable/original/1X/10f973f4a04f52104e28d5c3f45f66ce84d03941.png)

As you can see, rpa and slag are candidate. I’m logged in as rpa, but I cannot claim.

All tests are done on a fresh install of flowable version 6.1.2 with users in a local mariadb.

**Working condition:**  
Users are added during candidate process design:

```
    <userTask id="sid-970115D1-48B8-4338-BA0B-6BC58D66F767" flowable:candidateUsers="slag,rpa" flowable:formKey="test">
  <extensionElements>
    <modeler:user-info-email-slag xmlns:modeler="http://flowable.org/modeler"><![CDATA[slag@flowable.com]]></modeler:user-info-email-slag>
    <modeler:user-info-firstname-slag xmlns:modeler="http://flowable.org/modeler"><![CDATA[sebastiaan]]></modeler:user-info-firstname-slag>
    <modeler:user-info-lastname-slag xmlns:modeler="http://flowable.org/modeler"><![CDATA[lag]]></modeler:user-info-lastname-slag>
    <modeler:user-info-email-rpa xmlns:modeler="http://flowable.org/modeler"><![CDATA[rpa@flowable.org]]></modeler:user-info-email-rpa>
    <modeler:user-info-firstname-rpa xmlns:modeler="http://flowable.org/modeler"><![CDATA[robin]]></modeler:user-info-firstname-rpa>
    <modeler:user-info-lastname-rpa xmlns:modeler="http://flowable.org/modeler"><![CDATA[pa]]></modeler:user-info-lastname-rpa>
    <modeler:activiti-idm-candidate-user xmlns:modeler="http://flowable.org/modeler"><![CDATA[true]]></modeler:activiti-idm-candidate-user>
    <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler"><![CDATA[true]]></modeler:initiator-can-complete>
  </extensionElements>
</userTask>

```

**non working condition with a string variable in the process declaration:**  
in this case ${users} is populated during process start using an input box.  
The string would be similar to this: slag,rpa

```
    <userTask id="sid-D1BDD1F6-C3B5-4951-A0E4-2313A9DAC505" flowable:candidateUsers="${users}"></userTask>

```

**non working condition with java code:**

```
	public void notify(DelegateTask arg0) {
	System.out.println(arg0.getCandidates());
	
	arg0.addCandidateUser("rpa");
	arg0.addCandidateUser("slag");
}
```

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [September 5, 2017, 10:46am UTC](https://forum.flowable.org/t/claim-button-is-missing/916/2 "2017-09-05T10:46:14Z")

</div>

I’ve tried reproducing it, by adding a few candidate users in the modeler, but I can see the claim button for the three candidate users I added.

The xml has my users:

`flowable:candidateUsers="fozzie,gonzo,admin"`

Can you check in the database, more specifically whether the ACT\_RU\_IDENTITYLINK table contains the two candidate user entries?

---

<div class="post-metadata">

**Author:** ![Sebastiaan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sebastiaan](https://forum.flowable.org/u/Sebastiaan)\
**Post date:** [September 5, 2017, 2:31pm UTC](https://forum.flowable.org/t/claim-button-is-missing/916/3 "2017-09-05T14:31:07Z")

</div>

If you define the candidate users in the xml there isn’t an issue.

I attached an app with 3 test cases.  
[CandidateUsersapp](https://newteccy-my.sharepoint.com/personal/slag_newtec_eu/_layouts/15/guestaccess.aspx?docid=1f719b3cde76b4546b516e673de318024&authkey=AVnQX3UhdzT2DOuJjRP4k0A)

1. CandidateUsersPredefined. (working)  
Candidate users are predefined in the xml: flowable:candidateUsers=“slag,rpa”

database contents:

> ±-----±-----±----------±------------±---------±---------±--------------±-------------+  
> | ID\_ | REV\_ | GROUP\_ID\_ | TYPE\_ | USER\_ID\_ | TASK\_ID\_ | PROC\_INST\_ID\_ | PROC\_DEF\_ID\_ |  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+  
> | 5248 | 1 | NULL | starter | admin | NULL | 5246 | NULL |  
> | 5253 | 1 | NULL | candidate | slag | 5252 | NULL | NULL |  
> | 5254 | 1 | NULL | participant | slag | NULL | 5246 | NULL |  
> | 5255 | 1 | NULL | candidate | rpa | 5252 | NULL | NULL |  
> | 5256 | 1 | NULL | participant | rpa | NULL | 5246 | NULL |  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+

1. CandidateUsersWithVariable (not working)  
xml: flowable:candidateUsers=“${users}”  
Candidate users are requested during startup of the process and filled into a text field.  
users show up as candidate users but don’t have a claim button.

> MariaDB [flowable]\> SELECT \* FROM `ACT_RU_IDENTITYLINK` ;  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+  
> | ID\_ | REV\_ | GROUP\_ID\_ | TYPE\_ | USER\_ID\_ | TASK\_ID\_ | PROC\_INST\_ID\_ | PROC\_DEF\_ID\_ |  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+  
> | 5264 | 1 | NULL | starter | admin | NULL | 5262 | NULL |  
> | 5272 | 1 | NULL | candidate | rpa | 5271 | NULL | NULL |  
> | 5273 | 1 | NULL | participant | rpa | NULL | 5262 | NULL |  
> | 5274 | 1 | NULL | candidate | slag | 5271 | NULL | NULL |  
> | 5275 | 1 | NULL | participant | slag | NULL | 5262 | NULL |  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+

1. candidateusersWithJavaClass  
xml: flowable:candidateUsers=“”  
Candidate users are added with a DelegateTask using the java code: arg0.addCandidateUser(“rpa”);

> MariaDB [flowable]\> SELECT \* FROM `ACT_RU_IDENTITYLINK` ;  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+  
> | ID\_ | REV\_ | GROUP\_ID\_ | TYPE\_ | USER\_ID\_ | TASK\_ID\_ | PROC\_INST\_ID\_ | PROC\_DEF\_ID\_ |  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+  
> | 5281 | 1 | NULL | starter | admin | NULL | 5279 | NULL |  
> | 5286 | 1 | NULL | candidate | rpa | 5285 | NULL | NULL |  
> | 5287 | 1 | NULL | participant | rpa | NULL | 5279 | NULL |  
> | 5288 | 1 | NULL | candidate | slag | 5285 | NULL | NULL |  
> | 5289 | 1 | NULL | participant | slag | NULL | 5279 | NULL |  
> ±-----±-----±----------±------------±---------±---------±--------------±-------------+

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [September 7, 2017, 8:30pm UTC](https://forum.flowable.org/t/claim-button-is-missing/916/4 "2017-09-07T20:30:50Z")

</div>

Many thanks for the excellent explanation and example zip.  
You were right, both cases had a bug. The bug has been fixed here: [https://github.com/flowable/flowable-engine/commit/36199dba40ed6426dc9455054902cd0abed3aa7d](https://github.com/flowable/flowable-engine/commit/36199dba40ed6426dc9455054902cd0abed3aa7d)

---

<div class="post-metadata">

**Author:** ![Sebastiaan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sebastiaan](https://forum.flowable.org/u/Sebastiaan)\
**Post date:** [September 20, 2017, 11:17am UTC](https://forum.flowable.org/t/claim-button-is-missing/916/5 "2017-09-20T11:17:55Z")

</div>

Hi Joram, I compiled and installed 6.2.0-snapshot but I still encounter an issue using a java class.  
The task I run is the following:

```
    <startEvent id="startEvent1"></startEvent>
<userTask id="UserTask1" flowable:assignee="rpa">
  <extensionElements>
    <flowable:taskListener event="create" class="eu.newtec.ibq.AssignUser"></flowable:taskListener>
    <modeler:activiti-idm-assignee xmlns:modeler="http://flowable.org/modeler"><![CDATA[true]]></modeler:activiti-idm-assignee>
    <modeler:assignee-info-email xmlns:modeler="http://flowable.org/modeler"><![CDATA[rpa@newtec.eu]]></modeler:assignee-info-email>
    <modeler:assignee-info-firstname xmlns:modeler="http://flowable.org/modeler"><![CDATA[Robin]]></modeler:assignee-info-firstname>
    <modeler:assignee-info-lastname xmlns:modeler="http://flowable.org/modeler"><![CDATA[Panis]]></modeler:assignee-info-lastname>
    <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
  </extensionElements>
</userTask>

```

The java class contains the following:

> public class AssignUser implements TaskListener{

```
public void notify(DelegateTask delegateTask) {
	delegateTask.setAssignee("slag");
	delegateTask.addCandidateUser("edi");
	delegateTask.addCandidateGroup("lgoe");
	System.out.println(delegateTask.getAssignee());
	System.out.println(delegateTask.getCandidates());				
}

```

}

Console output:

> rpa

So I’m sure the Java class runs, since i get console output, but assigning or adding candidates isn’t done.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [September 28, 2017, 12:31pm UTC](https://forum.flowable.org/t/claim-button-is-missing/916/6 "2017-09-28T12:31:12Z")

</div>

There seems to be an issue indeed: the problem is that calling setAssignee() (and the others) doesn’t propagate the changes to the history. That’s something that needs fixing (but I doubt it’ll be possible for the next release).

As a current workaround, you need to go through the service. You can get the service via the CommandContextUtil: CommandContextUtil.getProcessEngineConfiguration().getTaskService().setAssignee();

---

<div class="post-metadata">

**Author:** ![Sebastiaan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sebastiaan](https://forum.flowable.org/u/Sebastiaan)\
**Post date:** [September 29, 2017, 9:27am UTC](https://forum.flowable.org/t/claim-button-is-missing/916/7 "2017-09-29T09:27:44Z")

</div>

Hi Joram,

Thx for looking into this.

I did some more testing using CommandContextUtil.  
The delegate task I’m using is the following:

```
	public void notify(DelegateTask delegateTask) {
	CommandContextUtil.getProcessEngineConfiguration().getTaskService().setAssignee(delegateTask.getId(), "rpa");
	CommandContextUtil.getProcessEngineConfiguration().getTaskService().addCandidateUser(delegateTask.getId(), "edi");
	CommandContextUtil.getProcessEngineConfiguration().getTaskService().addCandidateUser(delegateTask.getId(), "lgoe");
	CommandContextUtil.getProcessEngineConfiguration().getTaskService().addCandidateUser(delegateTask.getId(), "slag");
	System.out.println("candidates: " + delegateTask.getCandidates());
}

```

Console output is:  
candidates: [IdentityLinkEntity[id=52513, type=candidate, userId=edi, taskId=52507], IdentityLinkEntity[id=52519, type=candidate, userId=slag, taskId=52507], IdentityLinkEntity[id=52516, type=candidate, userId=lgoe, taskId=52507]]

Candidates are shown in the candidate list in flowable-task but the claim button is still missing.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [October 1, 2017, 10:18am UTC](https://forum.flowable.org/t/claim-button-is-missing/916/8 "2017-10-01T10:18:38Z")

</div>

The claim button is missing because there is an assignee being set. When an assignee is set, that assignee has claimed the task.

---

<div class="post-metadata">

**Author:** ![bogdan](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bogdan](https://forum.flowable.org/u/bogdan)\
**Post date:** [February 15, 2018, 2:04pm UTC](https://forum.flowable.org/t/claim-button-is-missing/916/10 "2018-02-15T14:04:59Z")

</div>

Hi,

I have just installed version 6.2.1 and I cannot claim a task. It is in status “Assigned to nobody” and there is no claim button. I am running in H2 configuration mode.

In the following it is the process def:

\<?xml version="1.0" encoding="UTF-8"?\> A vacation request model Provide vacation info 

Can you help me?

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [February 16, 2018, 1:18pm UTC](https://forum.flowable.org/t/claim-button-is-missing/916/11 "2018-02-16T13:18:01Z")

</div>

Are you sure the user is part of the ‘management’ group? I’ve tried it here (with master version though) and the claim button is there.

---

<div class="post-metadata">

**Author:** ![srinathganesh](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/srinathganesh/32/2392_2.png) [@srinathganesh](https://forum.flowable.org/u/srinathganesh)\
**Post date:** [June 4, 2019, 9:38am UTC](https://forum.flowable.org/t/claim-button-is-missing/916/13 "2019-06-04T09:38:00Z")

</div>

My observation is that “admin” (default user) does not get claim button but other users get the claim button somehow.

User case:

- A user assigns “admin” as a participant
