Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Problem when saving a model
Problem when saving a model [message #1787492] Sat, 26 May 2018 15:49 Go to next message
Gonzalo López is currently offline Gonzalo LópezFriend
Messages: 14
Registered: February 2018
Junior Member

I write here because I'm not sure where the problem is.

I have a problem when saving a bpmn model after an ATL transformation.

Here is the link to the question I asked on the other forum:

As I mentioned there, I also tried using Bpmn2ResourceFactoryImpl, but in that case I had problems when working with some elements (example of problem below)

<bpmn2:itemDefinition id="ItemDefinition_1" isCollection="false" structureRef="xs:string"/>

The itemDefinition has a structureRef whose value is "xs:string", there were problems with the namespace reference.

Re: Problem when saving a model [message #1787496 is a reply to message #1787492] Sun, 27 May 2018 07:21 Go to previous messageGo to next message
Ralph Soika is currently offline Ralph SoikaFriend
Messages: 193
Registered: July 2009
Senior Member
can you try to report a Bug in Bugzilla.
I am really not sure if this is a BPMN problem. It sounds more that it is a problem with the ALT transformation. So I suggest to report the problem here:

Can you post a stacktrace. This would help to see where the problem comes from.

Re: Problem when saving a model [message #1787603 is a reply to message #1787496] Tue, 29 May 2018 22:04 Go to previous message
Gonzalo López is currently offline Gonzalo LópezFriend
Messages: 14
Registered: February 2018
Junior Member
Hi, thanks for your answer. I'll report it.

Here is the log:

at org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl$Bpmn2ModelerXMLSave.addNamespaceDeclarations(
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(
at org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl$Bpmn2ModelerXMLSave.traverse(
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(
at org.eclipse.m2m.atl.core.emf.EMFExtractor.extract(
at org.eclipse.m2m.atl.core.service.LauncherService.launch(
at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDelegate.launchOrDebug(
at org.eclipse.m2m.atl.core.ui.launch.AtlLaunchConfigurationDelegate.launch(
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(
at org.eclipse.debug.internal.ui.DebugUIPlugin$

For what I saw when debugging, the addNamespaceDeclarations method calls the ModelUtil.getDefinitions method. The getDefinitions method goes through this code:
if (object instanceof Resource) {
			Resource resource = (Resource) object;
			if (resource!=null && !resource.getContents().isEmpty() && !resource.getContents().get(0).eContents().isEmpty()) {
				// The assumption was that Definitions would always be the first entry in Resource.contents...not necessarily!
				for (EObject c : resource.getContents()) {
					for (Object o : c.eContents()) {
						if (o instanceof Definitions)
							return (Definitions) o;

And in the end it returns null because the condition in the third line of code is not met (I guess its because of what I posted in the ATL forum).

I have another question related to what I'm trying to solve, maybe you can help me.

Are there many differences between a bpmn2 model (created as a BPMN2 MODEL) and a bpmn model (created as a Generic BPMN 2.0 Diagram)?

With this problems I have, I started testing and I learned that:
- if I use a bpmn2 model the resource factory is org.eclipse.bpmn2.util.Bpmn2ResourceFactoryImpl
- if I use a bpmn model the resource factory is org.eclipse.bpmn2.modeler.examples.customtask.MyModel.util.MyModelResourceFactoryImpl

I also saw that the bpmn model has this namespace xmlns:ext="http://org.eclipse.bpmn2/ext" and ext:style elements.

As I said in my first post, I have problems with both resource factories, if the model has no more differences than the ext element I guess that making any of them work will be enough.

Thank you
Previous Topic:problem with displaying large diagram
Next Topic:Other problems when saving BPMN models
Goto Forum:

Current Time: Thu Jul 25 06:28:38 GMT 2024

Powered by FUDForum. Page generated in 0.04063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top