Dynamically setting user task assignee

后端 未结 1 1044
野趣味
野趣味 2021-02-15 16:06

I have to create process in activiti which requires the following use case.

1.The form has a people search field 2.When someone completes the form and completes the task

相关标签:
1条回答
  • 2021-02-15 16:49

    You can use following steps:

    1. Pass input user value from your html form to Activiti using taskService.complete(task.getId(), taskVariables); taskVariables should contain variable with keys for example 'userId' or 'userIds' to access submitted values in process instance
    2. Use expressions in your process definitions <userTask id="task" name="My Task" activiti:assignee="${userId}"/> or <userTask id="task" name="My Task" activiti:candidateUsers="${userIds}"/> to assign tasks

      Also look to http://www.activiti.org/userguide/#bpmnUserTask and http://www.activiti.org/userguide/#springExpressions for detailed information
    0 讨论(0)
提交回复
热议问题