Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly stated error: '...' should not be nested in '...' unless there is a valid relationship #577

Closed
krismeukens opened this issue Feb 13, 2020 · 7 comments

Comments

@krismeukens
Copy link

krismeukens commented Feb 13, 2020

Version of Archi, Operating System

4.6.0

Expected Behaviour

No error as there is a valid "specialization" relationship

Actual Behaviour

Incorrectly stated error: '...' should not be nested in '...' unless there is a valid relationship

Steps to Reproduce the Behaviour

  1. Create an application service
  2. Create another application service
  3. Make the latter a specialization of the former
  4. Nest the latter in the former
  5. Check the validator
@Phillipus
Copy link
Member

Specialization works the other way around... @jbsarrodie I think this is it?

@jbsarrodie
Copy link
Member

Specialization works the other way around... @jbsarrodie I think this is it?

I confirm the bug (and found another one).

For structural relationships and access, the target of the relationships is inside the source, but for specialization this is the way around: a specific element (S) is a specialization of a generic element (G), then S is inside G. So in the case described the validator should not warn.

The other bug I discovered is related: If in your model you have S being a specialization of G, when in a view you nest S inside G, ARM mecanisme is triggered (it shouldn't) and asks you which relationship to create. It proposes specialization (in the right "direction", ie. from S to G), but if you choose it, it create another specialization, leading with two identical specialization from S to G.

So part of these logics have to be checked (I'm looking forward being in vacation next week to be able to work on several topics in Archi ;-)

@Phillipus
Copy link
Member

Phillipus commented Feb 13, 2020

I thought Specialization was a special case and works as we have it now? It used to be the other way round.... (confused)

@jbsarrodie
Copy link
Member

I thought Specialization was a special case and works as we have it now? It used to be the other way round.... (confused)

Prior ArchiMate 3.0, there was simply no official nesting for specialization.

It become allowed (as described) in 3.0. It was then implemented in Archi in ARM, but this first implementation was suggesting the creation of a specialization in the wrong "direction" (from G to S). This has been solved at some point (there's an issue for this) and ARM was changed to suggest the creation of a specialization in the right "direction" (from S to G). But when we worked on this issue and I tested it, it seems I did a partial test: i.e. only tested the creation of a new relationship but never tested the case when a relationship already exist. And I never tested validator on this.

So here is what is at minimum needed to fix the issue:

  • Validation rule for nesting (B inside A) should check for structural and access relationships from A to B (already done) or specialization from B to A (this exact issue)
  • When nesting two elements (B inside A), Archi should check if it exists a relationship from A to B or from B to A which is of one of the types selected in the ARM configuration pane "Relation types to hide when elements are nested" (the bug I detected)

This would fix current ARM behavior and fixe Validator.

Of course, if we start working of this piece of code around ARM, then it could make sens to look at several other related issues: #578, #233, #207, #338, #580, #173

@Phillipus
Copy link
Member

So, for the Validator are we saying that for the Specialization relationship nesting A inside B and nesting B inside A is OK? Or just the reverse of what we have now? It's not clear to me.

@Phillipus
Copy link
Member

OK, I get it now. I've fixed the Specialization relationship being the wrong direction and also so that the Validator checks for all relations between parent/child which I think is what is the issue in #578

@Phillipus
Copy link
Member

Closing this as it is implemented for the next version. Please re-open if any issues are found when released,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants