Navigable Role Name

Discussions about Domain Specific Language customizations

Moderator: Moderators

Navigable Role Name

Postby jnicholas330 » Mon Sep 03, 2018 5:17 pm

I'm trying to write a simple (or what I thought was simple) OCL constraint to check that all association's roles that are navigable have names (class diagram). However, everything I've tried so far has been giving me false negatives or false positives. Any ideas?
jnicholas330
Forum Newbie
Forum Newbie
 
Posts: 21
Posts Rating:4
Joined: Tue Jun 20, 2017 10:26 am

Re: Navigable Role Name

Postby marlel » Tue Sep 04, 2018 1:05 am

Hello,

Maybe this:
Code: Select all
not isNavigable() or name.size() > 0
Best regards,
Martynas
marlel
No Magic
No Magic
 
Posts: 388
Posts Rating:25
Joined: Wed Jul 11, 2012 2:31 am

Re: Navigable Role Name

Postby jnicholas330 » Tue Sep 04, 2018 6:15 am

Hi marlel,

What element is being constrained here? This doesn't work with constrained element of "Association".
jnicholas330
Forum Newbie
Forum Newbie
 
Posts: 21
Posts Rating:4
Joined: Tue Jun 20, 2017 10:26 am

Re: Navigable Role Name

Postby marlel » Tue Sep 04, 2018 6:59 am

Property
Best regards,
Martynas
marlel
No Magic
No Magic
 
Posts: 388
Posts Rating:25
Joined: Wed Jul 11, 2012 2:31 am


Return to DSL

Who is online

Users browsing this forum: No registered users and 0 guests

cron