Closed venthur closed 3 years ago
I've investigated a bit deeper, maybe this is not an issue of included files but rather a bug when you try to reference 2nd-level items and below. This is the smallest example I could find that demonstrates the issue and does not require imports:
workspace {
!identifiers hierarchical
model {
foo = softwareSystem "Software System Foo" {
baz = container "Container Baz"
}
bar = softwareSystem "Software System Bar"
baz2 = ref "Container://Software System Foo.Container Baz" {
barf = component "barf"
}
bar -> baz2 "some relation"
}
views {
systemLandscape {
include *
autoLayout
}
}
}
The error would be:
The destination element "baz2" does not exist at line 22: bar -> baz2 "some relation"
What also does not work
bar -> foo.baz.barf "some relation"
bar -> baz2.barf "some relation"
This however does work:
bar -> foo.baz2.barf "some relation"
The latest change that allows !ref
s to use identifiers instead of canonical names, solves the issue for me. I think this is really an improvement, thanks!
If people start to use !ref
s together with !include
s, they will probably experience the issue with the order of definitions and relations. So you might want to keep that issue open until it is fixed or be very specific in the documentation about the limitations of the parser (i.e. circular imports and the order of definitions).
This issue here, however, can be closed.
Sorry Simon for bugging you with so many requests!
I may have found an issue with
ref
:If I modify an existing element by using ref and add a new child element, how do i refer to that child if I want to create a relation? Should
foo.baz
andss.baz
work? Apparently onlyss.baz
works.I'm aware that
ref
is still considered experimental, but maybe this is a valid issue you might want to investigate.Edit: I've removed my comments that suspected that
!include
s are somehow related.