Assign user to task Automatically

Good day,
I’m new in Camunda and i am trying to set the assignee automatically to a user task after the previous task is completed.

I want to ask a bout two things:

  1. Currently i’m doing the assignment by code and i feel that this is not the right way to do it and should be done this by design. how to accomplish that?
    (Setting the Candidate group in the modeler didn’t solve the issue).
  2. Kindly can you suggest a source to learn a bout tasks dispatching (to a candidate group) . we need the tasks to be distributed to the users in a fair way.

Capture

Hi @a-mubarak,

You can use process variable to hold dynamic value of assignee

https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/#using-process-variables

Setting process variables in task forms can be done in many ways based on the type of the form used.

https://docs.camunda.org/manual/latest/user-guide/task-forms

Nice
Will check it out. Thank you