OCL Validate decision outgoing edge guards

UML related questions and discussions

Moderator: Moderators

OCL Validate decision outgoing edge guards

Postby sandor.zsolt@netlock.hu » Sun Jul 26, 2020 4:26 am

Hello,

I would like to write an OCL based validator which ensures that for each decision node if there is an outgoing edge, it must have a guard.
I created a constraint with the following expression:

Code: Select all
self.outgoing->forAll(o | o.guard->notEmpty())


It works nicely, however, if I click an outgoing edge, add a guard, then double click the edge, select the guard value, and press del and close,
i will still have an "empty" guard in the model. How can I check for that particular "empty" guard?

Thanks,

Zsolti
sandor.zsolt@netlock.hu
Forum Newbie
Forum Newbie
 
Posts: 8
Posts Rating:2
Joined: Wed Jun 10, 2020 8:45 am

Return to Software Modeling (UML)

Who is online

Users browsing this forum: No registered users and 1 guest