plantuml inner group exceeded the outer group

0 votes
asked Sep 28, 2022 in Question / help by anonymous

How to make the second ref fragment SecondaryErrorHandling(CommunicationError) within the alt fragment?

@startuml
hide footbox
hide unlinked

i2c -> app ++ : I2C request completed
app -> i2c : getI2CStatus(&result)

alt result == OK
  ref over app, app : I2CJobEndProcessing()
else
  ref over app, app  : SecondaryErrorHandling(CommunicationError)
end

@enduml

1 Answer

0 votes
answered Sep 28, 2022 by The-Lu (63,920 points)

Hello A.,

Could you use the new Teoz engine, as:

@startuml
!pragma teoz true
hide footbox
hide unlinked

i2c -> app ++ : I2C request completed
app -> i2c : getI2CStatus(&result)

alt result == OK
  ref over app : I2CJobEndProcessing()
else
  ref over app  : SecondaryErrorHandling(CommunicationError)
end
@enduml

But there is a minor overlapping on the 'else dashed line' and the 'ref.'!

See also this example:

@startuml
!pragma teoz true
hide footbox
hide unlinked

i2c -> app ++ : I2C request completed
app -> i2c : getI2CStatus(&result)

alt result == OK
  ref over app : I2CJobEndProcessing()
else
  |||
  ref over app  : SecondaryErrorHandling(CommunicationError)
end
@enduml

@PlantUML team: is it normal?

If that can help,
Regards.

commented Sep 28, 2022 by anonymous
Thanks for your suggestion but my current plantuml version is not support Teoz engine and I could not decide to use a newer plantuml. By putting the ref over app and dummy participant, it looks fine. I think i will stick to this first

@startuml
hide footbox
hide unlinked

i2c -> app ++ : I2C request completed
app -> i2c : getI2CStatus(&result)

alt result == OK
  ref over app, dummy: I2CJobEndProcessing()
else
  ref over app, app  : SecondaryErrorHandling(CommunicationError)
end
@enduml
...