Activiti: The deployment contains process definitions with the same key (process id atrribute), this is not allowed

Created on 10 Oct 2018  ·  8Comments  ·  Source: Activiti/Activiti

Hello, I have a problem, my project is springMVC + Activiti, and when the project startup it report the following error :
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: The deployment contains process definitions with the same key (process id atrribute), this is not allowed at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1517) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:314) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1111) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1006) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533) ... 73 more Caused by: org.activiti.engine.ActivitiException: The deployment contains process definitions with the same key (process id atrribute), this is not allowed at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:159) at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:58) at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:103) at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:37) 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.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) 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.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:78) at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:156) at org.activiti.spring.autodeployment.DefaultAutoDeploymentStrategy.deployResources(DefaultAutoDeploymentStrategy.java:64) at org.activiti.spring.SpringProcessEngineConfiguration.autoDeployResources(SpringProcessEngineConfiguration.java:111) at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:67) at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:60) at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) ... 90 more

Most helpful comment

Thank you for your help, I found someone who is familiar with the project to help, it seems to be a problem with the setup. Thank you 。

All 8 comments

This is expected if two or more process definitions have the same process key (the process id in the BPMN xml file). Make sure that all process definitions BMN xml files have different ids of the process element.

I only have one file ending in .bpmn, but there are two processDefinitions that I found when debugging.

// check if there are process definitions with the same process key to prevent database unique index violation List<String> keyList = new ArrayList<String>(); for (ProcessDefinitionEntity processDefinition : processDefinitions) { if (keyList.contains(processDefinition.getKey())) { throw new ActivitiException("The deployment contains process definitions with the same key (process id atrribute), this is not allowed"); } keyList.add(processDefinition.getKey()); }

@785227331
Could you upload your bpmn here without secret information?

