Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Reuse of EOL operations in ETL
Reuse of EOL operations in ETL [message #523169] Thu, 25 March 2010 12:02 Go to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi,
I would like to access a number of operations captured in EOL in the
form shown below from within an ETL scipt.

operation MyType myOperation() : MyReturnType {
<blah>
}

I'm running ETL via ANT and ETL seems to expect to be passed in the
source model such that the type is expressed as:
MyModel!MyType

e.g.
MyRule
transform inThing : InModel!InType
to outThing : OutModel!OutType {
var myObj : MyModel!MyType := <some expression>;
<blah>;
myObj.myOperation();
}

The call myObj.myOperation() appears to be resolved such that it finds
the relevant eol file (which is imported at the top of the ETL script,
but then fails with the error message stating that the type MyType could
not be found. How do I dereference MyModel!MyType such that I can invoke
EOL operations on type MyType from within the ETL script?

Regards,
Chris
Re: Reuse of EOL operations in ETL [message #523170 is a reply to message #523169] Thu, 25 March 2010 12:11 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

The best solution for this is to change the signature of the operation
to "operation MyModel!MyType myOperation() ...".

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> I would like to access a number of operations captured in EOL in the
> form shown below from within an ETL scipt.
>
> operation MyType myOperation() : MyReturnType {
> <blah>
> }
>
> I'm running ETL via ANT and ETL seems to expect to be passed in the
> source model such that the type is expressed as:
> MyModel!MyType
>
> e.g.
> MyRule
> transform inThing : InModel!InType
> to outThing : OutModel!OutType {
> var myObj : MyModel!MyType := <some expression>;
> <blah>;
> myObj.myOperation();
> }
>
> The call myObj.myOperation() appears to be resolved such that it finds
> the relevant eol file (which is imported at the top of the ETL script,
> but then fails with the error message stating that the type MyType could
> not be found. How do I dereference MyModel!MyType such that I can invoke
> EOL operations on type MyType from within the ETL script?
>
> Regards,
> Chris


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #523172 is a reply to message #523170] Thu, 25 March 2010 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
Yes, I was aware of that, however I think this means that I will end up
with duplicates of the relevant operations differing only in their type
signatures. Is there no way to access the original operations?

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> The best solution for this is to change the signature of the operation
> to "operation MyModel!MyType myOperation() ...".
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> I would like to access a number of operations captured in EOL in the
>> form shown below from within an ETL scipt.
>>
>> operation MyType myOperation() : MyReturnType {
>> <blah>
>> }
>>
>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>> source model such that the type is expressed as:
>> MyModel!MyType
>>
>> e.g.
>> MyRule
>> transform inThing : InModel!InType
>> to outThing : OutModel!OutType {
>> var myObj : MyModel!MyType := <some expression>;
>> <blah>;
>> myObj.myOperation();
>> }
>>
>> The call myObj.myOperation() appears to be resolved such that it finds
>> the relevant eol file (which is imported at the top of the ETL script,
>> but then fails with the error message stating that the type MyType
>> could not be found. How do I dereference MyModel!MyType such that I
>> can invoke EOL operations on type MyType from within the ETL script?
>>
>> Regards,
>> Chris
>
>
Re: Reuse of EOL operations in ETL [message #523173 is a reply to message #523172] Thu, 25 March 2010 12:36 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Another option is to use an alias. If MyModel conforms to a metamodel
called XYZ, you can define the operation as "operation XYZ!MyType
myOperation() ... " and then when you load MyModel in your ETL
transformation, use MyModel as its name and XYZ as its alias.

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> Yes, I was aware of that, however I think this means that I will end up
> with duplicates of the relevant operations differing only in their type
> signatures. Is there no way to access the original operations?
>
> Regards
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> The best solution for this is to change the signature of the operation
>> to "operation MyModel!MyType myOperation() ...".
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi,
>>> I would like to access a number of operations captured in EOL in the
>>> form shown below from within an ETL scipt.
>>>
>>> operation MyType myOperation() : MyReturnType {
>>> <blah>
>>> }
>>>
>>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>>> source model such that the type is expressed as:
>>> MyModel!MyType
>>>
>>> e.g.
>>> MyRule
>>> transform inThing : InModel!InType
>>> to outThing : OutModel!OutType {
>>> var myObj : MyModel!MyType := <some expression>;
>>> <blah>;
>>> myObj.myOperation();
>>> }
>>>
>>> The call myObj.myOperation() appears to be resolved such that it
>>> finds the relevant eol file (which is imported at the top of the ETL
>>> script, but then fails with the error message stating that the type
>>> MyType could not be found. How do I dereference MyModel!MyType such
>>> that I can invoke EOL operations on type MyType from within the ETL
>>> script?
>>>
>>> Regards,
>>> Chris
>>
>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #523215 is a reply to message #523173] Thu, 25 March 2010 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
How would this look in the example 'MyRule'? Would there be any impact
on how I call the operation from another EOL script?

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Another option is to use an alias. If MyModel conforms to a metamodel
> called XYZ, you can define the operation as "operation XYZ!MyType
> myOperation() ... " and then when you load MyModel in your ETL
> transformation, use MyModel as its name and XYZ as its alias.
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> Yes, I was aware of that, however I think this means that I will end
>> up with duplicates of the relevant operations differing only in their
>> type signatures. Is there no way to access the original operations?
>>
>> Regards
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> The best solution for this is to change the signature of the
>>> operation to "operation MyModel!MyType myOperation() ...".
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi,
>>>> I would like to access a number of operations captured in EOL in the
>>>> form shown below from within an ETL scipt.
>>>>
>>>> operation MyType myOperation() : MyReturnType {
>>>> <blah>
>>>> }
>>>>
>>>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>>>> source model such that the type is expressed as:
>>>> MyModel!MyType
>>>>
>>>> e.g.
>>>> MyRule
>>>> transform inThing : InModel!InType
>>>> to outThing : OutModel!OutType {
>>>> var myObj : MyModel!MyType := <some expression>;
>>>> <blah>;
>>>> myObj.myOperation();
>>>> }
>>>>
>>>> The call myObj.myOperation() appears to be resolved such that it
>>>> finds the relevant eol file (which is imported at the top of the ETL
>>>> script, but then fails with the error message stating that the type
>>>> MyType could not be found. How do I dereference MyModel!MyType such
>>>> that I can invoke EOL operations on type MyType from within the ETL
>>>> script?
>>>>
>>>> Regards,
>>>> Chris
>>>
>>>
>
>
Re: Reuse of EOL operations in ETL [message #523229 is a reply to message #523215] Thu, 25 March 2010 15:20 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Rule MyRule won't change at all if you go for the alias option. However,
other Epsilon programs that call the myOperation() operation should now
also define an XYZ alias for the model.

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> How would this look in the example 'MyRule'? Would there be any impact
> on how I call the operation from another EOL script?
>
> Regards
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Another option is to use an alias. If MyModel conforms to a metamodel
>> called XYZ, you can define the operation as "operation XYZ!MyType
>> myOperation() ... " and then when you load MyModel in your ETL
>> transformation, use MyModel as its name and XYZ as its alias.
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi Dimitris,
>>> Yes, I was aware of that, however I think this means that I will end
>>> up with duplicates of the relevant operations differing only in their
>>> type signatures. Is there no way to access the original operations?
>>>
>>> Regards
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> The best solution for this is to change the signature of the
>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi,
>>>>> I would like to access a number of operations captured in EOL in
>>>>> the form shown below from within an ETL scipt.
>>>>>
>>>>> operation MyType myOperation() : MyReturnType {
>>>>> <blah>
>>>>> }
>>>>>
>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>>>>> source model such that the type is expressed as:
>>>>> MyModel!MyType
>>>>>
>>>>> e.g.
>>>>> MyRule
>>>>> transform inThing : InModel!InType
>>>>> to outThing : OutModel!OutType {
>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>> <blah>;
>>>>> myObj.myOperation();
>>>>> }
>>>>>
>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>> finds the relevant eol file (which is imported at the top of the
>>>>> ETL script, but then fails with the error message stating that the
>>>>> type MyType could not be found. How do I dereference MyModel!MyType
>>>>> such that I can invoke EOL operations on type MyType from within
>>>>> the ETL script?
>>>>>
>>>>> Regards,
>>>>> Chris
>>>>
>>>>
>>
>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #523303 is a reply to message #523229] Thu, 25 March 2010 20:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
I am running MyRule unchanged and have amended the signature of
myOperation to:
operation MyMetaModel!MyType myOperation()

Where MyModel is an instance of MyMetaModel, however the EOL fails to
resolve the operation call:
EXCEPTION: Type 'MyMetaModel!MyType' not found
(C:\EclipseWorkspaces\MyFile.eol@7:23)

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Rule MyRule won't change at all if you go for the alias option. However,
> other Epsilon programs that call the myOperation() operation should now
> also define an XYZ alias for the model.
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> How would this look in the example 'MyRule'? Would there be any impact
>> on how I call the operation from another EOL script?
>>
>> Regards
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Another option is to use an alias. If MyModel conforms to a metamodel
>>> called XYZ, you can define the operation as "operation XYZ!MyType
>>> myOperation() ... " and then when you load MyModel in your ETL
>>> transformation, use MyModel as its name and XYZ as its alias.
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi Dimitris,
>>>> Yes, I was aware of that, however I think this means that I will end
>>>> up with duplicates of the relevant operations differing only in
>>>> their type signatures. Is there no way to access the original
>>>> operations?
>>>>
>>>> Regards
>>>> Chris
>>>>
>>>> Dimitris Kolovos wrote:
>>>>> Hi Chris,
>>>>>
>>>>> The best solution for this is to change the signature of the
>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>
>>>>> Cheers,
>>>>> Dimitris
>>>>>
>>>>> Chris Holmes wrote:
>>>>>> Hi,
>>>>>> I would like to access a number of operations captured in EOL in
>>>>>> the form shown below from within an ETL scipt.
>>>>>>
>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>> <blah>
>>>>>> }
>>>>>>
>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>> the source model such that the type is expressed as:
>>>>>> MyModel!MyType
>>>>>>
>>>>>> e.g.
>>>>>> MyRule
>>>>>> transform inThing : InModel!InType
>>>>>> to outThing : OutModel!OutType {
>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>> <blah>;
>>>>>> myObj.myOperation();
>>>>>> }
>>>>>>
>>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>>> finds the relevant eol file (which is imported at the top of the
>>>>>> ETL script, but then fails with the error message stating that the
>>>>>> type MyType could not be found. How do I dereference
>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>> MyType from within the ETL script?
>>>>>>
>>>>>> Regards,
>>>>>> Chris
>>>>>
>>>>>
>>>
>>>
>
>
Re: Reuse of EOL operations in ETL [message #523323 is a reply to message #523303] Thu, 25 March 2010 21:33 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Are you defining MyMetaModel as an alias for MyModel when you're loading
it? If yes, could you please send me a minimal example that reproduces
this behaviour so that I can have a look at this in more detail?

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> I am running MyRule unchanged and have amended the signature of
> myOperation to:
> operation MyMetaModel!MyType myOperation()
>
> Where MyModel is an instance of MyMetaModel, however the EOL fails to
> resolve the operation call:
> EXCEPTION: Type 'MyMetaModel!MyType' not found
> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>
> Regards
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Rule MyRule won't change at all if you go for the alias option.
>> However, other Epsilon programs that call the myOperation() operation
>> should now also define an XYZ alias for the model.
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi Dimitris,
>>> How would this look in the example 'MyRule'? Would there be any
>>> impact on how I call the operation from another EOL script?
>>>
>>> Regards
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> Another option is to use an alias. If MyModel conforms to a
>>>> metamodel called XYZ, you can define the operation as "operation
>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>> your ETL transformation, use MyModel as its name and XYZ as its alias.
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi Dimitris,
>>>>> Yes, I was aware of that, however I think this means that I will
>>>>> end up with duplicates of the relevant operations differing only in
>>>>> their type signatures. Is there no way to access the original
>>>>> operations?
>>>>>
>>>>> Regards
>>>>> Chris
>>>>>
>>>>> Dimitris Kolovos wrote:
>>>>>> Hi Chris,
>>>>>>
>>>>>> The best solution for this is to change the signature of the
>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>
>>>>>> Cheers,
>>>>>> Dimitris
>>>>>>
>>>>>> Chris Holmes wrote:
>>>>>>> Hi,
>>>>>>> I would like to access a number of operations captured in EOL in
>>>>>>> the form shown below from within an ETL scipt.
>>>>>>>
>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>> <blah>
>>>>>>> }
>>>>>>>
>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>>> the source model such that the type is expressed as:
>>>>>>> MyModel!MyType
>>>>>>>
>>>>>>> e.g.
>>>>>>> MyRule
>>>>>>> transform inThing : InModel!InType
>>>>>>> to outThing : OutModel!OutType {
>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>> <blah>;
>>>>>>> myObj.myOperation();
>>>>>>> }
>>>>>>>
>>>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>>>> finds the relevant eol file (which is imported at the top of the
>>>>>>> ETL script, but then fails with the error message stating that
>>>>>>> the type MyType could not be found. How do I dereference
>>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>>> MyType from within the ETL script?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Chris
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
Re: Reuse of EOL operations in ETL [message #523377 is a reply to message #523323] Fri, 26 March 2010 08:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
I'm not sure! How would I declare that MyMetaModel is an alias for
MyModel? Perhaps it would be easiest to send you the model, the problems
I'm experiencing relates to only one operation so it's well constrained.

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Are you defining MyMetaModel as an alias for MyModel when you're loading
> it? If yes, could you please send me a minimal example that reproduces
> this behaviour so that I can have a look at this in more detail?
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> I am running MyRule unchanged and have amended the signature of
>> myOperation to:
>> operation MyMetaModel!MyType myOperation()
>>
>> Where MyModel is an instance of MyMetaModel, however the EOL fails to
>> resolve the operation call:
>> EXCEPTION: Type 'MyMetaModel!MyType' not found
>> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>>
>> Regards
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Rule MyRule won't change at all if you go for the alias option.
>>> However, other Epsilon programs that call the myOperation() operation
>>> should now also define an XYZ alias for the model.
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi Dimitris,
>>>> How would this look in the example 'MyRule'? Would there be any
>>>> impact on how I call the operation from another EOL script?
>>>>
>>>> Regards
>>>> Chris
>>>>
>>>> Dimitris Kolovos wrote:
>>>>> Hi Chris,
>>>>>
>>>>> Another option is to use an alias. If MyModel conforms to a
>>>>> metamodel called XYZ, you can define the operation as "operation
>>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>>> your ETL transformation, use MyModel as its name and XYZ as its alias.
>>>>>
>>>>> Cheers,
>>>>> Dimitris
>>>>>
>>>>> Chris Holmes wrote:
>>>>>> Hi Dimitris,
>>>>>> Yes, I was aware of that, however I think this means that I will
>>>>>> end up with duplicates of the relevant operations differing only
>>>>>> in their type signatures. Is there no way to access the original
>>>>>> operations?
>>>>>>
>>>>>> Regards
>>>>>> Chris
>>>>>>
>>>>>> Dimitris Kolovos wrote:
>>>>>>> Hi Chris,
>>>>>>>
>>>>>>> The best solution for this is to change the signature of the
>>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Dimitris
>>>>>>>
>>>>>>> Chris Holmes wrote:
>>>>>>>> Hi,
>>>>>>>> I would like to access a number of operations captured in EOL in
>>>>>>>> the form shown below from within an ETL scipt.
>>>>>>>>
>>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>>> <blah>
>>>>>>>> }
>>>>>>>>
>>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>>>> the source model such that the type is expressed as:
>>>>>>>> MyModel!MyType
>>>>>>>>
>>>>>>>> e.g.
>>>>>>>> MyRule
>>>>>>>> transform inThing : InModel!InType
>>>>>>>> to outThing : OutModel!OutType {
>>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>>> <blah>;
>>>>>>>> myObj.myOperation();
>>>>>>>> }
>>>>>>>>
>>>>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>>>>> finds the relevant eol file (which is imported at the top of the
>>>>>>>> ETL script, but then fails with the error message stating that
>>>>>>>> the type MyType could not be found. How do I dereference
>>>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>>>> MyType from within the ETL script?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Chris
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
Re: Reuse of EOL operations in ETL [message #523387 is a reply to message #523377] Fri, 26 March 2010 04:40 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

If you're running a launch configuration, you can define the alias in
the "Aliases" field of the EMF model configuration dialog. If you're
using ANT, you can specify it in the alias attribute of the
epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel name="MyModel"
alias="MyMetaModel" ... />). Finally, if you're using the generic
epsilon.loadModel task, you can specify it through a nested parameter:

<parameter name="aliases" value="MyMetaModel"/>

If this doesn't solve it, please send me the model/operations and I'll
have a closer look.

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> I'm not sure! How would I declare that MyMetaModel is an alias for
> MyModel? Perhaps it would be easiest to send you the model, the problems
> I'm experiencing relates to only one operation so it's well constrained.
>
> Best Wishes
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Are you defining MyMetaModel as an alias for MyModel when you're
>> loading it? If yes, could you please send me a minimal example that
>> reproduces this behaviour so that I can have a look at this in more
>> detail?
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi Dimitris,
>>> I am running MyRule unchanged and have amended the signature of
>>> myOperation to:
>>> operation MyMetaModel!MyType myOperation()
>>>
>>> Where MyModel is an instance of MyMetaModel, however the EOL fails to
>>> resolve the operation call:
>>> EXCEPTION: Type 'MyMetaModel!MyType' not found
>>> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>>>
>>> Regards
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> Rule MyRule won't change at all if you go for the alias option.
>>>> However, other Epsilon programs that call the myOperation()
>>>> operation should now also define an XYZ alias for the model.
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi Dimitris,
>>>>> How would this look in the example 'MyRule'? Would there be any
>>>>> impact on how I call the operation from another EOL script?
>>>>>
>>>>> Regards
>>>>> Chris
>>>>>
>>>>> Dimitris Kolovos wrote:
>>>>>> Hi Chris,
>>>>>>
>>>>>> Another option is to use an alias. If MyModel conforms to a
>>>>>> metamodel called XYZ, you can define the operation as "operation
>>>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>>>> your ETL transformation, use MyModel as its name and XYZ as its
>>>>>> alias.
>>>>>>
>>>>>> Cheers,
>>>>>> Dimitris
>>>>>>
>>>>>> Chris Holmes wrote:
>>>>>>> Hi Dimitris,
>>>>>>> Yes, I was aware of that, however I think this means that I will
>>>>>>> end up with duplicates of the relevant operations differing only
>>>>>>> in their type signatures. Is there no way to access the original
>>>>>>> operations?
>>>>>>>
>>>>>>> Regards
>>>>>>> Chris
>>>>>>>
>>>>>>> Dimitris Kolovos wrote:
>>>>>>>> Hi Chris,
>>>>>>>>
>>>>>>>> The best solution for this is to change the signature of the
>>>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Dimitris
>>>>>>>>
>>>>>>>> Chris Holmes wrote:
>>>>>>>>> Hi,
>>>>>>>>> I would like to access a number of operations captured in EOL
>>>>>>>>> in the form shown below from within an ETL scipt.
>>>>>>>>>
>>>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>>>> <blah>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>>>>> the source model such that the type is expressed as:
>>>>>>>>> MyModel!MyType
>>>>>>>>>
>>>>>>>>> e.g.
>>>>>>>>> MyRule
>>>>>>>>> transform inThing : InModel!InType
>>>>>>>>> to outThing : OutModel!OutType {
>>>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>>>> <blah>;
>>>>>>>>> myObj.myOperation();
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> The call myObj.myOperation() appears to be resolved such that
>>>>>>>>> it finds the relevant eol file (which is imported at the top of
>>>>>>>>> the ETL script, but then fails with the error message stating
>>>>>>>>> that the type MyType could not be found. How do I dereference
>>>>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>>>>> MyType from within the ETL script?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Chris
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #523391 is a reply to message #523387] Fri, 26 March 2010 09:47 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
Thanks, that was the missing piece of information ... how to define the
alias from the Ant script (and thanks for defining the other forms too).
The transformation now works as expected :)

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> If you're running a launch configuration, you can define the alias in
> the "Aliases" field of the EMF model configuration dialog. If you're
> using ANT, you can specify it in the alias attribute of the
> epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel name="MyModel"
> alias="MyMetaModel" ... />). Finally, if you're using the generic
> epsilon.loadModel task, you can specify it through a nested parameter:
>
> <parameter name="aliases" value="MyMetaModel"/>
>
> If this doesn't solve it, please send me the model/operations and I'll
> have a closer look.
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> I'm not sure! How would I declare that MyMetaModel is an alias for
>> MyModel? Perhaps it would be easiest to send you the model, the
>> problems I'm experiencing relates to only one operation so it's well
>> constrained.
>>
>> Best Wishes
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Are you defining MyMetaModel as an alias for MyModel when you're
>>> loading it? If yes, could you please send me a minimal example that
>>> reproduces this behaviour so that I can have a look at this in more
>>> detail?
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi Dimitris,
>>>> I am running MyRule unchanged and have amended the signature of
>>>> myOperation to:
>>>> operation MyMetaModel!MyType myOperation()
>>>>
>>>> Where MyModel is an instance of MyMetaModel, however the EOL fails
>>>> to resolve the operation call:
>>>> EXCEPTION: Type 'MyMetaModel!MyType' not found
>>>> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>>>>
>>>> Regards
>>>> Chris
>>>>
>>>> Dimitris Kolovos wrote:
>>>>> Hi Chris,
>>>>>
>>>>> Rule MyRule won't change at all if you go for the alias option.
>>>>> However, other Epsilon programs that call the myOperation()
>>>>> operation should now also define an XYZ alias for the model.
>>>>>
>>>>> Cheers,
>>>>> Dimitris
>>>>>
>>>>> Chris Holmes wrote:
>>>>>> Hi Dimitris,
>>>>>> How would this look in the example 'MyRule'? Would there be any
>>>>>> impact on how I call the operation from another EOL script?
>>>>>>
>>>>>> Regards
>>>>>> Chris
>>>>>>
>>>>>> Dimitris Kolovos wrote:
>>>>>>> Hi Chris,
>>>>>>>
>>>>>>> Another option is to use an alias. If MyModel conforms to a
>>>>>>> metamodel called XYZ, you can define the operation as "operation
>>>>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>>>>> your ETL transformation, use MyModel as its name and XYZ as its
>>>>>>> alias.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Dimitris
>>>>>>>
>>>>>>> Chris Holmes wrote:
>>>>>>>> Hi Dimitris,
>>>>>>>> Yes, I was aware of that, however I think this means that I will
>>>>>>>> end up with duplicates of the relevant operations differing only
>>>>>>>> in their type signatures. Is there no way to access the original
>>>>>>>> operations?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Chris
>>>>>>>>
>>>>>>>> Dimitris Kolovos wrote:
>>>>>>>>> Hi Chris,
>>>>>>>>>
>>>>>>>>> The best solution for this is to change the signature of the
>>>>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Dimitris
>>>>>>>>>
>>>>>>>>> Chris Holmes wrote:
>>>>>>>>>> Hi,
>>>>>>>>>> I would like to access a number of operations captured in EOL
>>>>>>>>>> in the form shown below from within an ETL scipt.
>>>>>>>>>>
>>>>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>>>>> <blah>
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed
>>>>>>>>>> in the source model such that the type is expressed as:
>>>>>>>>>> MyModel!MyType
>>>>>>>>>>
>>>>>>>>>> e.g.
>>>>>>>>>> MyRule
>>>>>>>>>> transform inThing : InModel!InType
>>>>>>>>>> to outThing : OutModel!OutType {
>>>>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>>>>> <blah>;
>>>>>>>>>> myObj.myOperation();
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> The call myObj.myOperation() appears to be resolved such that
>>>>>>>>>> it finds the relevant eol file (which is imported at the top
>>>>>>>>>> of the ETL script, but then fails with the error message
>>>>>>>>>> stating that the type MyType could not be found. How do I
>>>>>>>>>> dereference MyModel!MyType such that I can invoke EOL
>>>>>>>>>> operations on type MyType from within the ETL script?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Chris
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>
>
Re: Reuse of EOL operations in ETL [message #587665 is a reply to message #523169] Thu, 25 March 2010 12:11 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

The best solution for this is to change the signature of the operation
to "operation MyModel!MyType myOperation() ...".

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> I would like to access a number of operations captured in EOL in the
> form shown below from within an ETL scipt.
>
> operation MyType myOperation() : MyReturnType {
> <blah>
> }
>
> I'm running ETL via ANT and ETL seems to expect to be passed in the
> source model such that the type is expressed as:
> MyModel!MyType
>
> e.g.
> MyRule
> transform inThing : InModel!InType
> to outThing : OutModel!OutType {
> var myObj : MyModel!MyType := <some expression>;
> <blah>;
> myObj.myOperation();
> }
>
> The call myObj.myOperation() appears to be resolved such that it finds
> the relevant eol file (which is imported at the top of the ETL script,
> but then fails with the error message stating that the type MyType could
> not be found. How do I dereference MyModel!MyType such that I can invoke
> EOL operations on type MyType from within the ETL script?
>
> Regards,
> Chris


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #587675 is a reply to message #523170] Thu, 25 March 2010 12:30 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
Yes, I was aware of that, however I think this means that I will end up
with duplicates of the relevant operations differing only in their type
signatures. Is there no way to access the original operations?

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> The best solution for this is to change the signature of the operation
> to "operation MyModel!MyType myOperation() ...".
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> I would like to access a number of operations captured in EOL in the
>> form shown below from within an ETL scipt.
>>
>> operation MyType myOperation() : MyReturnType {
>> <blah>
>> }
>>
>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>> source model such that the type is expressed as:
>> MyModel!MyType
>>
>> e.g.
>> MyRule
>> transform inThing : InModel!InType
>> to outThing : OutModel!OutType {
>> var myObj : MyModel!MyType := <some expression>;
>> <blah>;
>> myObj.myOperation();
>> }
>>
>> The call myObj.myOperation() appears to be resolved such that it finds
>> the relevant eol file (which is imported at the top of the ETL script,
>> but then fails with the error message stating that the type MyType
>> could not be found. How do I dereference MyModel!MyType such that I
>> can invoke EOL operations on type MyType from within the ETL script?
>>
>> Regards,
>> Chris
>
>
Re: Reuse of EOL operations in ETL [message #587680 is a reply to message #523172] Thu, 25 March 2010 12:36 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Another option is to use an alias. If MyModel conforms to a metamodel
called XYZ, you can define the operation as "operation XYZ!MyType
myOperation() ... " and then when you load MyModel in your ETL
transformation, use MyModel as its name and XYZ as its alias.

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> Yes, I was aware of that, however I think this means that I will end up
> with duplicates of the relevant operations differing only in their type
> signatures. Is there no way to access the original operations?
>
> Regards
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> The best solution for this is to change the signature of the operation
>> to "operation MyModel!MyType myOperation() ...".
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi,
>>> I would like to access a number of operations captured in EOL in the
>>> form shown below from within an ETL scipt.
>>>
>>> operation MyType myOperation() : MyReturnType {
>>> <blah>
>>> }
>>>
>>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>>> source model such that the type is expressed as:
>>> MyModel!MyType
>>>
>>> e.g.
>>> MyRule
>>> transform inThing : InModel!InType
>>> to outThing : OutModel!OutType {
>>> var myObj : MyModel!MyType := <some expression>;
>>> <blah>;
>>> myObj.myOperation();
>>> }
>>>
>>> The call myObj.myOperation() appears to be resolved such that it
>>> finds the relevant eol file (which is imported at the top of the ETL
>>> script, but then fails with the error message stating that the type
>>> MyType could not be found. How do I dereference MyModel!MyType such
>>> that I can invoke EOL operations on type MyType from within the ETL
>>> script?
>>>
>>> Regards,
>>> Chris
>>
>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #587689 is a reply to message #523173] Thu, 25 March 2010 14:48 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
How would this look in the example 'MyRule'? Would there be any impact
on how I call the operation from another EOL script?

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Another option is to use an alias. If MyModel conforms to a metamodel
> called XYZ, you can define the operation as "operation XYZ!MyType
> myOperation() ... " and then when you load MyModel in your ETL
> transformation, use MyModel as its name and XYZ as its alias.
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> Yes, I was aware of that, however I think this means that I will end
>> up with duplicates of the relevant operations differing only in their
>> type signatures. Is there no way to access the original operations?
>>
>> Regards
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> The best solution for this is to change the signature of the
>>> operation to "operation MyModel!MyType myOperation() ...".
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi,
>>>> I would like to access a number of operations captured in EOL in the
>>>> form shown below from within an ETL scipt.
>>>>
>>>> operation MyType myOperation() : MyReturnType {
>>>> <blah>
>>>> }
>>>>
>>>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>>>> source model such that the type is expressed as:
>>>> MyModel!MyType
>>>>
>>>> e.g.
>>>> MyRule
>>>> transform inThing : InModel!InType
>>>> to outThing : OutModel!OutType {
>>>> var myObj : MyModel!MyType := <some expression>;
>>>> <blah>;
>>>> myObj.myOperation();
>>>> }
>>>>
>>>> The call myObj.myOperation() appears to be resolved such that it
>>>> finds the relevant eol file (which is imported at the top of the ETL
>>>> script, but then fails with the error message stating that the type
>>>> MyType could not be found. How do I dereference MyModel!MyType such
>>>> that I can invoke EOL operations on type MyType from within the ETL
>>>> script?
>>>>
>>>> Regards,
>>>> Chris
>>>
>>>
>
>
Re: Reuse of EOL operations in ETL [message #587697 is a reply to message #523215] Thu, 25 March 2010 15:20 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Rule MyRule won't change at all if you go for the alias option. However,
other Epsilon programs that call the myOperation() operation should now
also define an XYZ alias for the model.

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> How would this look in the example 'MyRule'? Would there be any impact
> on how I call the operation from another EOL script?
>
> Regards
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Another option is to use an alias. If MyModel conforms to a metamodel
>> called XYZ, you can define the operation as "operation XYZ!MyType
>> myOperation() ... " and then when you load MyModel in your ETL
>> transformation, use MyModel as its name and XYZ as its alias.
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi Dimitris,
>>> Yes, I was aware of that, however I think this means that I will end
>>> up with duplicates of the relevant operations differing only in their
>>> type signatures. Is there no way to access the original operations?
>>>
>>> Regards
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> The best solution for this is to change the signature of the
>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi,
>>>>> I would like to access a number of operations captured in EOL in
>>>>> the form shown below from within an ETL scipt.
>>>>>
>>>>> operation MyType myOperation() : MyReturnType {
>>>>> <blah>
>>>>> }
>>>>>
>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in the
>>>>> source model such that the type is expressed as:
>>>>> MyModel!MyType
>>>>>
>>>>> e.g.
>>>>> MyRule
>>>>> transform inThing : InModel!InType
>>>>> to outThing : OutModel!OutType {
>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>> <blah>;
>>>>> myObj.myOperation();
>>>>> }
>>>>>
>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>> finds the relevant eol file (which is imported at the top of the
>>>>> ETL script, but then fails with the error message stating that the
>>>>> type MyType could not be found. How do I dereference MyModel!MyType
>>>>> such that I can invoke EOL operations on type MyType from within
>>>>> the ETL script?
>>>>>
>>>>> Regards,
>>>>> Chris
>>>>
>>>>
>>
>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #587709 is a reply to message #523229] Thu, 25 March 2010 20:18 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
I am running MyRule unchanged and have amended the signature of
myOperation to:
operation MyMetaModel!MyType myOperation()

Where MyModel is an instance of MyMetaModel, however the EOL fails to
resolve the operation call:
EXCEPTION: Type 'MyMetaModel!MyType' not found
(C:\EclipseWorkspaces\MyFile.eol@7:23)

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Rule MyRule won't change at all if you go for the alias option. However,
> other Epsilon programs that call the myOperation() operation should now
> also define an XYZ alias for the model.
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> How would this look in the example 'MyRule'? Would there be any impact
>> on how I call the operation from another EOL script?
>>
>> Regards
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Another option is to use an alias. If MyModel conforms to a metamodel
>>> called XYZ, you can define the operation as "operation XYZ!MyType
>>> myOperation() ... " and then when you load MyModel in your ETL
>>> transformation, use MyModel as its name and XYZ as its alias.
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi Dimitris,
>>>> Yes, I was aware of that, however I think this means that I will end
>>>> up with duplicates of the relevant operations differing only in
>>>> their type signatures. Is there no way to access the original
>>>> operations?
>>>>
>>>> Regards
>>>> Chris
>>>>
>>>> Dimitris Kolovos wrote:
>>>>> Hi Chris,
>>>>>
>>>>> The best solution for this is to change the signature of the
>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>
>>>>> Cheers,
>>>>> Dimitris
>>>>>
>>>>> Chris Holmes wrote:
>>>>>> Hi,
>>>>>> I would like to access a number of operations captured in EOL in
>>>>>> the form shown below from within an ETL scipt.
>>>>>>
>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>> <blah>
>>>>>> }
>>>>>>
>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>> the source model such that the type is expressed as:
>>>>>> MyModel!MyType
>>>>>>
>>>>>> e.g.
>>>>>> MyRule
>>>>>> transform inThing : InModel!InType
>>>>>> to outThing : OutModel!OutType {
>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>> <blah>;
>>>>>> myObj.myOperation();
>>>>>> }
>>>>>>
>>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>>> finds the relevant eol file (which is imported at the top of the
>>>>>> ETL script, but then fails with the error message stating that the
>>>>>> type MyType could not be found. How do I dereference
>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>> MyType from within the ETL script?
>>>>>>
>>>>>> Regards,
>>>>>> Chris
>>>>>
>>>>>
>>>
>>>
>
>
Re: Reuse of EOL operations in ETL [message #587717 is a reply to message #523303] Thu, 25 March 2010 21:33 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

Are you defining MyMetaModel as an alias for MyModel when you're loading
it? If yes, could you please send me a minimal example that reproduces
this behaviour so that I can have a look at this in more detail?

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> I am running MyRule unchanged and have amended the signature of
> myOperation to:
> operation MyMetaModel!MyType myOperation()
>
> Where MyModel is an instance of MyMetaModel, however the EOL fails to
> resolve the operation call:
> EXCEPTION: Type 'MyMetaModel!MyType' not found
> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>
> Regards
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Rule MyRule won't change at all if you go for the alias option.
>> However, other Epsilon programs that call the myOperation() operation
>> should now also define an XYZ alias for the model.
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi Dimitris,
>>> How would this look in the example 'MyRule'? Would there be any
>>> impact on how I call the operation from another EOL script?
>>>
>>> Regards
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> Another option is to use an alias. If MyModel conforms to a
>>>> metamodel called XYZ, you can define the operation as "operation
>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>> your ETL transformation, use MyModel as its name and XYZ as its alias.
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi Dimitris,
>>>>> Yes, I was aware of that, however I think this means that I will
>>>>> end up with duplicates of the relevant operations differing only in
>>>>> their type signatures. Is there no way to access the original
>>>>> operations?
>>>>>
>>>>> Regards
>>>>> Chris
>>>>>
>>>>> Dimitris Kolovos wrote:
>>>>>> Hi Chris,
>>>>>>
>>>>>> The best solution for this is to change the signature of the
>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>
>>>>>> Cheers,
>>>>>> Dimitris
>>>>>>
>>>>>> Chris Holmes wrote:
>>>>>>> Hi,
>>>>>>> I would like to access a number of operations captured in EOL in
>>>>>>> the form shown below from within an ETL scipt.
>>>>>>>
>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>> <blah>
>>>>>>> }
>>>>>>>
>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>>> the source model such that the type is expressed as:
>>>>>>> MyModel!MyType
>>>>>>>
>>>>>>> e.g.
>>>>>>> MyRule
>>>>>>> transform inThing : InModel!InType
>>>>>>> to outThing : OutModel!OutType {
>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>> <blah>;
>>>>>>> myObj.myOperation();
>>>>>>> }
>>>>>>>
>>>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>>>> finds the relevant eol file (which is imported at the top of the
>>>>>>> ETL script, but then fails with the error message stating that
>>>>>>> the type MyType could not be found. How do I dereference
>>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>>> MyType from within the ETL script?
>>>>>>>
>>>>>>> Regards,
>>>>>>> Chris
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
Re: Reuse of EOL operations in ETL [message #587727 is a reply to message #523323] Fri, 26 March 2010 08:55 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
I'm not sure! How would I declare that MyMetaModel is an alias for
MyModel? Perhaps it would be easiest to send you the model, the problems
I'm experiencing relates to only one operation so it's well constrained.

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> Are you defining MyMetaModel as an alias for MyModel when you're loading
> it? If yes, could you please send me a minimal example that reproduces
> this behaviour so that I can have a look at this in more detail?
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> I am running MyRule unchanged and have amended the signature of
>> myOperation to:
>> operation MyMetaModel!MyType myOperation()
>>
>> Where MyModel is an instance of MyMetaModel, however the EOL fails to
>> resolve the operation call:
>> EXCEPTION: Type 'MyMetaModel!MyType' not found
>> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>>
>> Regards
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Rule MyRule won't change at all if you go for the alias option.
>>> However, other Epsilon programs that call the myOperation() operation
>>> should now also define an XYZ alias for the model.
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi Dimitris,
>>>> How would this look in the example 'MyRule'? Would there be any
>>>> impact on how I call the operation from another EOL script?
>>>>
>>>> Regards
>>>> Chris
>>>>
>>>> Dimitris Kolovos wrote:
>>>>> Hi Chris,
>>>>>
>>>>> Another option is to use an alias. If MyModel conforms to a
>>>>> metamodel called XYZ, you can define the operation as "operation
>>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>>> your ETL transformation, use MyModel as its name and XYZ as its alias.
>>>>>
>>>>> Cheers,
>>>>> Dimitris
>>>>>
>>>>> Chris Holmes wrote:
>>>>>> Hi Dimitris,
>>>>>> Yes, I was aware of that, however I think this means that I will
>>>>>> end up with duplicates of the relevant operations differing only
>>>>>> in their type signatures. Is there no way to access the original
>>>>>> operations?
>>>>>>
>>>>>> Regards
>>>>>> Chris
>>>>>>
>>>>>> Dimitris Kolovos wrote:
>>>>>>> Hi Chris,
>>>>>>>
>>>>>>> The best solution for this is to change the signature of the
>>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Dimitris
>>>>>>>
>>>>>>> Chris Holmes wrote:
>>>>>>>> Hi,
>>>>>>>> I would like to access a number of operations captured in EOL in
>>>>>>>> the form shown below from within an ETL scipt.
>>>>>>>>
>>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>>> <blah>
>>>>>>>> }
>>>>>>>>
>>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>>>> the source model such that the type is expressed as:
>>>>>>>> MyModel!MyType
>>>>>>>>
>>>>>>>> e.g.
>>>>>>>> MyRule
>>>>>>>> transform inThing : InModel!InType
>>>>>>>> to outThing : OutModel!OutType {
>>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>>> <blah>;
>>>>>>>> myObj.myOperation();
>>>>>>>> }
>>>>>>>>
>>>>>>>> The call myObj.myOperation() appears to be resolved such that it
>>>>>>>> finds the relevant eol file (which is imported at the top of the
>>>>>>>> ETL script, but then fails with the error message stating that
>>>>>>>> the type MyType could not be found. How do I dereference
>>>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>>>> MyType from within the ETL script?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Chris
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
Re: Reuse of EOL operations in ETL [message #587736 is a reply to message #523377] Fri, 26 March 2010 09:24 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

If you're running a launch configuration, you can define the alias in
the "Aliases" field of the EMF model configuration dialog. If you're
using ANT, you can specify it in the alias attribute of the
epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel name="MyModel"
alias="MyMetaModel" ... />). Finally, if you're using the generic
epsilon.loadModel task, you can specify it through a nested parameter:

<parameter name="aliases" value="MyMetaModel"/>

If this doesn't solve it, please send me the model/operations and I'll
have a closer look.

Cheers,
Dimitris

Chris Holmes wrote:
> Hi Dimitris,
> I'm not sure! How would I declare that MyMetaModel is an alias for
> MyModel? Perhaps it would be easiest to send you the model, the problems
> I'm experiencing relates to only one operation so it's well constrained.
>
> Best Wishes
> Chris
>
> Dimitris Kolovos wrote:
>> Hi Chris,
>>
>> Are you defining MyMetaModel as an alias for MyModel when you're
>> loading it? If yes, could you please send me a minimal example that
>> reproduces this behaviour so that I can have a look at this in more
>> detail?
>>
>> Cheers,
>> Dimitris
>>
>> Chris Holmes wrote:
>>> Hi Dimitris,
>>> I am running MyRule unchanged and have amended the signature of
>>> myOperation to:
>>> operation MyMetaModel!MyType myOperation()
>>>
>>> Where MyModel is an instance of MyMetaModel, however the EOL fails to
>>> resolve the operation call:
>>> EXCEPTION: Type 'MyMetaModel!MyType' not found
>>> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>>>
>>> Regards
>>> Chris
>>>
>>> Dimitris Kolovos wrote:
>>>> Hi Chris,
>>>>
>>>> Rule MyRule won't change at all if you go for the alias option.
>>>> However, other Epsilon programs that call the myOperation()
>>>> operation should now also define an XYZ alias for the model.
>>>>
>>>> Cheers,
>>>> Dimitris
>>>>
>>>> Chris Holmes wrote:
>>>>> Hi Dimitris,
>>>>> How would this look in the example 'MyRule'? Would there be any
>>>>> impact on how I call the operation from another EOL script?
>>>>>
>>>>> Regards
>>>>> Chris
>>>>>
>>>>> Dimitris Kolovos wrote:
>>>>>> Hi Chris,
>>>>>>
>>>>>> Another option is to use an alias. If MyModel conforms to a
>>>>>> metamodel called XYZ, you can define the operation as "operation
>>>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>>>> your ETL transformation, use MyModel as its name and XYZ as its
>>>>>> alias.
>>>>>>
>>>>>> Cheers,
>>>>>> Dimitris
>>>>>>
>>>>>> Chris Holmes wrote:
>>>>>>> Hi Dimitris,
>>>>>>> Yes, I was aware of that, however I think this means that I will
>>>>>>> end up with duplicates of the relevant operations differing only
>>>>>>> in their type signatures. Is there no way to access the original
>>>>>>> operations?
>>>>>>>
>>>>>>> Regards
>>>>>>> Chris
>>>>>>>
>>>>>>> Dimitris Kolovos wrote:
>>>>>>>> Hi Chris,
>>>>>>>>
>>>>>>>> The best solution for this is to change the signature of the
>>>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Dimitris
>>>>>>>>
>>>>>>>> Chris Holmes wrote:
>>>>>>>>> Hi,
>>>>>>>>> I would like to access a number of operations captured in EOL
>>>>>>>>> in the form shown below from within an ETL scipt.
>>>>>>>>>
>>>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>>>> <blah>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed in
>>>>>>>>> the source model such that the type is expressed as:
>>>>>>>>> MyModel!MyType
>>>>>>>>>
>>>>>>>>> e.g.
>>>>>>>>> MyRule
>>>>>>>>> transform inThing : InModel!InType
>>>>>>>>> to outThing : OutModel!OutType {
>>>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>>>> <blah>;
>>>>>>>>> myObj.myOperation();
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> The call myObj.myOperation() appears to be resolved such that
>>>>>>>>> it finds the relevant eol file (which is imported at the top of
>>>>>>>>> the ETL script, but then fails with the error message stating
>>>>>>>>> that the type MyType could not be found. How do I dereference
>>>>>>>>> MyModel!MyType such that I can invoke EOL operations on type
>>>>>>>>> MyType from within the ETL script?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Chris
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: Reuse of EOL operations in ETL [message #587749 is a reply to message #587736] Fri, 26 March 2010 09:47 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi Dimitris,
Thanks, that was the missing piece of information ... how to define the
alias from the Ant script (and thanks for defining the other forms too).
The transformation now works as expected :)

Regards
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> If you're running a launch configuration, you can define the alias in
> the "Aliases" field of the EMF model configuration dialog. If you're
> using ANT, you can specify it in the alias attribute of the
> epsilon.emf.loadModel task (i.e. <epsilon.emf.loadModel name="MyModel"
> alias="MyMetaModel" ... />). Finally, if you're using the generic
> epsilon.loadModel task, you can specify it through a nested parameter:
>
> <parameter name="aliases" value="MyMetaModel"/>
>
> If this doesn't solve it, please send me the model/operations and I'll
> have a closer look.
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi Dimitris,
>> I'm not sure! How would I declare that MyMetaModel is an alias for
>> MyModel? Perhaps it would be easiest to send you the model, the
>> problems I'm experiencing relates to only one operation so it's well
>> constrained.
>>
>> Best Wishes
>> Chris
>>
>> Dimitris Kolovos wrote:
>>> Hi Chris,
>>>
>>> Are you defining MyMetaModel as an alias for MyModel when you're
>>> loading it? If yes, could you please send me a minimal example that
>>> reproduces this behaviour so that I can have a look at this in more
>>> detail?
>>>
>>> Cheers,
>>> Dimitris
>>>
>>> Chris Holmes wrote:
>>>> Hi Dimitris,
>>>> I am running MyRule unchanged and have amended the signature of
>>>> myOperation to:
>>>> operation MyMetaModel!MyType myOperation()
>>>>
>>>> Where MyModel is an instance of MyMetaModel, however the EOL fails
>>>> to resolve the operation call:
>>>> EXCEPTION: Type 'MyMetaModel!MyType' not found
>>>> (C:\EclipseWorkspaces\MyFile.eol@7:23)
>>>>
>>>> Regards
>>>> Chris
>>>>
>>>> Dimitris Kolovos wrote:
>>>>> Hi Chris,
>>>>>
>>>>> Rule MyRule won't change at all if you go for the alias option.
>>>>> However, other Epsilon programs that call the myOperation()
>>>>> operation should now also define an XYZ alias for the model.
>>>>>
>>>>> Cheers,
>>>>> Dimitris
>>>>>
>>>>> Chris Holmes wrote:
>>>>>> Hi Dimitris,
>>>>>> How would this look in the example 'MyRule'? Would there be any
>>>>>> impact on how I call the operation from another EOL script?
>>>>>>
>>>>>> Regards
>>>>>> Chris
>>>>>>
>>>>>> Dimitris Kolovos wrote:
>>>>>>> Hi Chris,
>>>>>>>
>>>>>>> Another option is to use an alias. If MyModel conforms to a
>>>>>>> metamodel called XYZ, you can define the operation as "operation
>>>>>>> XYZ!MyType myOperation() ... " and then when you load MyModel in
>>>>>>> your ETL transformation, use MyModel as its name and XYZ as its
>>>>>>> alias.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Dimitris
>>>>>>>
>>>>>>> Chris Holmes wrote:
>>>>>>>> Hi Dimitris,
>>>>>>>> Yes, I was aware of that, however I think this means that I will
>>>>>>>> end up with duplicates of the relevant operations differing only
>>>>>>>> in their type signatures. Is there no way to access the original
>>>>>>>> operations?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Chris
>>>>>>>>
>>>>>>>> Dimitris Kolovos wrote:
>>>>>>>>> Hi Chris,
>>>>>>>>>
>>>>>>>>> The best solution for this is to change the signature of the
>>>>>>>>> operation to "operation MyModel!MyType myOperation() ...".
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Dimitris
>>>>>>>>>
>>>>>>>>> Chris Holmes wrote:
>>>>>>>>>> Hi,
>>>>>>>>>> I would like to access a number of operations captured in EOL
>>>>>>>>>> in the form shown below from within an ETL scipt.
>>>>>>>>>>
>>>>>>>>>> operation MyType myOperation() : MyReturnType {
>>>>>>>>>> <blah>
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> I'm running ETL via ANT and ETL seems to expect to be passed
>>>>>>>>>> in the source model such that the type is expressed as:
>>>>>>>>>> MyModel!MyType
>>>>>>>>>>
>>>>>>>>>> e.g.
>>>>>>>>>> MyRule
>>>>>>>>>> transform inThing : InModel!InType
>>>>>>>>>> to outThing : OutModel!OutType {
>>>>>>>>>> var myObj : MyModel!MyType := <some expression>;
>>>>>>>>>> <blah>;
>>>>>>>>>> myObj.myOperation();
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> The call myObj.myOperation() appears to be resolved such that
>>>>>>>>>> it finds the relevant eol file (which is imported at the top
>>>>>>>>>> of the ETL script, but then fails with the error message
>>>>>>>>>> stating that the type MyType could not be found. How do I
>>>>>>>>>> dereference MyModel!MyType such that I can invoke EOL
>>>>>>>>>> operations on type MyType from within the ETL script?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Chris
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>
>
Previous Topic:Reuse of EOL operations in ETL
Next Topic:evl validation not working with gmf mindmap example
Goto Forum:
  


Current Time: Thu Apr 25 20:33:16 GMT 2024

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

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

Back to the top