cancel
Showing results for 
Search instead for 
Did you mean: 

Error when loading bmpn20.xml with eventGateway

pitagoras
Champ in-the-making
Champ in-the-making
Hi
I'm using Activiti 5.9 with designer 5.9.1 on eclipse indigo.
I find 2 problems.
1) First, the designer wants to work with .bpmn files, while deployment (in a test case for example) wants .bpmn20.xml to parse correctly. Of course the workaround is to rename the file.
2) I have a file that I renamed which wont load because this strange error:

org.activiti.engine.ActivitiException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'eventGateway'. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL':flowElement, "http://www.omg.org/spec/BPMN/20100524/MODEL':artifact, "http://www.omg.org/spec/BPMN/20100524/MODEL':resourceRole, "http://www.omg.org/spec/BPMN/20100524/MODEL':correlationSubscription, "http://www.omg.org/spec/BPMN/20100524/MODEL':supports}' is expected. | ventas/offline/assign/ventaoffline.bpmn20.xml | line 56 | column 33
cvc-id.1: There is no ID/IDREF binding for IDREF 'gateway1'. | ventas/offline/assign/ventaoffline.bpmn20.xml | line 159 | column 15
Invalid source 'gateway1' of sequence flow 'flow17' | ventas/offline/assign/ventaoffline.bpmn20.xml | line 74 | column 102
Invalid destination 'gateway1' of sequence flow 'flow21' | ventas/offline/assign/ventaoffline.bpmn20.xml | line 78 | column 82
Invalid source 'gateway1' of sequence flow 'flow22' | ventas/offline/assign/ventaoffline.bpmn20.xml | line 79 | column 101

   at org.activiti.engine.impl.util.xml.Parse.throwActivitiExceptionForErrors(Parse.java:186)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:222)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
   at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:38)
   at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:42)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:58)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:30)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:46)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:106)
   at org.activiti.engine.impl.test.TestHelper.annotationDeploymentSetUp(TestHelper.java:96)
   at org.activiti.engine.test.ActivitiRule.starting(ActivitiRule.java:100)
   at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:51)
……

and the file is marked with an error on the workspace:


PackageNotFoundException: Package with uri 'http://www.omg.org/spec/BPMN/20100524/MODEL' not found. (platform:/resource/ventas-offline/src/test/java/
ventas/offline/assign/VentasOfflineTest.testAssignment.bpmn20.xml, 2, 469)

where the filename shown is the old file name…
looks like some catching on eclipse? anyone can help with this?
Thanks!
3 REPLIES 3

sangv
Champ in-the-making
Champ in-the-making
For the first part of your question, you don't need to rename the file. You can just name the resource when you add the input stream to one that contains the bpmn20.xml extension (see below - I noticed thats what the 5.9.1 designer does when you "Generate Unit Test" from the bpmn file)

private String filename = "C:\…\process1.bpmn";
repositoryService.createDeployment().addInputStream("process1.bpmn20.xml",
    new FileInputStream(filename)).deploy();

However, I find it surprising that the designer change made it to a released version before the engine changes did Smiley Wink

Thanks,
Sang

jakub_piecuch
Champ in-the-making
Champ in-the-making
pitagoras, in Activiti Designer 5.9.1 is error with name of gateway which you want to use. You need manually in your bpmn20.xml change eventGateway to eventBasedGateway like that <eventBasedGateway></eventBasedGateway>

pitagoras
Champ in-the-making
Champ in-the-making
pitagoras, in Activiti Designer 5.9.1 is error with name of gateway which you want to use. You need manually in your bpmn20.xml change eventGateway to eventBasedGateway like that <eventBasedGateway></eventBasedGateway>

Yes thanks, I found it out and posted in the designer forum, they say next week it will be patched to update the plugin.