Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Forward Declaration
Forward Declaration [message #59791] Tue, 29 July 2008 13:29 Go to next message
Thomas Kurpick is currently offline Thomas KurpickFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

I have the following model:

Activity
While
Flow
Sequence
AtomicActivity

Now I defined a operation maxCount for Activity, which calls the appropriate
operation for the Subtypes. But the SubElements While, Flow and Sequence can
contain Elements of Type Activity. So I should be able to call the maxCount
for Activity again. But all I get is:

"Cannot find operation (maxCount) for the type (Activity))"



The operation requires additionally a parameter, so I can't use derived
Attributes.



Any Ideas how I could solve my Problem? Is there the possibility to make
forward declarations?



Thanks,

Thomas
Re: Forward Declaration [message #59817 is a reply to message #59791] Tue, 29 July 2008 17:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Thomas,

Which version of MDT OCL are you using? 1.2 (Ganymede)?

This sounds like this bug: https://bugs.eclipse.org/187679

If your operation definition is referencing itself, then you should
already be OK. Otherwise, if you define the Activity::maxCount
operation before the one that references it (i.e., earlier in the *.ocl
file), then you should also be OK.

HTH,

Christian


Thomas Kurpick wrote:
> Hi,
>
> I have the following model:
>
> Activity
> While
> Flow
> Sequence
> AtomicActivity
>
> Now I defined a operation maxCount for Activity, which calls the appropriate
> operation for the Subtypes. But the SubElements While, Flow and Sequence can
> contain Elements of Type Activity. So I should be able to call the maxCount
> for Activity again. But all I get is:
>
> "Cannot find operation (maxCount) for the type (Activity))"
>
>
>
> The operation requires additionally a parameter, so I can't use derived
> Attributes.
>
>
>
> Any Ideas how I could solve my Problem? Is there the possibility to make
> forward declarations?
>
>
>
> Thanks,
>
> Thomas
>
>
Re: Forward Declaration [message #59890 is a reply to message #59817] Wed, 30 July 2008 13:25 Go to previous message
Thomas Kurpick is currently offline Thomas KurpickFriend
Messages: 4
Registered: July 2009
Junior Member
"Christian W. Damus" <cdamus@zeligsoft.com> wrote

> Which version of MDT OCL are you using? 1.2 (Ganymede)?

I'm using OCL 2.0 Extender SDK 1.1.2 (Europa)

> This sounds like this bug: https://bugs.eclipse.org/187679

And it's exactly this bug. I fixed my problem by putting all code into one
operation.
Ugly but it works.

Thanks,
Thomas
Previous Topic:OCL Expression
Next Topic:[Announce] MDT OCL 1.2.1 M200807301501 is available
Goto Forum:
  


Current Time: Fri Apr 19 23:19:36 GMT 2024

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

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

Back to the top