flowable addcandidateuser
时间: 2023-10-12 15:09:30 浏览: 66
The command "addCandidateUser" in Flowable is used to add a user as a candidate for a specific task. This means that the user is identified as someone who could potentially complete the task, but is not yet assigned to it.
The syntax for the command is as follows:
```
taskService.addCandidateUser(taskId, userId);
```
Where:
- `taskId` is the ID of the task to which the user is being added as a candidate
- `userId` is the ID of the user being added as a candidate
Example:
```
Task task = taskService.createTaskQuery().taskId("123").singleResult();
taskService.addCandidateUser(task.getId(), "user1");
```
In this example, the user with ID "user1" is added as a candidate for the task with ID "123".
阅读全文