How can I style Archimate elements individually using skinparams?

0 votes
asked May 7 in Question / help by zimchaa (980 points)

I'm attempting to match the Archimate specification for 'Structure' elements vs. 'Behaviour' elements, and I thought it might be possible using specific targetted skinparams, e.g. roundcorner - to recreate this:


@startuml
skinparam rectangle<<$archimate/business-process>> {
    roundcorner 10
    shadowing false
}

skinparam archimate<<technology-infra-interface>> {
    roundcorner 10
    shadowing false
}

rectangle "Capture Information"  as CI <<$archimate/business-process>> #yellow
archimate #technology "Tech Interface" as TI <<technology-infra-interface>>

@enduml

PlantUML 

Neither seem to work. With the following approach; attempting to target one of the items (note, shadowing is visible on both) however the rounded corners are working on both.


@startuml
skinparam rectangle {
    roundcorner 10
    shadowing<<technology-infra-interface>> false
}

rectangle "Capture Information"  as CI <<$archimate/business-process>> #yellow
archimate #technology "Tech Interface" as TI <<technology-infra-interface>>
@enduml

So, what is the best way to achieve rounded corners on some of the elements (the behavioural ones) while leaving others (structural ones)?

2 Answers

0 votes
answered May 7 by zimchaa (980 points)

I think I've worked something out, the first <<stereotype>> is just for the sprite and doesn't allow skinparam targetting, and a second stereotype (suggested <<behavioural>>) is needed to latch the styling onto.


@startuml
sprite $bProcess jar:archimate/business-process
sprite $aService jar:archimate/application-service
sprite $aComponent jar:archimate/application-component

skinparam rectangle<<behavioural>> {
    roundcorner 10
    shadowing false
}

rectangle "Capture Information"  as CI <<$bProcess>> #yellow
rectangle "App Service" as AS <<$aService>> <<behavioural>> #lightblue
@enduml

0 votes
answered May 8 by zimchaa (980 points)

Another small roadblock:


@startuml
skinparam rectangle<<behavioural>> {
    RoundCorner 10
}

rectangle "Resource" as SResource <<$archimate/strategy-resource>> #STRATEGY
rectangle "Capability" as SCapability <<$archimate/strategy-capability>> <<behavioural>> #STRATEGY
rectangle "Course Of Action" as SCourseAction <<$archimate/strategy-course-of-action>> <<behavioural>> #STRATEGY

@enduml

This works well:

Archimate Strategy

However this:


@startuml
skinparam rectangle<<behavioural>> {
    RoundCorner 10
}

'rectangle "Resource" as SResource <<$archimate/strategy-resource>> #STRATEGY
'rectangle "Capability" as SCapability <<$archimate/strategy-capability>> <<behavioural>> #STRATEGY
'rectangle "Course Of Action" as SCourseAction <<$archimate/strategy-course-of-action>> <<behavioural>> #STRATEGY

archimate #STRATEGY "Resource" as SResource <<strategy-resource>>
archimate #STRATEGY "Capability" as SCapability <<strategy-capability>> <<behavioural>>
archimate #STRATEGY "Course Of Action" as SCourseAction <<strategy-course-of-action>> <<behavioural>>
@enduml

Does not?

Strategy Example

Should I just use the 'rectangle' style? Any other ideas for how to achieve this?

Note: putting the <<behavioural>> stereotype in other places (e.g. before the other one) results in the same error.

Reference: http://pubs.opengroup.org/architecture/archimate3-doc/chap07.html#_Toc489946037

commented May 8 by plantuml (198,100 points)
The support of Archimate is ongoing, and we are only adding feature when people ask for them :-)

So with last beta http://beta.plantuml.net/plantuml.jar you can now have :

@startuml
skinparam archimate {
    shadowing false
}
skinparam archimate<<strategy-capability>> {
    roundcorner 25
}


archimate #STRATEGY "Resource" as SResource <<strategy-resource>>
archimate #STRATEGY "Capability" as SCapability <<strategy-capability>>
archimate #STRATEGY "Course Of Action" as SCourseAction <<strategy-course-of-action>>
@enduml

Note that we do not really support more than one Stereotypes for archimate.
Tell us if you need other features!
Thanks,
commented May 9 by zimchaa (980 points)
Thanks very much, it looks good - I'll propose a patch to the Archimate PlantUML project that adds this as an additional optional style include. I'll ask my other question on another thread.
...