archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
944 stars 269 forks source link

Label features with UML Style Association Class connections #763

Closed ArchiRepo closed 2 years ago

ArchiRepo commented 2 years ago

When dealing with an "association class" it would be useful for the label expressions to be able to navigate the association to and so pick up the target and source of the referenced associations. so when we have : image

This would mean so in the diagram we could display something like "Business Object c" flows from "Process a" to "Process b" or "Business Object c" contains detail of the relationship between "Business Object a" and "Business Object b"

As it stands we can do this from the label on the flow using "$source{name} flows to $target{name} passing $association:source{name}". But it does not work on the label on the association to the flow using "$source{name} is passed from $flow:source{name} to $flow:target{name} on the association".

I will leave it to you to decide if this is a bug or a request for a new feature. (I'm using 4.9.0 beta 2 in the example posted)

Phillipus commented 2 years ago

I will leave it to you to decide if this is a bug or a request for a new feature.

The latter. ;-)

@jbsarrodie Is this something we should consider? Would it be widely used? Again, I want to be careful of adding too much processing time to the Label Expression handling code.

jbsarrodie commented 2 years ago

I will leave it to you to decide if this is a bug or a request for a new feature.

That's not a bug, because in your example, $flow:source{name} should reference a flow whose source is the association, which is not the case here because the association is neither the source nor the end of the flow. There's not expression that could work today, and this would requires something like $source{$source{name}}

@jbsarrodie Is this something we should consider?

I'm a bit mixted. The proposed use-case is not (IMHO) a real one because in a real model you won't add so much text just to paraphrase the diagram, and It's hard for me to see any real value (I've never encountered a need for this).

And making this work is not easy and would requires $source and $target to work recursively, which is not at all the logic we have at the moment for label expressions.

So my conclusion at the moment is that we're not gonna implement it in the short/mid term.

Phillipus commented 2 years ago

So my conclusion at the moment is that we're not gonna implement it in the short/mid term.

I agree. In this case, I'll close this one. @ArchiRepo thanks for the suggestion, but for the reasons above, we won't implement it. We'll re-open if things change,