Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » How to run chain transformations using ANT?
icon6.gif  How to run chain transformations using ANT? [message #1057844] Thu, 09 May 2013 09:37 Go to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hi everybody,
I made a "transformation chain" with three different transformations and I would like to make them run with a simple click instead of having to click on each one of them and run them.


EDIT:
I tested ant, but I followed this guide (http://wiki.eclipse.org/ATL/User_Guide_-_The_ATL_Tools#ATL_ant_tasks ), the first transformation works, it's a normal transformation using superimposition and it works just fine.
The problem is with the second transformation, it uses REFINING mode, and it just gives an empty file, so what could I do? is it not supported?
Because on the user guide it just says to write "refining = "true" and then it should work.

This is the code from my refining transformation that doesn't work:
<atl.launch path="Superimposition/SecondStepRefiningRCP2GWT.asm" refining="true">
			<option name="supportUML2Stereotypes" value="true"/>
			<inmodel name="IN" model="myModel-B" />
			<outmodel name="OUT" model="myModel-C" metamodel="UML2" />
		</atl.launch >



Thanks in advance,
regards,
Javier

[Updated on: Fri, 10 May 2013 09:10]

Report message to a moderator

Re: What's the best way to run several different tranformations? [message #1057907 is a reply to message #1057844] Thu, 09 May 2013 17:18 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

I recommend MWE2. The project provides WorflowComponents for many common
activities. You can find more by runnaging around modeling projects;
particularly GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.build.

Regards

Ed Willink

On 09/05/2013 10:37, Javier García wrote:
> Hi everybody,
> I made a "transformation chain" with three different transformations
> and I would like to make them run with a simple click instead of
> having to click on each one of them and run them.
>
> I've seen some people using ant, which I know nothing about, but I've
> also read it might be possible to do it with simple Java code.
>
> I tried using an ATL plugin, but apparently that works only for one
> transformation and it shows me an exception anyways.
>
> So then, what's the best way to do this? it'd be great if there was
> some kind of "tutorial".
>
> Thanks in advance,
> regards,
> Javier
Re: What's the best way to run several different tranformations? [message #1057972 is a reply to message #1057907] Fri, 10 May 2013 09:12 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Quote:
Ed Willink
Hi

I recommend MWE2. The project provides WorflowComponents for many common
activities. You can find more by runnaging around modeling projects;
particularly GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.build.

Regards

Ed Willink

Hey thanks, I finally went with ANT, but if I don't get to make it work properly I'll definitely give what you said a try! thanks Wink
Re: How to run chain transformations using ANT? [message #1058285 is a reply to message #1057844] Mon, 13 May 2013 13:06 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Hello Javier,

When setting the input/output model of a refining transformation, you have to use the inoutmodel parameter (instead of specifying inmodel + outmodel) as the ATL refining mode is "in-place" and so actually works on a single (both input and output) model.
This could be the source of your current problem.

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: How to run chain transformations using ANT? [message #1058453 is a reply to message #1058285] Tue, 14 May 2013 07:53 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hey Hugo,
yes of course you're right, I realized this error before but forgot to comment it here, now it looks like this:
<atl.launch path="Superimposition/SecondStepRefiningRCP2GWT.asm" refining="true">
					<inoutmodel name="IN" model="myModel-B" />
				</atl.launch >
<atl.saveModel model="myModel-B" path="Models/ChainTransformedModel.uml"/>

And yes, the transformation works ok, the problem comes when I try to save it, it shows the error I commented on this other thread: http://www.eclipse.org/forums/index.php/m/1058452/#msg_1058452

I realized that since it doesn't fail while doing the transformation, but while saving it, maybe I could do one last transformation that copies just all th elements and the save it, this does actually work, though I have to use a really heavy transformation and it's not at all ideal, but at least it works. The thing is though, it copies some elements that shouldn't be there, I don't know why, but they shouldn't show up, so if there was a way to fix the problem I'm having with the refining mode it would just be perfect.

By the way, I read there might be a way to ignore these errors and make Ant work, do you know how? it still wouldn't be ideal, but at least could be a solution.

Once again, thanks a lot for your help!
regards,
Javier

[Updated on: Tue, 14 May 2013 07:58]

Report message to a moderator

Re: How to run chain transformations using ANT? [message #1058627 is a reply to message #1058453] Tue, 14 May 2013 15:03 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Hello,

I don't think the error is actually coming from Ant but rather from the fact that EMF is not able to save/serialize properly the model due to this not-contained element.
Please, could you raise a bug onto the Eclipse Bugzilla to describe this "bug" happening with the Drop feature in the Refining Mode?

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: How to run chain transformations using ANT? [message #1059018 is a reply to message #1058627] Thu, 16 May 2013 08:54 Go to previous messageGo to next message
Javier García is currently offline Javier GarcíaFriend
Messages: 129
Registered: April 2013
Senior Member
Hi Hugo, thanks for your help, I just raised a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=408214
Hopefully we can find a solution there.
Re: How to run chain transformations using ANT? [message #1059090 is a reply to message #1059018] Thu, 16 May 2013 15:28 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 616
Registered: July 2009
Senior Member
Thank you very much for opening this tracking bug.

------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Previous Topic:Resolved: Uml2Uml: dynamic packagedElement Creation
Next Topic:How to use custom resource factory in the ATL Debug Launch Configuration
Goto Forum:
  


Current Time: Sun Dec 21 23:26:03 GMT 2014

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

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