|
Re: M2M transformation for ENUM [message #1835035 is a reply to message #1835028] |
Mon, 23 November 2020 17:46 |
|
Hello,
ETL does not support transformation rules between enumerations. You will need to use an operation for this e.g.
rule Graphical2Textual
transform g: coronagraphical!Country
to t: coronatextual!Country {
t.name = g.name;
t.population = g.population;
t.zone = g.zone.toContextualZone();
}
operation Any toContextualZone() {
if (self == coronagraphical!zonelabel#low) return contextual!zonelabel#low;
// etc.
}
Thanks,
Dimitris
[Updated on: Mon, 23 November 2020 17:46] Report message to a moderator
|
|
|
|
Re: M2M transformation for ENUM [message #1835066 is a reply to message #1835041] |
Tue, 24 November 2020 08:39 |
|
> I tried the same thing before but instead of using g.zone.toCoronaTextualzone(), I used g.toCoronaTextualzone(), therefore it was not working.
That should also work fine as long as your operation looks like this:
operation coronagraphical!Country toContextualZone() {
if (self.zone == coronagraphical!zonelabel#low) return contextual!zonelabel#low;
// etc.
}
|
|
|
Powered by
FUDForum. Page generated in 0.02986 seconds