"left to right direction" instructions not fully effective?

0 votes
asked Feb 4, 2023 in Question / help by anonymous
Hello,

I don't understand why for the following plantuml, the Gateway package is not at the right of the Service package, while I specify "left to right direction"

If anyone has an idea that could help to put the Gateway package at the right of the Service package, that would be so great :)

thank you

@startuml
left to right direction
title RenderGroupInCategories
package CONTROLLER #DDDDDD {
 class Controllers_BulkCarrotOignonController
 class Controllers_GarlicCarrotController
 class Controllers_PastaController
 class Controllers_CucumberController
 class Controllers_PastaController
}
package SERVICE #DDDDDD {
 class Services_CarrotOignonService
 class Services_GarlicCarrotService
 class Services_AccountCarrotService
 class Services_PastasService
 class Services_CucumbersReadService
 class Services_CucumbersWriteService
 class Services_CucumbersStatusService
 class Services_CabbageService
 class Services_RiceCabbageService
 class Services_GarlicService
 class Services_EarPlugsService
 class Services_ItemsService
 class Services_ThingsService
}
package GATEWAY #DDDDDD {
 class Gateways_CrossEntityGateway
 class Gateways_ProductGateway
}
Controllers_BulkCarrotOignonController o-- Services_CarrotOignonService
Controllers_GarlicCarrotController o-- Services_GarlicCarrotService
Controllers_PastaController o-- Services_AccountCarrotService
Controllers_PastaController o-- Services_PastasService
Controllers_CucumberController o-- Services_CucumbersReadService
Controllers_CucumberController o-- Services_CucumbersWriteService
Controllers_CucumberController o-- Services_CucumbersStatusService
Controllers_CucumberController o-- Services_PastasService
Controllers_PastaController o-- Services_CabbageService
Services_PastasService o-- Services_RiceCabbageService
Services_CucumbersReadService o-- Services_GarlicService
Services_CucumbersReadService o-- Services_EarPlugsService
Services_CucumbersReadService o-- Services_RiceCabbageService
Services_CucumbersReadService o-- Services_ItemsService
Services_CucumbersWriteService o-- Services_ThingsService
Services_CucumbersWriteService o-- Services_EarPlugsService
Services_CucumbersWriteService o-- Services_ItemsService
Services_CucumbersWriteService o-- Services_RiceCabbageService
Services_CucumbersWriteService o-- Gateways_CrossEntityGateway
Services_CucumbersWriteService o-- Gateways_ProductGateway
@enduml

1 Answer

0 votes
answered Feb 5, 2023 by The-Lu (74,900 points)

Hello A., and all,

For that you must to add more path/link for Gateways, as:

Services_CucumbersWriteService o--- Gateways_CrossEntityGateway
Services_CucumbersWriteService o--- Gateways_ProductGateway

Then see the expected result:

Regards.

commented Feb 5, 2023 by anonymous
ah ok, I understand: I can simply make the links between packages longer.

It's not ideal, but it's better!

thank you very much
commented Feb 5, 2023 by The-Lu (74,900 points)

Or put all data on a nested rectangle, as:

@startuml
left to right direction
title RenderGroupInCategories
rectangle {
package CONTROLLER #DDDDDD {
 class Controllers_BulkCarrotOignonController
 class Controllers_GarlicCarrotController
 class Controllers_PastaController
 class Controllers_CucumberController
 class Controllers_PastaController
}

package SERVICE #DDDDDD {
 class Services_CarrotOignonService
 class Services_GarlicCarrotService
 class Services_AccountCarrotService
 class Services_PastasService
 class Services_CucumbersReadService
 class Services_CucumbersWriteService
 class Services_CucumbersStatusService
 class Services_CabbageService
 class Services_RiceCabbageService
 class Services_GarlicService
 class Services_EarPlugsService
 class Services_ItemsService
 class Services_ThingsService
}
package GATEWAY #DDDDDD {
 class Gateways_CrossEntityGateway
 class Gateways_ProductGateway
}
}
Controllers_BulkCarrotOignonController o-- Services_CarrotOignonService
Controllers_GarlicCarrotController o-- Services_GarlicCarrotService
Controllers_PastaController o-- Services_AccountCarrotService
Controllers_PastaController o-- Services_PastasService
Controllers_CucumberController o-- Services_CucumbersReadService
Controllers_CucumberController o-- Services_CucumbersWriteService
Controllers_CucumberController o-- Services_CucumbersStatusService
Controllers_CucumberController o-- Services_PastasService
Controllers_PastaController o-- Services_CabbageService
Services_PastasService o-- Services_RiceCabbageService
Services_CucumbersReadService o-- Services_GarlicService
Services_CucumbersReadService o-- Services_EarPlugsService
Services_CucumbersReadService o-- Services_RiceCabbageService
Services_CucumbersReadService o-- Services_ItemsService
Services_CucumbersWriteService o-- Services_ThingsService
Services_CucumbersWriteService o-- Services_EarPlugsService
Services_CucumbersWriteService o-- Services_ItemsService
Services_CucumbersWriteService o-- Services_RiceCabbageService
Services_CucumbersWriteService o--- Gateways_CrossEntityGateway
Services_CucumbersWriteService o--- Gateways_ProductGateway
@enduml

Regards.

...