I'm beginner , I Succeeded to run Activiti Explorer With Mysql Database but When I create Task In Management Group and Try to Assign It to user I Failed !!
this is my code
ProcessEngine processEngine = ProcessEngineConfiguration
.createStandaloneProcessEngineConfiguration()
.setJdbcUrl(
"jdbc:mysql://192.168.1.7:3306/activiti2?autoReconnect=true")
.setJdbcDriver("com.mysql.jdbc.Driver").setJdbcUsername("root")
.setJdbcPassword("root").setDatabaseSchemaUpdate("true")
.buildProcessEngine();
TaskService taskService = processEngine.getTaskService();
Task task = taskService.createTaskQuery().taskCandidateGroup("management").singleResult();
task.setOwner("kermit");
task.setAssignee("fozzie");
taskService.saveTask(task);
I found his error
Exception in thread "main" org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'user' approver
at org.activiti.engine.impl.form.FormTypes.parseFormPropertyType(FormTypes.java:55)
at org.activiti.engine.impl.form.DefaultFormHandler.parseConfiguration(DefaultFormHandler.java:61)
at org.activiti.engine.impl.form.DefaultStartFormHandler.parseConfiguration(DefaultStartFormHandler.java:34)
at org.activiti.engine.impl.bpmn.parser.handler.StartEventParseHandler.createStartFormHandlers(StartEventParseHandler.java:84)
at org.activiti.engine.impl.bpmn.parser.handler.StartEventParseHandler.executeParse(StartEventParseHandler.java:58)
at org.activiti.engine.impl.bpmn.parser.handler.StartEventParseHandler.executeParse(StartEventParseHandler.java:38)
at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:84)
at org.activiti.engine.impl.bpmn.parser.handler.AbstractFlowNodeBpmnParseHandler.parse(AbstractFlowNodeBpmnParseHandler.java:27)
at org.activiti.engine.impl.bpmn.parser.handler.AbstractActivityBpmnParseHandler.parse(AbstractActivityBpmnParseHandler.java:36)
at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:73)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.processFlowElements(BpmnParse.java:435)
at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.transformProcess(ProcessParseHandler.java:88)
at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:49)
at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:35)
at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:84)
at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:73)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcessDefinitions(BpmnParse.java:395)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:231)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:107)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:50)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.resolveProcessDefinition(DeploymentManager.java:115)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedProcessDefinitionById(DeploymentManager.java:65)
at org.activiti.engine.impl.persistence.entity.TaskEntity.getTaskDefinition(TaskEntity.java:751)
at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:711)
at org.activiti.engine.impl.persistence.entity.TaskEntity.setAssignee(TaskEntity.java:561)
at org.activiti.engine.impl.persistence.entity.TaskEntity.update(TaskEntity.java:143)
at org.activiti.engine.impl.cmd.SaveTaskCmd.execute(SaveTaskCmd.java:44)
at org.activiti.engine.impl.cmd.SaveTaskCmd.execute(SaveTaskCmd.java:26)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.TaskServiceImpl.saveTask(TaskServiceImpl.java:84)
at com.activiti.book.AssigneTask.main(AssigneTask.java:89)