improve exception thrown by taskservice.claim()

Description

claim() in the taskservice currently throws a generic ActivitiException when the task was already claimed by someone else:

it seems to me that this is quite a common case, if you have let's say 10 users in a candidate group looking at the same list of tasks it will happen often that you claim something that was already claimed. This is part of common and normal workflow interaction. So why not throw a specific exception 'TaskAlreadyClaimedException' instead, and put the assignee in it so we can display a nice message like 'This task was already claimed by user xyz'.

If this seems reasonable i can provide a quick patch.

Assignee

Falko Menge (camunda)

Reporter

Jorg Heymans

Labels

None

Components

Fix versions

Priority

Major
Configure