Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » UserInteraction in Transformationprocess
UserInteraction in Transformationprocess [message #58717] Mon, 20 August 2007 09:28 Go to next message
Eclipse UserFriend
Originally posted by: martin.baus.web.de

Hello,

I'm planning to use ATL for a Userguided Transformation from an SQL2003
Model into an ORACLESQL Model.

The problem is, that the user should interact in the transformation
process to decide which transformation should be taken.
For example whether a "SQL2003-Type" should be transformed into a
"OrclType A" or "OrclType B".

Is it possible to do anything like this:

rule SQL2003Type2OracleTypeAB {
from s : SQL2003!SQLType
to if (UserDecision(SQLType) == A) then t : OracleSQL!OrclTypeA
elseif (UserDecision(SQLType) == B) then t : OracleSQL!OrclTypeB
)

In this example UserDecision should be a procedure opening the Wizard for
User Interaction.
It would be nice if anybody can help me. If there is another entry point
to call Wizards I would also appreciate it to know.

Thanks for your help.

Martin
Re: [ATL] UserInteraction in Transformationprocess [message #59051 is a reply to message #58717] Tue, 21 August 2007 22:04 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

Could you please prefix the subject of your ATL-related posts with [ATL]
as I did in this answer (see http://wiki.eclipse.org/M2M)?

I would use AMW to capture user decisions, then write a transformation
with a header similar to:

create OUT : ORACLESQL from IN : SQL2003, UserDecisions : AMW


Regards,

Frédéric Jouault

Martin Baus wrote:
> Hello,
>
> I'm planning to use ATL for a Userguided Transformation from an SQL2003
> Model into an ORACLESQL Model.
>
> The problem is, that the user should interact in the transformation
> process to decide which transformation should be taken. For example
> whether a "SQL2003-Type" should be transformed into a "OrclType A" or
> "OrclType B".
>
> Is it possible to do anything like this:
>
> rule SQL2003Type2OracleTypeAB {
> from s : SQL2003!SQLType to if (UserDecision(SQLType) == A) then t :
> OracleSQL!OrclTypeA
> elseif (UserDecision(SQLType) == B) then t : OracleSQL!OrclTypeB
> )
>
> In this example UserDecision should be a procedure opening the Wizard
> for User Interaction.
> It would be nice if anybody can help me. If there is another entry point
> to call Wizards I would also appreciate it to know.
>
> Thanks for your help.
>
> Martin
>
>
Re: [ATL] UserInteraction in Transformationprocess [message #59284 is a reply to message #59051] Fri, 24 August 2007 10:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: martin.baus.web.de

First of all, thanks for your help.

I read something about AMW, but I don't think that I would get it right
with that.

The problem of capturing an AMW Model with the UserDecisions would be,
that for the same Input SQL2003Type the user could decide once to use
ORCLTypeA and for the second ocurrence of the SQL2003Type to use
ORCLTypeB. But with AMW the user could only match one ORCLType for the
whole woven transformation.

Are there any other possibilities to capture the UserDecisions?

Otherwise I think I have to move the whole transformation process to the
Java layer.

Thanks so far.

Martin Baus
Re: [ATL] UserInteraction in Transformationprocess [message #59388 is a reply to message #59284] Fri, 24 August 2007 15:15 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

> First of all, thanks for your help.

You are welcome.


> I read something about AMW, but I don't think that I would get it right
> with that.
>
> The problem of capturing an AMW Model with the UserDecisions would be,
> that for the same Input SQL2003Type the user could decide once to use
> ORCLTypeA and for the second ocurrence of the SQL2003Type to use
> ORCLTypeB. But with AMW the user could only match one ORCLType for the
> whole woven transformation.

If you weave your decisions on the metamodel, you would indeed have the
problem that you mentioned: the decisions would apply in the same way to
all the occurences of a given type.

However, if you weave your decisions to the source model (instead of
metamodel), then you should be able to achieve one decision per occurence.

I am CCing the AMW newsgroup because this discussion is now about AMW ;-).


> Are there any other possibilities to capture the UserDecisions?
> Otherwise I think I have to move the whole transformation process to the
> Java layer.

There are other possibilities like specifying your own operations in
Java, and call them from the ATL transformation. In such a situation,
you do not need to write the whole transformation in Java, only the user
decision part.

However, I do not consider such a scheme as a clean model engineering
solution. My advice is still to explore the possibilities offered by
AMW. I am indeed confident you can achieve what you want with it.


Regards,

Frédéric Jouault
Re: [ATL] UserInteraction in Transformationprocess [message #59536 is a reply to message #59388] Mon, 27 August 2007 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: martin.baus.web.de

Hi,

maybe because I am new to 'Model Driven Development' I have problems
understanding your answer:

> However, if you weave your decisions to the source model (instead of
> metamodel), then you should be able to achieve one decision per occurence.

What do you mean with weaving the UserDecisions to the source model and
not the metamodel?

From my point of understanding I have the following situation:

1 Input-Metamodel describing the SQL2003 Standard
1 Input-Model (an Instance of the SQL2003Metamodel)

1 Weaving Model for mapping Input to Output

1 Output-Metamodel describing OracleSQL
1 Output-Model (the result of the transformation of the Input-Model)

If I would weave the UserDecisions to the source model (=Input-Model?)
now, then I think it wouldn't validate to the Input-Meta-Model, which
should be a clean Metamodel for the SQL2003 Standard.

Thanks for your answer.

Martin Baus
Re: [ATL] UserInteraction in Transformationprocess [message #59607 is a reply to message #59536] Mon, 27 August 2007 12:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marcos.didonet-del-fabro.univ-nantes.fr

Hi,

I was following your interesting discussion, and I have some comments about it..

First, I don't understand what you mean by "it wouldn't validate the input metamodel". Can
you explain that?

You would have a weaving model between the input-model and the output-metamodel. The
weaving model would be created before the execution of the transformation. I will explain
my point of view with a simple illustration.

The SQL2003 input-model could be woven with the OracleSQL output-metamodel. For instance,
you would create a link between one particular "SQLType", "A", with an "OrclTypeB" in the
output metamodel. This link can be created manually, reflecting the user decision with the
correct output type:

A <-UserDecisionLink-> OrclTypeB
B <-UserDecisionLink-> OrclTypeA

etc.

Then, the transformation could be something like:

rule SQL2003Type2OracleTypeB {
from
w : AMW!UserDecisionLink
(w.output.getReferredElement() = OrclTypeB)
to
out : OracleSQL!OrclTypeB
}

rule SQL2003Type2OracleTypeA {
from
w : AMW!UserDecisionLink
(w.output.getReferredElement() = OrclTypeA)
to
out : OracleSQL!OrclTypeA
}

You can also write a different rule, matching directly the SQLType, but with some helper
to get the corresponding user decision link.

rule SQL2003Type2OracleTypeA {
from
s : SQL2003!SQLType ( s.getDecisionLink() = OrclTypeA)
to
out : OracleSQL!OrclTypeA
}


Regards,

Marcos.

Martin Baus wrote:
> Hi,
>
> maybe because I am new to 'Model Driven Development' I have problems
> understanding your answer:
>> However, if you weave your decisions to the source model (instead of
>> metamodel), then you should be able to achieve one decision per
>> occurence.
>
> What do you mean with weaving the UserDecisions to the source model and
> not the metamodel?
>
> From my point of understanding I have the following situation:
>
> 1 Input-Metamodel describing the SQL2003 Standard
> 1 Input-Model (an Instance of the SQL2003Metamodel)
>
> 1 Weaving Model for mapping Input to Output
>
> 1 Output-Metamodel describing OracleSQL
> 1 Output-Model (the result of the transformation of the Input-Model)
>
> If I would weave the UserDecisions to the source model (=Input-Model?)
> now, then I think it wouldn't validate to the Input-Meta-Model, which
> should be a clean Metamodel for the SQL2003 Standard.
>
> Thanks for your answer.
>
> Martin Baus
>
Re: [ATL] UserInteraction in Transformationprocess [message #59850 is a reply to message #59607] Wed, 29 August 2007 12:07 Go to previous message
Eclipse UserFriend
Originally posted by: martin.baus.web.de

Thanks Marcos for your help.

I think I understood now that I can weave an instance (a particular
SQL2003-Model) of my SQL2003 Metamodel with
the OracleMetamodel to get the UserDecisions.

What I meant by "it wouldn't validate the input metamodel" was part of my
understanding, so nevermind.

Well, I will try now to get your ideas to work, since it seems to me a
clean solution of my task, but at this time
I am stuck on getting AMW to work at all, which I put in another thread at

http://www.eclipse.org/newsportal/article.php?id=243&gro up=eclipse.modeling.gmt.amw#243

So maybe I come back to this one later on.

Regards,

Martin Baus.
Previous Topic:[QVT] Generic typed function
Next Topic:[ATL] .asm not generated after install of ATL 2.0RC2
Goto Forum:
  


Current Time: Fri Apr 26 14:54:55 GMT 2024

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

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

Back to the top