在运行activiti时,报错信息如下:
Exception in thread "main" org.activiti.engine.ActivitiTaskAlreadyClaimedException: Task '12502' is already claimed by someone else.at org.activiti.engine.impl.cmd.ClaimTaskCmd.execute(ClaimTaskCmd.java:50)at org.activiti.engine.impl.cmd.ClaimTaskCmd.execute(ClaimTaskCmd.java:24)at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:56)at org.activiti.engine.mandInvoker$1.run(CommandInvoker.java:37)at org.activiti.engine.mandInvoker.executeOperation(CommandInvoker.java:78)at org.activiti.engine.mandInvoker.executeOperations(CommandInvoker.java:57)at org.activiti.engine.mandInvoker.execute(CommandInvoker.java:42)at org.activiti.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:48)at org.activiti.engine.mandContextInterceptor.execute(CommandContextInterceptor.java:63)at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:35)at org.activiti.engine.mandExecutorImpl.execute(CommandExecutorImpl.java:44)at org.activiti.engine.mandExecutorImpl.execute(CommandExecutorImpl.java:39)at org.activiti.engine.impl.TaskServiceImpl.claim(TaskServiceImpl.java:184)at com.yao.day05.GroupTest.main(GroupTest.java:78)
查看该任务发现已经存在任务执行人,所以设置候选用户时报错如上图。
对已有任务执行人,不应再设置候选用户。