Search code examples
javabpmncamunda

What is the difference between "set assignee" and "delegate task" in Camunda?


In Camunda REST API there are two calls

  1. Set Assignee
  2. Delegate Task

If I understand correctly, both of them assign a task to a specific user.

What is the difference between these two calls?


Solution

  • A task in your process reamains active until it is completed or canceled. To control which user(s) should work on this task, you use the candidate user/group property, it allows you to filter on potential tasks in your tasklist.

    The "assignee" is a special property that marks a task as "being worked on by a specific user". Its very common to do so when you start working on a task from your tasklist, so colleagues will not start working on the same task.

    Delegate a task means that you as a task worker decide that someone else should do some (partial) work on this task, but give it back to you when he is done. It remains your responsibility to complete it after it is handed back to you.

    TLDR: Neither setAssignee nor delegate are required for the tasks lifecycle (you always can complete) but they are useful lifecycle extensions to organize your workflow. Setting an assignee is a very common way of blocking a task for others, delegation is (at least in my projects) very rarely used way of further workload distribution.