Archimate - using a Node for Technology: Device

0 votes
asked May 8, 2019 in Question / help by zimchaa (1,040 points)

I've looked at using a node, instead of a rectangle to more closely match the specification (ref: http://pubs.opengroup.org/architecture/archimate3-doc/chap10.html#_Toc489946103) for a Technology: Device type, and it looks really good - except for the placement of the sprite, (see below) - is there a way to use a skinparam for changing the placement of a sprite?


@startuml
skinparam rectangle {
    Shadowing False
}

skinparam node {
    Shadowing False
    StereotypeAlignment right
}

skinparam rectangle<<behavioural>> {
    RoundCorner 10

}

rectangle "Technology Interface" as TInterface <<$archimate/interface>> #TECHNOLOGY
rectangle "Technology Function" as TFunction <<$archimate/technology-function>> <<behavioural>> #TECHNOLOGY
node "Technology Device" as TDevice <<$archimate/technology-device>> #TECHNOLOGY
@enduml

Also, nesting causes the correctly positioned sprites to be centered as well:


@startuml
skinparam rectangle {
    Shadowing False
}

skinparam node {
    Shadowing False
    StereotypeAlignment right
}

skinparam rectangle<<behavioural>> {
    RoundCorner 10

}

node "Technology Device" as TDevice <<$archimate/technology-device>> #TECHNOLOGY {

rectangle "Technology Function" as TFunction <<$archimate/technology-function>> <<behavioural>> #TECHNOLOGY {
rectangle "Technology Interface" as TInterface <<$archimate/interface>> #TECHNOLOGY
}
}
@enduml

1 Answer

+1 vote
answered May 9, 2019 by plantuml (294,960 points)
selected May 10, 2019 by zimchaa
 
Best answer

Alignment of sprite and stereotype was not controllable neither well defined.

So in last beta19 ( http://beta.plantuml.net/plantuml.jar ), we made two changes:

  • Now stereotype are by default centered (which is an issue for Archimate)
  • There is a new skinparam StereotypeAlignment right which allows to right align all sprites and stereotypes (which is good for Archimate)

So you can now have :

@startuml
skinparam StereotypeAlignment right
skinparam rectangle {
    Shadowing False
}

skinparam node {
    Shadowing False
    StereotypeAlignment right
}

skinparam rectangle<<behavioural>> {
    RoundCorner 10

}

node "Technology Device" as TDevice <<$archimate/technology-device>> #TECHNOLOGY {

rectangle "Technology Function" as TFunction <<$archimate/technology-function>> <<behavioural>> #TECHNOLOGY {
rectangle "Technology Interface" as TInterface <<$archimate/interface>> #TECHNOLOGY
}
}
@enduml

The setting is general for all sprites and stereotypes which is probably simplier. If someone need a different setting for specific elements (node, rectangle...) we'll implement it.

Does it sound good ?

commented May 10, 2019 by zimchaa (1,040 points)
It sounds good, I'll raise a patch for the Archimate scripts maintained by ebbypeter - including all of this stuff - thanks again!
...