Home » Modeling » ATL » Output model creation and extraction problem
Output model creation and extraction problem [message #1787490] |
Sat, 26 May 2018 11:28  |
Eclipse User |
|
|
|
Hello
I have a transformation which has bpmn as in and bpmn as out.
When the in model is injected (inject(targetModel, mainResource);) main resource contents are:
mainResource
contents[0]: [org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerFactory$Bpmn2ModelerDocumentRootImpl@607ae1e5 (mixed: [ecore.xml.type:comment= origin at X=0.0 Y=0.0 , bpmn2:definitions=org.eclipse.bpmn2.impl.DefinitionsImpl@5b189448 (id: Definitions_1, anyAttribute: null) (exporter: org.eclipse.bpmn2.modeler.core, exporterVersion: 1.4.2.Final-v20171109-1930-B1, expressionLanguage: http://www.w3.org/1999/XPath, name: null, targetNamespace: http://org.eclipse.bpmn2/default/process, typeLanguage: http://www.w3.org/2001/XMLSchema)])]
contents[0].eProperties.eContents[0]: org.eclipse.bpmn2.impl.DefinitionsImpl@5b189448 (id: Definitions_1, anyAttribute: null) (exporter: org.eclipse.bpmn2.modeler.core, exporterVersion: 1.4.2.Final-v20171109-1930-B1, expressionLanguage: http://www.w3.org/1999/XPath, name: null, targetNamespace: http://org.eclipse.bpmn2/default/process, typeLanguage: http://www.w3.org/2001/XMLSchema)
After the transformation, in extraction time, the structure I have is different.
This is the model after the recreateResourceIfNeeded methor (in EMFExtractor class) is executed, the resource contents are:
resource
contents[0]: org.eclipse.bpmn2.impl.DefinitionsImpl@1633a050 (id: null, anyAttribute: null) (exporter: org.eclipse.bpmn2.modeler.core, exporterVersion: 1.4.2.Final-v20171109-1930-B1, expressionLanguage: http://www.w3.org/1999/XPath, name: null, targetNamespace: http://org.eclipse.bpmn2/default/process, typeLanguage: http://www.w3.org/2001/XMLSchema)
The DefinitionsImpl should be contained in a Bpmn2ModelerFactory$Bpmn2ModelerDocumentRootImpl but that element is not present in the resource.
As a consecuence of this, there is an Exception in the modeler code when saving:
java.lang.NullPointerException
at org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceImpl$Bpmn2ModelerXMLSave.addNamespaceDeclarations(Bpmn2ModelerResourceImpl.java:1062)
I've been stucked with this problem for months now, I thought I solved it using Bpmn2ResourceFactoryImpl instead of Bpmn2ModelerResourceFactoryImpl, but that was not correct.
I can provide more information if needed.
|
|
| |
Goto Forum:
Current Time: Fri Apr 18 13:38:05 EDT 2025
Powered by FUDForum. Page generated in 0.03120 seconds
|