Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Is there a way to stop a running ATL transformation {and, or} return something to the launcher?
Is there a way to stop a running ATL transformation {and, or} return something to the launcher? [message #1220794] Fri, 13 December 2013 15:43 Go to next message
Daniele G is currently offline Daniele GFriend
Messages: 6
Registered: October 2013
Junior Member
Is there a way to stop a running ATL transformation {and, or} return something to the launcher?


Consider the following scenario: I am running an ATL transformation within a java code, and my ATL transformation has a rule like this:
rule haltingRule {
    from
        s: MMA!TypeA (s.name.startsWith('A'))
    to
        tempd: MMB!TypeB
    do {
        -- code to stop and return a value to the caller?
    }
}
Is it somehow possible?
Re: Is there a way to stop a running ATL transformation {and, or} return something to the launcher? [message #1220795 is a reply to message #1220794] Fri, 13 December 2013 15:47 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 612
Registered: July 2009
Senior Member
Hello,

No, transformations are elementary units to be fully run.
The usual practice is to split your transformation into a chain of (smaller) transformations and to ask for user feedback if needed between them.
Such user feedback can be provided to the next transformation (as one of its inputs) via a simple model (considering a generic metamodel like XML for instance).


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Is there a way to stop a running ATL transformation {and, or} return something to the launcher? [message #1220991 is a reply to message #1220795] Mon, 16 December 2013 14:39 Go to previous message
Daniele G is currently offline Daniele GFriend
Messages: 6
Registered: October 2013
Junior Member
Great hint, thank you!

Basically i'm working on a simple "merge-transformation" where, given two models (IM1,IM2) conforming to the same metamodel MM, i want to produce an output model OM such that if i have two instances (of the same class) with the same name, I ask the user if he wants to merge them or not.

So the idea is to fill an XML "parameters" file with these duplicates; then iterate through each one of them asking the user if he wants to merge them, mark them in the XML itself and run the merge-transformation again.

Too much complicated? Any hints about the approach?

Previous Topic:Running an ATL Transformation from Java
Next Topic:Issue when helper does not match equivalent elements
Goto Forum:
  


Current Time: Thu Nov 27 06:59:20 GMT 2014

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

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