@daisuke-yoshimoto This is my bpmn file content:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1521788230496" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema"> <process id="dubanv2" isClosed="false" isExecutable="true" processType="None"> <startEvent id="_2" name="StartEvent"/> <userTask activiti:assignee="${createuser}" activiti:exclusive="true" id="createDuban" name="督办立项"/> <userTask activiti:candidateUsers="${appealUser}" activiti:exclusive="true" id="userAppeal" name="督办审批"/> <userTask activiti:candidateUsers="${leaderAppeal}" activiti:exclusive="true" id="leaderAppeal" name="督办批准"/> <sequenceFlow id="_14" sourceRef="_2" targetRef="createDuban"/> <sequenceFlow id="_15" sourceRef="createDuban" targetRef="userAppeal"/> <sequenceFlow id="_16" sourceRef="userAppeal" targetRef="leaderAppeal"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${pass}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="_50" sourceRef="userAppeal" targetRef="createDuban"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!pass}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="_6" sourceRef="leaderAppeal" targetRef="createDuban"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!agree}]]></conditionExpression> </sequenceFlow> <subProcess activiti:exclusive="true" id="_3" name="SubProcess" triggeredByEvent="false"> <multiInstanceLoopCharacteristics activiti:collection="${chieves}" activiti:elementVariable="chief" isSequential="false"> <completionCondition><![CDATA[${nrOfCompletedInstances/nrOfInstances==1}]]></completionCondition> </multiInstanceLoopCharacteristics> <subProcess activiti:exclusive="true" id="_7" name="SubProcess" triggeredByEvent="false"> <multiInstanceLoopCharacteristics activiti:collection="${workers}" activiti:elementVariable="worker" isSequential="false"> <completionCondition><![CDATA[${nrOfCompletedInstances/nrOfInstances==1}]]></completionCondition> </multiInstanceLoopCharacteristics> <userTask activiti:assignee="${worker}" activiti:exclusive="true" id="workerReport" name="专员填报"/> <startEvent id="_10" name="StartEvent"/> <userTask activiti:candidateUsers="${appealUser}" activiti:exclusive="true" id="changeApprove" name="提交变更"/> <userTask activiti:candidateUsers="${leaderAppeal}" activiti:exclusive="true" id="changeAgree" name="变更审批"/> <endEvent id="_17" name="EndEvent"/> <sequenceFlow id="_18" sourceRef="_10" targetRef="workerReport"/> <sequenceFlow id="_19" sourceRef="workerReport" targetRef="changeApprove"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${isChange}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="_20" sourceRef="changeApprove" targetRef="changeAgree"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${changeAgree}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="_21" sourceRef="changeAgree" targetRef="workerReport"/> <sequenceFlow id="_22" sourceRef="changeApprove" targetRef="workerReport"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${!changeAgree}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="_27" sourceRef="workerReport" targetRef="_17"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${finishwork}]]></conditionExpression> </sequenceFlow> </subProcess> <parallelGateway gatewayDirection="Unspecified" id="_8" name="ParallelGateway"/> <userTask activiti:candidateUsers="${appealUser}" activiti:exclusive="true" id="chiefFinish" name="提交办结"/> <sequenceFlow id="_25" sourceRef="_8" targetRef="_7"/> <sequenceFlow id="_26" sourceRef="_8" targetRef="chiefFinish"/> <endEvent id="_28" name="EndEvent"/> <userTask activiti:candidateUsers="${leaderAppeal}" activiti:exclusive="true" id="finishAllow" name="办结审批"/> <sequenceFlow id="_30" sourceRef="chiefFinish" targetRef="finishAllow"/> <sequenceFlow id="_31" sourceRef="finishAllow" targetRef="_28"/> <endEvent id="_39" name="EndEvent"/> <startEvent id="_41" name="StartEvent"/> <userTask activiti:assignee="${chief}" activiti:exclusive="true" id="departHandle" name="部门办理"/> <sequenceFlow id="_37" sourceRef="_41" targetRef="departHandle"/> <userTask activiti:assignee="${chief}" activiti:exclusive="true" id="chiefReport" name="周月报填写"/> <sequenceFlow id="_4" sourceRef="departHandle" targetRef="_8"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${fRoad}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="_5" sourceRef="departHandle" targetRef="_39"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${sRoad}]]></conditionExpression> </sequenceFlow> <sequenceFlow id="_9" sourceRef="departHandle" targetRef="chiefReport"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${tRoad}]]></conditionExpression> </sequenceFlow> <endEvent id="_11" name="EndEvent"/> <sequenceFlow id="_12" sourceRef="chiefReport" targetRef="_11"/> </subProcess> <sequenceFlow id="_33" sourceRef="leaderAppeal" targetRef="_3"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${agree}]]></conditionExpression> </sequenceFlow> </process> <bpmndi:BPMNDiagram documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram"> <bpmndi:BPMNPlane bpmnElement="dubanv2"> <bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2"> <omgdc:Bounds height="32.0" width="32.0" x="820.0" y="10.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="createDuban" id="Shape-createDuban"> <omgdc:Bounds height="55.0" width="85.0" x="795.0" y="80.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="userAppeal" id="Shape-userAppeal"> <omgdc:Bounds height="55.0" width="85.0" x="795.0" y="160.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="leaderAppeal" id="Shape-leaderAppeal"> <omgdc:Bounds height="55.0" width="85.0" x="795.0" y="255.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_3" id="Shape-_3" isExpanded="true"> <omgdc:Bounds height="660.0" width="1170.0" x="245.0" y="340.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="660.0" width="1170.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_7" id="Shape-_7" isExpanded="true"> <omgdc:Bounds height="250.0" width="270.0" x="265.0" y="700.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="250.0" width="270.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_8" id="Shape-_8"> <omgdc:Bounds height="32.0" width="32.0" x="600.0" y="645.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="chiefFinish" id="Shape-chiefFinish"> <omgdc:Bounds height="55.0" width="85.0" x="685.0" y="700.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_28" id="Shape-_28"> <omgdc:Bounds height="32.0" width="32.0" x="710.0" y="905.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="finishAllow" id="Shape-finishAllow"> <omgdc:Bounds height="55.0" width="85.0" x="685.0" y="800.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_39" id="Shape-_39"> <omgdc:Bounds height="32.0" width="32.0" x="825.0" y="655.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_41" id="Shape-_41"> <omgdc:Bounds height="32.0" width="32.0" x="820.0" y="350.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="departHandle" id="Shape-departHandle"> <omgdc:Bounds height="55.0" width="85.0" x="795.0" y="425.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="chiefReport" id="Shape-chiefReport"> <omgdc:Bounds height="60.0" width="85.0" x="1015.0" y="645.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="60.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_11" id="Shape-_11"> <omgdc:Bounds height="32.0" width="32.0" x="1045.0" y="905.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="workerReport" id="Shape-workerReport"> <omgdc:Bounds height="55.0" width="85.0" x="280.0" y="780.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_10" id="Shape-_10"> <omgdc:Bounds height="32.0" width="32.0" x="310.0" y="720.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="changeApprove" id="Shape-changeApprove"> <omgdc:Bounds height="55.0" width="85.0" x="435.0" y="780.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="changeAgree" id="Shape-changeAgree"> <omgdc:Bounds height="55.0" width="85.0" x="435.0" y="860.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="_17" id="Shape-_17"> <omgdc:Bounds height="32.0" width="32.0" x="310.0" y="880.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="_12" id="BPMNEdge__12" sourceElement="chiefReport" targetElement="_11"> <omgdi:waypoint x="1061.0" y="705.0"/> <omgdi:waypoint x="1061.0" y="905.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_37" id="BPMNEdge__37" sourceElement="_41" targetElement="departHandle"> <omgdi:waypoint x="836.0" y="382.0"/> <omgdi:waypoint x="836.0" y="425.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_15" id="BPMNEdge__15" sourceElement="createDuban" targetElement="userAppeal"> <omgdi:waypoint x="837.5" y="135.0"/> <omgdi:waypoint x="837.5" y="160.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_14" id="BPMNEdge__14" sourceElement="_2" targetElement="createDuban"> <omgdi:waypoint x="836.0" y="42.0"/> <omgdi:waypoint x="836.0" y="80.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_16" id="BPMNEdge__16" sourceElement="userAppeal" targetElement="leaderAppeal"> <omgdi:waypoint x="837.5" y="215.0"/> <omgdi:waypoint x="837.5" y="255.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_19" id="BPMNEdge__19" sourceElement="workerReport" targetElement="changeApprove"> <omgdi:waypoint x="365.0" y="795.0"/> <omgdi:waypoint x="395.0" y="795.0"/> <omgdi:waypoint x="435.0" y="795.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_18" id="BPMNEdge__18" sourceElement="_10" targetElement="workerReport"> <omgdi:waypoint x="326.0" y="752.0"/> <omgdi:waypoint x="326.0" y="780.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_20" id="BPMNEdge__20" sourceElement="changeApprove" targetElement="changeAgree"> <omgdi:waypoint x="477.5" y="835.0"/> <omgdi:waypoint x="477.5" y="860.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_22" id="BPMNEdge__22" sourceElement="changeApprove" targetElement="workerReport"> <omgdi:waypoint x="435.0" y="820.0"/> <omgdi:waypoint x="400.0" y="820.0"/> <omgdi:waypoint x="365.0" y="820.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_21" id="BPMNEdge__21" sourceElement="changeAgree" targetElement="workerReport"> <omgdi:waypoint x="435.0" y="887.5"/> <omgdi:waypoint x="365.0" y="807.5"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_26" id="BPMNEdge__26" sourceElement="_8" targetElement="chiefFinish"> <omgdi:waypoint x="632.0" y="661.0"/> <omgdi:waypoint x="685.0" y="727.5"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_25" id="BPMNEdge__25" sourceElement="_8" targetElement="_7"> <omgdi:waypoint x="600.0" y="661.0"/> <omgdi:waypoint x="535.0" y="825.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_27" id="BPMNEdge__27" sourceElement="workerReport" targetElement="_17"> <omgdi:waypoint x="326.0" y="835.0"/> <omgdi:waypoint x="326.0" y="880.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_4" id="BPMNEdge__4" sourceElement="departHandle" targetElement="_8"> <omgdi:waypoint x="795.0" y="452.5"/> <omgdi:waypoint x="632.0" y="661.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_5" id="BPMNEdge__5" sourceElement="departHandle" targetElement="_39"> <omgdi:waypoint x="841.0" y="480.0"/> <omgdi:waypoint x="841.0" y="655.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_6" id="BPMNEdge__6" sourceElement="leaderAppeal" targetElement="createDuban"> <omgdi:waypoint x="860.0" y="255.0"/> <omgdi:waypoint x="860.0" y="180.0"/> <omgdi:waypoint x="860.0" y="135.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_9" id="BPMNEdge__9" sourceElement="departHandle" targetElement="chiefReport"> <omgdi:waypoint x="880.0" y="452.5"/> <omgdi:waypoint x="1015.0" y="675.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_50" id="BPMNEdge__50" sourceElement="userAppeal" targetElement="createDuban"> <omgdi:waypoint x="815.0" y="160.0"/> <omgdi:waypoint x="815.0" y="150.0"/> <omgdi:waypoint x="815.0" y="135.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_31" id="BPMNEdge__31" sourceElement="finishAllow" targetElement="_28"> <omgdi:waypoint x="726.0" y="855.0"/> <omgdi:waypoint x="726.0" y="905.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_30" id="BPMNEdge__30" sourceElement="chiefFinish" targetElement="finishAllow"> <omgdi:waypoint x="727.5" y="755.0"/> <omgdi:waypoint x="727.5" y="800.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_33" id="BPMNEdge__33" sourceElement="leaderAppeal" targetElement="_3"> <omgdi:waypoint x="837.5" y="310.0"/> <omgdi:waypoint x="837.5" y="340.0"/> <bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>

