Hi,
I’m currently working on
Sequence Diagrams and StateMachine Diagrams.
We want to allow to
reference a StateMachine’s State into a Sequence
Diagram as a StateInvariant that covers a Lifeline.
According to the UML
snippet below:
(describing relations
between State, StateInvariant and Constraint)
http://yuml.me/03dd13b5
As we can see we can use
the Constraint object as a link between both world
(Interaction and StateMachine).
Unfortunately the uml2
implementation is done exactly at the inverse I would have
expected.
The State’s stateInvariant property
has a containment set to false with a cardinality of
0..1
The StateInvariant’s invariant property
has a containment set to true with a cardinality of 1
By default the StateInvariant will own an
automatically built Constraint.
Whereas the State can
have 1 or zero reference of Constraint.
What can I do to share
a State stateInvariant on several Lifeline using
several StateInvariant invariant ? IMHO the
constraint should be owned by the State itself and reuse on
any Lifeline by wrapping it with a StateInvariant.
If the containment
properties are reversed, I will be able to attach a Constraint to
my State and to reference it from several StateInvariant
Is-it a weakness into
the implementation ? otherwise how can I link these items
simply (without having to use free text)
(I’m using a Luna M6
derived version)
Thank you in advance for
your help
Sébastien
BORDES