Page 1 of 1

Setting up relationship rules to prevent self-reference

PostPosted: Mon Sep 13, 2021 3:35 pm
by borromeotlhs@gmail.com
test-stereos.png

test-customizations.png

test-diagram.png


I am trying to create a profile to specify a DSL. I understand that some relationships using either Association or Dependency classes will be utilized between other classes in my DSL. However, I need to be explicit about which elements can connect to other elements.

My expectation is that the connection rules would only allow exactly what I've specified in the profile itself, but it does not. I have gone down the path of creating a custom diagram to explicitly be able to reference the blocks and connectors I want to use, but absent of setting up "types for source" and "types for target" on the customizations I make for my DSL elements, I cannot seem to encode a way for one element to be able to only use the relationship to/from itself. I also need to be able to explicitly disallow the relationship (<<pet>> in this instance) from being utilized between disallowed or undefined entities not in the DSL. I've used 'disallowed relationships' within the customization to no avail.

I am wondering why there isn't a matrix type I could use to specify allowed connections between elements based on the relationship type? Alternatively, how do I make enough customizations to enforce diagram connectivity to adhere to the defined DSL?

Re: Setting up relationship rules to prevent self-reference

PostPosted: Mon Oct 11, 2021 12:47 pm
by borromeotlhs@gmail.com
At this point, I would appreciate any pointer on how to make a DSL and read those instructions myself. Does the company that makes MagicDraw have anyone reading these forums?