Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Using OCL constraints in StateInvariant InteractionFragments?
Using OCL constraints in StateInvariant InteractionFragments? [message #1441219] Thu, 09 October 2014 12:10
Klaas Gadeyne is currently offline Klaas GadeyneFriend
Messages: 165
Registered: July 2009
Senior Member
Hi all (and UML/OCL experts in particular Smile

In the attached papyrus project, I try to use an OCL expression [*] for specifying the constraint of a StateInvariant (InteractionFragment).
In casu, I want to express that the trace would be invalid if the class2 lifeline (of type 'Class2') was not in a particular state ('State1')

However, I noticed that, as soon as I specify that the 'context' of the IsOn Constraint is 'Class2' (necessary for being able to specify the OCL expression), the constraint is moved beneath 'Class2' instead (and the StateInvariant constraint is gone).

Looking at the UML spec (2.5 beta 2, figures 7.13 and 17.1), I think I might see the problem. Indeed:
- Figure 7.13 specifies the context of the constraint to be its (possible) owner
- Figure 17.1 specifies the StateInvariant to be its (possible) owner

Given the fact that (I think) an OCL constraint is useless without context, this would lead me to the thought that I _cannot use OCL constraints in StateInvariant InteractionFragments_, since that would imply 'double ownership'?

The other option of course is that this is a papyrus (or reasoning) problem after all, and that's why I wanted to check here first.



[*] The constraint's name is 'isOn', and can be found below 'Class2' in the model.

[Updated on: Thu, 09 October 2014 12:56]

Report message to a moderator

Previous Topic:Any solution to import ExtendedImage from IBM RSA to Papyrus
Next Topic:Hide/remove base_Class property from stereotypes
Goto Forum:

Current Time: Sun Aug 09 17:23:40 GMT 2020

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

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

Back to the top