@785227331
This bpmn file has no problems that this bpmn has only one process.
Do you have any other bpmn in your project dir?
If only this one, your spring bean setting is rather invalid.

@785227331
Could you tell us the result or cause of your problem?

Thank you for your help, I found someone who is familiar with the project to help, it seems to be a problem with the setup. Thank you 。

EDIT: This doesn't seem to be an issue with Activiti, although the user guide at https://www.activiti.org/userguide/#_automatic_resource_deployment could be improved.

The configuration for org.activiti.spring.SpringProcessEngineConfiguration contains
<property name="deploymentResources" value="classpath*:workflow/**/*.bpmn20.xml"/>.
Due to the * in classpath*: the XML file is deployed twice, for reasons I don't understand. Removing the * fixes the issue for me.

EDIT2: See https://discuss.gradle.org/t/resources-included-as-file-and-jar-in-tests/36881/2 for more about my underyling Gradle issue. I don't need to remove the * if I'm able to fix my classpath setup with Gradle.


I experience the same issue, sadly without a solution so far. There's only one bpmn file which is found twice, causing above error. If I change to isExecutable="false" inside this file (a single file, a single change), I get a different error. Why does Activiti find the file twice?

I'm using Gradle in a project that used Maven before (where everything worked just fine). I now use different source sets for unit tests and integration tests, and activiti fails as part of an integration test.

