Hero
Hero

Reputation: 647

Camunda Rest API Assign Task Group

We are using Camunda in our application for approval flow. As per the below documentation from Camunda we can create the task and assign it to user.

I wanted to know if we can assign the task to a group instead of individual user

Request parameters - I tried with "candidateGroups" : {"value"} but no luck.

{
  "id": "aTaskId",
  "name": "My Task",
  "description": "This have to be done very urgent",
  "priority" : 30,
  "assignee" : "peter",
  "owner" : "mary",
  "delegationState" : "PENDING",
  "due" : "2014-08-30T10:00:00",
  "followUp" : "2014-08-25T10:00:00",
  "parentTaskId" : "aParentTaskId",
  "caseInstanceId" : "aCaseInstanceId" 
}

Upvotes: 0

Views: 2606

Answers (1)

jklee
jklee

Reputation: 2268

You can't assign a task to a group. But you can define candidate groups into your BPMN process. This can also be a service/query.

The candidateGroups attribute: this custom extension allows you to make a group a candidate for a task.

<userTask id="theTask" name="my task" camunda:candidateGroups="management, accountancy" /> 

This is exactly the same as using a potentialOwner construct as defined above. Note that it is not required to use the group(management) declaration as is the case with the potential owner construct, since this attribute can only be used for groups.

https://docs.camunda.org/manual/7.6/reference/bpmn20/tasks/user-task/#candidate-groups

Upvotes: 1

Related Questions