Grouping and Positioning of Packages/Components: Having Issues

0 votes
asked Sep 29, 2014 in To be sorted by MJ (180 points)

Just having some issues when grouping components into packages on a larger scale in PlantUML.

Image (sample code is at the bottom): 
https://scontent-a.xx.fbcdn.net/hphotos-xpf1/t31.0-8/10431217_371297729690071_4018105831354621676_o.jpg

1) The resolution of the diagram extends in width only and makes it difficult to view the diagram. Is there any way/tips of controlling the positioning of components/packages and to make the picture as a whole squarer?

2) Controlling the arrows between packages (e.g. SYSTEM1 --> SYSTEM5) For me sometimes it creates a new component rather than acknowledging the existing package. How do I ensure that it links to an existing package, rather than creating a new component>

I really appreciate your help answering these questions in advance.

Many thanks.

 

Sample Code:

[SYSTEM1]--> [SYSTEM5] 

package "SYSTEM1" {

note top of [ControlM]

NOTE EXAMPLE This is a Note

and can be on several lines

end note

note right of [Customisations]

NOTE EXAMPLE This is a Note

and can be on several lines

end note 

[WPP]

[WPP] --> [Pay]: GG

[DDD]

[DDD] --> [General] : COValues

[Payd]

[Payd] --> [Accc] : Trans

[Asst]

[Asst] --> [Accc] : Trans

[Accc]

[Accc] --> [General] : GG

[General]

[General] --> [Archive] : GG

[NZ]

[NZ] <-- [General] : GG

[HCM]

[HCM] --> [PR] 

[PR]

[PR] --> [General]

[Archive]

}       

package "SYSTEM2" { 

note top of [ControlM]

NOTE EXAMPLE This is a Note

and can be on several lines

end note

note right of [Customisations]

NOTE EXAMPLE This is a Note

and can be on several lines

end note

 

[Compensation]

[Compensation] <-- [HCM] : Employees Data

 }

[Tax]

[Tax] <-- [General] : Bal

[Tax] --> [General] : Jo

[Det]

[Det] <-- [Voy] : Trans

[Voy]

package "SYSTEM3" {

[B)]

[B)] --> [General] : Trans

[F]

[O]

}

package "SYSTEM4" {

[EI]

[EI] --> [General] : GG

[W ET]

[W ET] --> [General] : GG

[Ster]

[Ster] --> [EI] : FT

}

package "SYSTEM5" {

[Direct]

[Direct] --> [B)] : P Trans

[GP]

[GP] --> [EI] : P Trans

[SG]

}

1 Answer

0 votes
answered Sep 29, 2014 by rmric (2,140 points)

1) AFAICT, the default for PlantUML is to extend in width. In order to extend in height, you can place "vertical" relations between elements.

2) Talking about SYSTEM1 & SYSTEM5, have you noticed you declared SYSTEM5 both as a component (first line [SYSTEM5]) and as a package (at the bottom) ?

BTW, there's a positionning bug in component/class diagrams you can workaround, as explained here: http://plantuml.sourceforge.net/qa/?qa=1132/direction-constrains-respected-between-component-package&show=2352

However, v8008 still has one bug with busy packages, see http://plantuml.sourceforge.net/qa/?qa=1628/layout-of-grouping-component

commented Oct 6, 2014 by anonymous
Thank you for your response rmric ! :)

You have answered most of my issues. Except I am still left with the issues of linking package -> package (bear in mind there are several components declared inside each of these packages too) What is the correct syntax to do this, and is it to be done inside or outside the package parameters {} etc?

Many thanks in advance.
commented Oct 10, 2014 by rmric (2,140 points)
I'm not sure to understand your question.

It all depends on what you'd like to do, whatever the nesting (the names or aliases must be unique):

package PPP {
 [AAA]
 [BBB]
}
package QQQ {
 [CCC]
 [DDD]
}

' Linking between packages
PPP --> QQQ
'Linking a component to a package
AAA --> QQQ
'Linking a component to another component
AAA --> CCC
...