Sequential Multi instance task creation

Hi,

I am new to camunda, i need to add mutiple users to a task in my workflow using rest api, can anyone help me on this with any example?

there are multiple ways to add users to task type UserTask.

  • You can configure plugins LDAP plugin or you can implement ReadOnlyIdentityProvider to provide custom access to users from any other form of user store.
  • Create users through camunda app which will persist all the users in camunda database table ACT_ID_USER .
  • You can submit as part of request body when invoking camunda rest api and configure task listener to any task, then from that task listener you can set the users for any user tasks.

Thanks for contributing, but my requirement is totally different. I want to assign a single usertask to multiple users or create seperate subtasks for a parent task and execute it in an order(one after another). can you help me on this

You can assign a task to multiple users. Here users is a comma seperated string value.

Collection<String> candidateUsersList = Arrays.asList(users.split(","));
delegateTask.addCandidateUsers(candidateUsersList);

Is there anyway to set the execution order that the second user should execute task only after first user

Hi @Ashikh_P_M,

a Task is usually completed once. If you want to execute it multiple times with different assignees you can use a multi-instance task marker. (See https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/task-markers/#multiple-instance)
You can pass a collection of assignee names to the task. This has been discussed in this topic.

Cheers,
Miklas