UserInteraction in Transformationprocess [message #58717] |
Mon, 20 August 2007 05:28  |
Eclipse User |
|
|
|
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 #59388 is a reply to message #59284] |
Fri, 24 August 2007 11:15   |
Eclipse User |
|
|
|
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 #59607 is a reply to message #59536] |
Mon, 27 August 2007 08:10   |
Eclipse User |
|
|
|
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
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.05454 seconds