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

Archimate enhancement for rectangle #130

Open
boessu opened this issue Feb 2, 2025 · 7 comments
Open

Archimate enhancement for rectangle #130

boessu opened this issue Feb 2, 2025 · 7 comments

Comments

@boessu
Copy link
Contributor

boessu commented Feb 2, 2025

I have the following enhancement or issue for the library !include <archimate/Archimate>:

Due to the fact that archimate is an own keyword and not based on rectangle, we get some sort of limitations with this standard library. If you take a look at https://plantuml.com/en/archimate-diagram you'll see the author of the documentation tries to make workarounds for the fact that rectangle can't use the archimate stereotype stiles with !include <archimate/Archimate>. In Example 1, the skinparam rectangle<<behaviour>> must be defined for the rectangle, even tough there would be a stereotype definition in the archimate library to import (<<business-process>>), but only for the element archimate, not for rectangle. That's mainly a "problem" if you would like to group things, which is very typically done in enterprise architecture diagrams (e.g. process and sub-processes, capabilities and sub-capabilities etc.)

My proposal is to change the archimate library to be reusable for the archimate and rectangle keyword. This can be done either with defining the archimate block for rectangle too (copy --> paste) or simply remove archimate from skinparam archimate {...}.

I can provide a pull request if there are plantuml maintainers who can tell me what's the better thing to do. I could try to change it to <style>...</style>. Although, and quite frankly, I'm not sure if the style part will be continued or if it is still better to use skinparam. It seems as the documentation is still very limited compared to skinparam.

I'm happy to see your feedback on this.

@arnaudroques
Copy link
Contributor

Thank you for suggestions regarding the !include <archimate/Archimate> library.

Actually, it's the opposite of what you proposed: we strongly encourage the use of styles instead of skinparam, as skinparam will eventually be deprecated. We definitely need to update our documentation to reflect this transition!

Regarding your proposal, we believe the best approach is to have the Archimate library drop the "rectangle" keyword entirely and rely solely on the "archimate" keyword. The use of "rectangle" was initially a workaround before the introduction of the "archimate" keyword, but it’s no longer necessary now. This change would simplify the design and ensure better consistency with Archimate standards.

We'll also update the documentation at https://plantuml.com/en/archimate-diagram to reflect these changes and focus on the usage of the "archimate" keyword.

We're open to making modifications to the PlantUML codebase if you can clearly specify what needs to be done. Feel free to share more details, and we'd be happy to collaborate on this.

Looking forward to your input!

@boessu
Copy link
Contributor Author

boessu commented Mar 23, 2025

Hello @arnaudroques

Okay. If you would like to keep the archimate keyword for that purpose, maybe my request is on the wrong place and should be an enhancement of PlantUML itself. ;-)

Basically, if I could do something like this (The example is a "real world" example out of BIAN 7.0):

@startuml
!include <Archimate/archimate>

archimate #STRATEGY "Cross Product Operations" <<strategy-capability>> {
  archimate #STRATEGY "Account Management" <<strategy-capability>>
  archimate #STRATEGY "Payments" <<strategy-capability>>
  archimate #STRATEGY "Operational Services" <<strategy-capability>>
  archimate #STRATEGY "Collateral Administration" <<strategy-capability>>
}

@enduml

My main requirements would be fulfilled. Actually, you have to use rectangles to make a hierarchical cluster of archimate elements (which I do as I don't have a chance to do it differently). Clustering such elements like capabilities, processes etc. is not uncommon. Quite frankly, I'm not sure why the archimate keyword is not an element which allows nesting like action, artifact, card, cloud, component, database, file, folder, frame, hexagon, node, package, process, queue, rectangle, stack and storage. I thought there is a specific reason for this limitation.

Would it be better to add this feature to PlantUML itself? I will make an issue in https://github.com/plantuml/plantuml/ if you think that makes more sense.

@Potherca
Copy link
Contributor

@boessu Out of curiousity, would this be the expected result?

@The-Lum
Copy link
Collaborator

The-Lum commented Mar 24, 2025

@The-Lum
Copy link
Collaborator

The-Lum commented Mar 24, 2025

Hi @boessu, @Potherca

Here is a possible workaround:

@startuml
rectangle "Cross Product Operations" <<$archimate/strategy-capability>> #STRATEGY {
  archimate #STRATEGY "Account Management" <<strategy-capability>>
  archimate #STRATEGY "Payments" <<strategy-capability>>
  archimate #STRATEGY "Operational Services" <<strategy-capability>>
  archimate #STRATEGY "Collateral Administration" <<strategy-capability>>
}
@enduml

If that can help,
Regards,
Th.

@boessu
Copy link
Contributor Author

boessu commented Mar 24, 2025

Hello @Potherca, @The-Lum

Thanks for your suggestions.

It would be more something like this:

Which doesn't help for my issue. My main issue here with archimate is the skinparam-part in the archimate stdlib, which can't be reused for rectangle from the import (that was the initial intention of this issue). I think if it would be rewritten to <style>...</style>, it could be fixed by just adding rectangle to the part which is actually only in the archimate space. Something like

<style>
  stereotype {
    HorizontalAlignment right
  }

  rectangle, archimate {
    .strategy-capability, .strategy-course-of-action (...) {
      RoundCorner 25
    }
  }
</style>

That was my initial offering to rewrite the stdlib/archimate according to this, if I'm allowed to do so. I think it would get even easier to read anyway. But if the aim of plantuml is to use the keyword archimate specifically for archimate things (I understand that), it would be more useful to make archimate a nestable element instead. Which is more something like the issue plantuml/plantuml#1818 needs in the core then.

The offering to rewrite the archimate library with a pull request to <style> is still open, by the way. ;-) I just need to know where to go now.

@arnaudroques
Copy link
Contributor

plantuml/plantuml#1818 has just been fixed.

Does it help?

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

4 participants