|
Re: how to parse a text on a transition with OCL? is it possible ? [message #1700024 is a reply to message #1700017] |
Mon, 29 June 2015 17:54 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
For OMG OCL, yes, since the capability is implied by the UML
specification. However there are gaping chasms between the UML and OCL
specifications, so any useable implementation relies on vendor intuition.
For the new pivot-based Eclipse OCL, quite possibly. The UML support is
primarily for Class Diagram elements, but is kind of extensible in so
far as for unsupported UML elements, 'self' is aligned to the nearest
containing Class. This works for statemachines, and could work for
transitions. Activity diagrams are known to not work.
Regards
Ed Willink
On 29/06/2015 18:02, Parsa Pourali wrote:
> Hi Everyone,
>
> I was just wondering if it is possible to put constraints between a
> transition on a state machine and a variable/attribute in a class
> diagram ? for example, to make sure if the user writes [X++] as a
> guard for a transition in state machine, the X attribute exists in the
> corresponding class diagram.
>
> Is it even possible with OCL? I think maybe it should be coded to
> parse the text... Any idea will be appreciated :)
>
> Thanks,
> Parsa
|
|
|
|
Re: how to parse a text on a transition with OCL? is it possible ? [message #1700479 is a reply to message #1700469] |
Thu, 02 July 2015 20:01 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
It saves a lot of time to provide rather than hypothesize a model.
Regards
Ed Willink
On 02/07/2015 19:30, Parsa Pourali wrote:
> Hi Ed,
>
> Thanks a lot for your reply,
>
> I'm not sure if I made my point clear. I have a class diagram and a
> state machine. I want to impose some OCL expressions to check a
> constraint in the state machine. The constraint needs to point to an
> element in the class diagram ! using 'self' on state machine or on
> class diagram only returns the elements of that particular diagram.
> like, how can I track from state machine to class diagram by self?!
>
> if my starting point in OCL is the whole overall model, then I can
> have access to both class diagram and the state machine in the model.
> but if I impose OCL on state machine as a starting point, then 'self'
> cannot get me to the elements in the class diagram.
>
> So, do you think it is still possible. Is there any way to use java
> code in Papyrus to check these complex stuffs or ...
> Thanks in advance,
> Regards,
> Parsa
|
|
|
Powered by
FUDForum. Page generated in 0.03111 seconds