Camunda 8 - Block User from accessing/claiming a Human Task although being part of Candidate Group


This is similar to question asked here Block User Task starter from working on a task.

I have two human tasks exposed to same CandidateGroup(Group-A). If Mr.X from Group-A claimed and completed the first task, he should not be allowed to claim the second task (In other words, he should not be even able to see that particular item in his WorkInbox/TaskList).

Now there is no Task Listener in Camunda 8 And in Camunda 7, if someone follows External Task pattern and not using JAVA, How can we achieve this functionality?

Could experts please give your suggestions on this?

Hey @Mahesh,
Since you can not make use of Task Listeners as suggested in Camunda 7 it get’s a bit more tricky.
I think the easiest way is to add a Service Task between your two User Tasks. In this task you can then automatically change the assignee / candidate group.

What do you think about this procedure?

Working in another BPM system, we used a special dynamic user assignment that would effectively create a dynamic list of users for a given task. It would start with the users in the group and subtract the user (or users) that had an earlier role in the instance. That seemed elegant but caused side effects when people were added to or removed from the candidate group.

We are considering implementing another approach with Camunda 8. We are considering a custom header named something like “ExcludeUsersFromActivities”. It would have a list of 1-n activity ids. The users that completed those activities would be excluded from the group and could not claim the task.

Imagine a process that has three activities: Prepare, Review 1 and Review 2 in sequence. This is sometimes called a “four eyes” review process. The two review activities would have Reviewers as the candidate group.

Since a reviewer can also do preparation in some cases (the person would be in Preparers and Reviewers groups), the Review 1 activity would have ExcludesUserFromActivities: Activity_Prepare.

The Review 2 activity would have ExcludeUsersFromActivities: Activity_Prepare, Activity_Review_1.

We are considering implementing this as part of the task assignment handling in Apex Camunda Explorer and the underlying Camunda 8 Library of Apex Designer. We would love to hear your feedback on the concept.

Hi @Hafflgav

Thanks for your reply.

We cannot create a new group dynamically using that intermediate Service Task which will have all the users of Group-A except Mr.X.

UI(Work Inbox) sits in our business platform which always checks for the groups that the person is part of ,and in our Camunda BPMN, we have hardcoded those groups.

Hi @David_Knapp

Thanks for your reply.

This solution makes sure that the same user cannot claim the next task. But will we have any option in GetTasks(WorkInbox loading) call to pass this UserId to check with Camunda so that the task doesnt appear at all in his Work Inbox?

@Mahesh - apologies for the delayed response. I had a busy few days :).

The implementation of this concept would depend on your app. In our case, we have an app that runs alongside the Zeebe engine and handles the task assignments and enforcing business logic. We will implement this new logic in the underlying Apex Designer Camunda 8 library so that it works for any app built in Apex Designer. When we implement that it would not only prevent the claim but also would filter those tasks out of the list that the user sees.

If you are using the Camunda 8 Platform TaskList (the component that handles this stuff), you would need to submit an enhancement request for that api.


No problem Sir. Thanks for your reply again.

If it can filter out the task, then this is a really good feature.



@Ashish_Apex just finished implementing this feature in the latest version of the Camunda 8 Library for Apex Designer. You can read about it in his blog post here.


1 Like

HI @David_Knapp ,

Thank you for sharing this.

Blog is really good and the solution looks pretty clean.