The marked line in the snippet below does not appear when I run using Maven. With Maven only the "Processing resource" line with the full path (.../target/classes/workflow/translation.bpmn20.xml) appears.

   Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
    INFO: performing create on engine with resource org/activiti/db/create/activiti.h2.create.engine.sql
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
    INFO: performing create on history with resource org/activiti/db/create/activiti.h2.create.history.sql
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
    INFO: performing create on identity with resource org/activiti/db/create/activiti.h2.create.identity.sql
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.ProcessEngineImpl <init>
    INFO: ProcessEngine default created
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
>>> INFO: Processing resource translation.bpmn20.xml
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
    INFO: XMLSchema currently not supported as typeLanguage
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
    INFO: XPath currently not supported as expressionLanguage
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
    INFO: Processing resource /xxx/build/resources/main/workflow/translation.bpmn20.xml
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
    INFO: XMLSchema currently not supported as typeLanguage
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.bpmn.parser.BpmnParse parseDefinitionsAttributes
    INFO: XPath currently not supported as expressionLanguage
    Jul 13, 2020 10:15:03 AM org.activiti.engine.impl.interceptor.CommandContext close
    SEVERE: Error while closing command context
    org.activiti.engine.ActivitiException: The deployment contains process definitions with the same key (process id atrribute), this is not allowed
Was this page helpful?
0 / 5 - 0 ratings

Related issues

zx445146042zx picture zx445146042zx  ·  3Comments

salaboy picture salaboy  ·  4Comments

daisuke-yoshimoto picture daisuke-yoshimoto  ·  8Comments

ryandawsonuk picture ryandawsonuk  ·  6Comments

salaboy picture salaboy  ·  3Comments