Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » uml:Signal context for OCL constraint
uml:Signal context for OCL constraint [message #1700935] Wed, 08 July 2015 09:39 Go to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 200
Registered: August 2013
Senior Member
Hi

I need to define an OCL constraint for uml:Signal. But when I try to parse it I get the following exception:
org.eclipse.ocl.pivot.utilities.ParserException: Unknown context type for 'ControlSumRule' <<unknown>>
	at org.eclipse.ocl.pivot.internal.manager.PivotMetamodelManager.parseSpecification(PivotMetamodelManager.java:2145)
	at org.eclipse.ocl.pivot.utilities.OCL.getSpecification(OCL.java:496)


It seems that Eclipse OCL doesn't support uml:Signal contexts. Could you suggest me a workaround? I'll try to create a testing project later...

Thanks!
Re: uml:Signal context for OCL constraint [message #1700941 is a reply to message #1700935] Wed, 08 July 2015 10:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5929
Registered: July 2009
Senior Member
Hi

Signals are not supported yet, but

There is a Pivot Signal class, so it might only be a matter of adding a
five line caseSignal to UML2ASDeclaration.

However I don't quite understand the error. Signal is a Classifier so I
would have expected it to just work with perhaps reduced functionality
in terms of visible attributes/operations. I recall a 'context' fix for
UML. What version are you running. You might try the latest 6.0.1
nightly build.

Regards

Ed Willink

On 08/07/2015 10:39, Denis Nikiforov wrote:
> Hi
>
> I need to define an OCL constraint for uml:Signal. But when I try to
> parse it I get the following exception:
> org.eclipse.ocl.pivot.utilities.ParserException: Unknown context type
> for 'ControlSumRule' <<unknown>>
> at
> org.eclipse.ocl.pivot.internal.manager.PivotMetamodelManager.parseSpecification(PivotMetamodelManager.java:2145)
> at org.eclipse.ocl.pivot.utilities.OCL.getSpecification(OCL.java:496)
>
> It seems that Eclipse OCL doesn't support uml:Signal contexts. Could
> you suggest me a workaround? I'll try to create a testing project
> later...
>
> Thanks!
Re: uml:Signal context for OCL constraint [message #1701060 is a reply to message #1700941] Thu, 09 July 2015 06:40 Go to previous messageGo to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 200
Registered: August 2013
Senior Member
Hi

I've updated to latest nightly build.

Here is a test project: https://github.com/AresEkb/ocl6_test

1st and 2nd tests works fine. But 3rd test is failed. I'm trying to get AS of uml:Signal and get the following error:
ERROR ocl.pivot.uml.internal.es2as.UML2AS  - UML org.eclipse.ocl.pivot.internal.DynamicTypeImpl' element is not a 'org.eclipse.ocl.pivot.Signal'


The error is differs from the error in my first post because I don't use getSpecification() method here. I'll try to create an example with this method...
Re: uml:Signal context for OCL constraint [message #1701062 is a reply to message #1701060] Thu, 09 July 2015 06:59 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5929
Registered: July 2009
Senior Member
Hi

The error message now makes sense to me. DynamicTypeImpl is/was an
unsuccessful attempt at a polymorphic reflective pivot element for the
many UML elements that the Pivot does not support explicitly.

Regards

Ed Willink


On 09/07/2015 07:40, Denis Nikiforov wrote:
> Hi
>
> I've updated to latest nightly build.
>
> Here is a test project: https://github.com/AresEkb/ocl6_test
>
> 1st and 2nd tests works fine. But 3rd test is failed. I'm trying to
> get AS of uml:Signal and get the following error:
> ERROR ocl.pivot.uml.internal.es2as.UML2AS - UML
> org.eclipse.ocl.pivot.internal.DynamicTypeImpl' element is not a
> 'org.eclipse.ocl.pivot.Signal'
>
> The error is differs from the error in my first post because I don't
> use getSpecification() method here. I'll try to create an example with
> this method...
Re: uml:Signal context for OCL constraint [message #1701065 is a reply to message #1701062] Thu, 09 July 2015 07:26 Go to previous messageGo to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 200
Registered: August 2013
Senior Member
Hi

Yep, I've updated the test project. Added the test with getSpecification() method. And it rises exactly the same exception as in the first message.
So I guess that the cause of the two errors is the same.

Could you suggest a workaround? I afraid that I'm too lame to fix something in OCL sources by myself Sad
Re: uml:Signal context for OCL constraint [message #1701109 is a reply to message #1701065] Thu, 09 July 2015 11:41 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5929
Registered: July 2009
Senior Member
Hi

You should find that

http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.0.1/N201507090705/mdt-ocl-Update-N201507090705.zip

has a fix for

https://bugs.eclipse.org/bugs/show_bug.cgi?id=472261

Regards

Ed Willink



On 09/07/2015 08:26, Denis Nikiforov wrote:
> Hi
>
> Yep, I've updated the test project. Added the test with
> getSpecification() method. And it rises exactly the same exception as
> in the first message.
> So I guess that the cause of the two errors is the same.
>
> Could you suggest a workaround? I afraid that I'm too lame to fix
> something in OCL sources by myself :(
Re: uml:Signal context for OCL constraint [message #1701155 is a reply to message #1701109] Thu, 09 July 2015 14:45 Go to previous message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 200
Registered: August 2013
Senior Member
You are awesome! Thanks a lot!
Previous Topic:OCLinEcore: Custom validation messages not working
Next Topic:How to add a custom data type?
Goto Forum:
  


Current Time: Tue Jun 19 14:56:30 GMT 2018

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

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

Back to the top