I know that I can transform operations in ATL. I am wondering how I can execute an operation.
To illustrate, assume I have a class which has three attributes of "a", "b" and "c" as well as an operation which does "a=b+c".
In the ATL transformation, I have two input models (first model is the above mentioned model). Assume during the transformation I want to execute the above mentioned operation on some attributes of the second model. How Can I achieve that?
Provided that the operation is defined as an EOperation in your metamodel, and you generated the code for your metamodel, and you implemented the EOperation within the generated Java code, and you access your metamodel by its registered namespace URI (I.e. generated metamodel code is installed as Eclipse plug-in):
You can invoke the operation as if it were a helper method in ATL: