AnsweredAssumed Answered

Bug: Double default= attribute on userTask tag in Activiti Designer 5.14.0

Question asked by jacek on Feb 26, 2014
Latest reply on Mar 6, 2014 by jacek
Hi, I have an activiti process defined via designer 5.12.0. It saves user task as:

<userTask id="enterUpload" name="Enter upload" default="flowValidateUpload" activiti:candidateGroups="MANAGER">


After editing this process definition in new designer 5.14.0, it is saved as (default is twice):

<userTask id="enterUpload" name="Enter upload" default="flowValidateUpload" activiti:candidateGroups="MANAGER" default="flowValidateUpload">


It throws en exception in runtime:

org.activiti.engine.ActivitiException: Error parsing XML
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:195)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:42)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:33)
   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.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:75)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:139)
   at org.activiti.engine.impl.test.TestHelper.annotationDeploymentSetUp(TestHelper.java:111)
   at org.activiti.engine.test.ActivitiRule.starting(ActivitiRule.java:223)
   at org.activiti.engine.test.ActivitiRule.startingQuietly(ActivitiRule.java:169)
   at org.activiti.engine.test.ActivitiRule.access$000(ActivitiRule.java:85)
   at org.activiti.engine.test.ActivitiRule$1.evaluate(ActivitiRule.java:122)
   at org.junit.rules.RunRules.evaluate(RunRules.java:18)
   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
   at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
   at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
   at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
   at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
   at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
   at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
   at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.RuntimeException: Could not validate XML with BPMN 2.0 XSD
   at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:231)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:181)
   … 38 more
Caused by: org.xml.sax.SAXParseException: Attribute "default" was already specified for element "userTask".
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
   at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
   at javax.xml.validation.Validator.validate(Validator.java:127)
   at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:165)
   at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:220)
   … 39 more


I tried to manually remove first default attribute, but after editing via designer, it returns again.

Is there any workaround for this issue?

Outcomes