Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [xtend] RSM/RSA Adapter replacement
[xtend] RSM/RSA Adapter replacement [message #510677] Thu, 28 January 2010 10:29 Go to next message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
Hello

The question how to process Rational Software Modeler (RSM) files with Galileo and TMF 0.7.2 has been asked before. But not satisfactory I think.
We're using RSM 7.5.3.

- One solution is to export models to Eclipse UML2 format.
- Then rename the uml namespace reference from 2.1.0 to 3.0.0.
- And remove any duplicate annotation entries in the profiles.

What would be the best strategy to automate this process?
I believe the original RSM Adapter from openarchitectureware 4.3.1 has not been migrated to Eclipse 3.5. Would it be worthwhile investing effort in migrating the adapter?

I have also tried to directly process emx and epx files with the MWE reader. However it complains that all the ibm specific namespaces cannot be resolved.

What are your thoughts on this?

Thanks for any input
Richard
Re: [xtend] RSM/RSA Adapter replacement [message #511224 is a reply to message #510677] Sun, 31 January 2010 13:57 Go to previous messageGo to next message
Erhard Weinell is currently offline Erhard WeinellFriend
Messages: 39
Registered: January 2010
Location: Kassel, Germany
Member
Hello Richard,

Richard Wood wrote:

> Would it be worthwhile investing effort in migrating the adapter?

according to my experiences, porting code from oAW to Eclipse M2T is not
much of a problem. Besides small changes to the workflow engine, the effort
more or less boils down to updating imports.

As you noticed, the UML metamodel implementation was updated to version 3.0
in Galileo. However, according to the migration guide [1], opening older
models should be possible with little restrictions. Have you experienced
problems with the MWE here?

> I have also tried to directly process emx and epx files with the MWE
> reader. However it complains that all the ibm specific namespaces cannot
> be resolved.

Unless you can make these informations available to your target environment,
I do not see many options here. We recently had the question whether M2T
Xpand could be back-ported to Eclipse 3.4 which at least is not simple to
achieve.

Best regards,
Erhard Weinell

http://www.eclipse.org/modeling/mdt/uml2/docs/guides/UML2_3. 0_Migration_Guide/guide.html
Re: [xtend] RSM/RSA Adapter replacement [message #511787 is a reply to message #511224] Tue, 02 February 2010 20:35 Go to previous messageGo to next message
Dieter Moroff is currently offline Dieter MoroffFriend
Messages: 5
Registered: July 2009
Junior Member
there is a port of the RSM/RSA adapter workung with MWE/M2T XPand 0.7.2. You can use the update site at the new project location http://rsx4oaw.googlecode.com/svn/update-site/.

It is not release officially. Please give me some feedback if you can work with it. Maven artifacts will follow soon.

Kind regards
Dieter
Re: [xtend] RSM/RSA Adapter replacement [message #511953 is a reply to message #510677] Wed, 03 February 2010 14:18 Go to previous messageGo to next message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
Thanks for your feedback Erhard

Galileo can read older versions of UML models without problems. MWE however cannot. You get these kind of errors.
2654 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component  of type org.eclipse.xtend.XtendComponent: 
	EvaluationException : Couldn't find extension 'transform(null::Model)'!
	nofile[0,19] on line 1 'transform(umlModel)'


This has also been mentioned in other posts. Perhaps the newer version of MWE resolves that issue. Is this a bug?

Yes resolving the ibm namespaces and providing the corresponding jars/plugins is probably a prerequisite for a RSM adapter.

Regards
Richard

[Updated on: Wed, 03 February 2010 14:27]

Report message to a moderator

Re: [xtend] RSM/RSA Adapter replacement [message #511957 is a reply to message #510677] Wed, 03 February 2010 14:27 Go to previous messageGo to next message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
Thanks a lot for your effort in migrating the RSM adapter Dieter. Much appreciated.
Seems to work just like in oaw4.

Two issues though
Some warnings. How can these be resolved?
1142 WARN  RSASetup           - GMF runtime notation not initialized, missing in classpath
1142 WARN  RSASetup           - IBM uml notation not initialized, missing in classpath


And a cast exception. I'm mapping Uml to a XML format.
Worked fine when using Eclipse UML2 as input.
3739 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component  of type org.eclipse.xtend.XtendComponent: 
	EvaluationException : org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl cannot be cast to org.eclipse.uml2.uml.Type

This happens when accessing uml::Property.type

Would be great if you can give some input on these issues.
Thanks
Richard

[Updated on: Wed, 03 February 2010 14:31]

Report message to a moderator

Re: [xtend] RSM/RSA Adapter replacement [message #512080 is a reply to message #511957] Wed, 03 February 2010 20:28 Go to previous messageGo to next message
Dieter Moroff is currently offline Dieter MoroffFriend
Messages: 5
Registered: July 2009
Junior Member
If you add a dependency to the plugins org.eclipse.gmf.runtime.notation and
com.ibm.xtools.umlnotation, you wouldn't get the messages any more, these dependencies are declared optional.

Usually in an RSx environment these plugins are available. With these plugins in the dependency list no access to the internet reading the emx models will occur.

Kind regards
Dieter
Re: [xtend] RSM/RSA Adapter replacement [message #512081 is a reply to message #511957] Wed, 03 February 2010 20:31 Go to previous messageGo to next message
Dieter Moroff is currently offline Dieter MoroffFriend
Messages: 5
Registered: July 2009
Junior Member
The second problem looks like having no UML2 metamodel while processing the emx models. Is this problem new with XPand 0.7?
Re: [xtend] RSM/RSA Adapter replacement [message #512231 is a reply to message #512081] Thu, 04 February 2010 13:18 Go to previous messageGo to next message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
Thanks for helping Dieter
I need to find those two plugins as they are not delivered with the Galileo distribution of itemis.

As to the cast exception. Yes I'm using Xpand 0.7.2.
And the Xtend transformation worked with Eclipse UML2 models and profiles exported via RSM.

I have set up following metamodel contributors in this sequence XSD Metamodels, RSA/RSM profiles, UML2 profiles, EMF Metamodels

Here is the MWE config I'm using.
	<component 
	  class="org.openarchitectureware.adapter.rsdp.workflow.RSASetup" > 
	  <umlExtensionProject class="org.openarchitectureware.adapter.rsdp.workflow.UmlExtensionProject"> 
	    <projectName value="${sdmProjectName}"/> 
	    <path value="${sdmProjectPath}"/> 
	  </umlExtensionProject>
	  <umlExtensionProject class="org.openarchitectureware.adapter.rsdp.workflow.UmlExtensionProject"> 
	    <projectName value="${serviceProjectName}"/> 
	    <path value="${serviceProjectPath}"/> 
	  </umlExtensionProject>
	  <init value="true"/> 
	</component> 

	<bean id="sdmProfile" 
		class="org.eclipse.xtend.typesystem.uml2.profile.ProfileMetaModel">
		<profile value="${sdmProfilePath}"/>
	</bean>

	<bean id="mmXSD" 
		class="org.eclipse.xtend.typesystem.xsd.XSDMetaModel">
		<schemaFile value="dataservicemodel.xsd" />
	</bean>

	<component class="org.eclipse.emf.mwe.utils.Reader">
		<uri value="file://${serviceModelPath}"/> 
		<modelSlot value="umlModel"/>
	</component>

	<component class="org.eclipse.xtend.XtendComponent">
		<metaModel idRef="sdmProfile"/>
		<metaModel idRef="mmXSD"/>
		<invoke value="transformations::uml::umlTransform::transform(umlModel)" />
		<outputSlot value="xmlModel" />
	</component>


Besides the metamodel contributors the sequence of the metamodels defined in the XtendComponent might also be relevant.

Let me know if you see some obvious problem.

Thanks
Richard

[Updated on: Thu, 04 February 2010 13:41]

Report message to a moderator

Re: [xtend] RSM/RSA Adapter replacement [message #512314 is a reply to message #512081] Thu, 04 February 2010 16:26 Go to previous messageGo to next message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
Hello Dieter

I forgot to explain the emx setup I'm using. There are two emx files. The service model referencing the sdm model.
They are stored in separate projects in RSM. In addition the sdm model applies a sdm profile which resides in the same project.

Replacing the umlExtensionProject declarations with a similar setup to the one you applied in your example results in failure to resolve the referenced types from the other model.

Regards
Richard
Re: [xtend] RSM/RSA Adapter replacement [message #512332 is a reply to message #512231] Thu, 04 February 2010 17:10 Go to previous messageGo to next message
Dieter Moroff is currently offline Dieter MoroffFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Richard,

in my workflow I use the UML2 metomodel in addition to UML2 profile metamodels. Here is part of a workflow, I'm using. Maybe this helps you.

Best regards,
Dieter

    <!-- Transform Persistence-PIM to UMLMDA-Standard-PIM -->
    <component id="domainPimCreator" class="oaw.xtend.XtendComponent">
        <!-- Metamodelle -->
        <metaModel id="mm.UML2" class="oaw.uml2.UML2MetaModel"/>
        <metaModel id="UMLMDACommonProfile" class="oaw.uml2.profile.ProfileMetaModel">
            <profile value="file://${basedir}/profiles/rsm/3rd/umlmda/profiles/UMLMDACommonProfile.epx"/>
        </metaModel>     
        <metaModel id="UMLMDAPersistenceProfile" class="oaw.uml2.profile.ProfileMetaModel">
            <profile value="file://${basedir}/profiles/rsm/3rd/umlmda/profiles/UMLMDAPersistenceProfile.epx"/>
        </metaModel>     
        
        <invoke value="org::umlmda::uml::persistence::Persistence2Java::m2m(persistence_model_pim)"/>
        <globalVarDef name="generationProfile" value="umlmda_profile"/>
        <globalVarDef name="objectStereotype" value="'BusinessObject'"/>
        <globalVarDef name="packageStereotype" value="'BusinessComponent'"/>
        <outputSlot value="umlmda_model_pim"/>
    </component>


Re: [xtend] RSM/RSA Adapter replacement [message #512535 is a reply to message #512332] Fri, 05 February 2010 11:59 Go to previous messageGo to next message
Richard Wood is currently offline Richard WoodFriend
Messages: 29
Registered: January 2010
Junior Member
Thanks for the config snippet Dieter. I tried to include the UML metamodel before without any effect. It should not be necessary to add it as the UML profile already references the UML metamodel.

Actually the problem is similar to the one when reading exported Eclipse UML2 models. The UML version 2.X.X is not recognized by MWE.

There is a simple fix besides changing the namespace references in the models which was mentioned in another thread.

Can you add the following code to your class RSASetup?

public void setInit(boolean b) {
    ...
    org.eclipse.emf.ecore.EPackage.Registry.INSTANCE.put(UML212UMLResource.UML_METAMODEL_NS_URI, UMLPackage.eINSTANCE);
    ...
}


Regards
Richard
Re: [xtend] RSM/RSA Adapter replacement [message #513682 is a reply to message #512535] Wed, 10 February 2010 19:38 Go to previous messageGo to next message
Dieter Moroff is currently offline Dieter MoroffFriend
Messages: 5
Registered: July 2009
Junior Member
Actually this is not an issue for the RSx adapter, rather it should be solved in the UML2 adapter of M2T XPand. Please open a bug for this. Maybe all current available UML2 implementations should be supported.
Re: [xtend] RSM/RSA Adapter replacement [message #540196 is a reply to message #511953] Tue, 15 June 2010 11:03 Go to previous messageGo to next message
Macca1892 is currently offline Macca1892Friend
Messages: 14
Registered: May 2010
Junior Member
Richard Wood wrote on Wed, 03 February 2010 15:18
Thanks for your feedback Erhard

Galileo can read older versions of UML models without problems. MWE however cannot. You get these kind of errors.
2654 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component  of type org.eclipse.xtend.XtendComponent: 
	EvaluationException : Couldn't find extension 'transform(null::Model)'!
	nofile[0,19] on line 1 'transform(umlModel)'


This has also been mentioned in other posts. Perhaps the newer version of MWE resolves that issue. Is this a bug?



Anyone has a solution for this error?
Re: [xtend] RSM/RSA Adapter replacement [message #540433 is a reply to message #540196] Wed, 16 June 2010 07:23 Go to previous message
Macca1892 is currently offline Macca1892Friend
Messages: 14
Registered: May 2010
Junior Member
hope that this error will be fixed in the next version
Previous Topic:[Announce] Share the Worldcup 2010 experience with the Eclipse Modeling Community !
Next Topic:[Acceleo] Syntax problems
Goto Forum:
  


Current Time: Thu Apr 18 01:28:46 GMT 2024

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

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

Back to the top