Change value of ENum attribute depending on type of class [message #1850614] |
Thu, 10 March 2022 08:46 |
John Henbergs Messages: 239 Registered: October 2020 |
Senior Member |
|
|
Hi,
In the source metamodel I have two classes; OnlineWorker and AwayWorker.
In the target metamodel I have an class "Worker" which has an attribute "status" with EType "Status", where Status is an Enum with two possible values: "Online" and "Away".
Now, when I transform the class OnlineWorker to Worker I want the value of the status (i.e., Enum) in the class Worker to be Online, and when I transform from AwayWorker to Worker I want the value of the status (i.e., Enum) in the class Worker to be Away.
However, I am not sure, how to change or select the right value that should be on the status attribute that has an Enum as Type, depending ono the type of class that is transformed.
Any suggestions would be appreciated!
Thank you!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.66890 seconds