Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Notes on conditionnal elements

0 votes

Hi,

I'm not sure if I should put this report in "Bugs" or "Wanted features", but here are some observations concerning the notes on conditionnal elements :

@startuml

start
note: note #1
:Activity #1;
note: note #2

if (foo?) then (yes)
note: note #3
  :Activity #2;
  :Activity #3;
  note: note #4

else (no)
  :Activity #4;
endif
note: note #5
stop

@enduml

 

  • "note #3" is not directly on the decision item. Is it possible to put notes on a "if" item? It would be very usefull IHMO. (wanted feature?)
  • "note #5" is linked to the "Activity #4" item, although the note declaration is after the "endif". Looks like a bug to me.

Thanks!

asked Jun 25, 2016 in bug by legz (490 points)
Same bug with a note after a fork :
@startuml
start
fork
    :Activity 1;
fork again
    :Activity 2;
end fork
note:my note
@enduml

Image here: http://www.plantuml.com/plantuml/img/SoWkIImgAStDuG8p5BZIyekokHI0mCenkIIpBBEaKi7G6Yoga9YUc9c79cTapPMQbw80rfMNNv9gbLkf0AAv783286C1

2 Answers

+1 vote
Thanks for your report.

Those bugs have been partially solved in last beta.
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

The issue that remains is: how to connect some note to a "if" or a "fork" ?

We are looking for a nice way of connecting the note to either the starting diamond of the "if",
the ending diamond of the "if" or the synchronized black bar of a "fork".

It's both a question about graphical design and about our internal Java code design.

So we're still working on the question...

Regards,
answered Jul 1, 2016 by plantuml (124,290 points)
Thanks!

Do you prefer that I open a new 'wanted feature' ticket for the remaining point or I leave this one open?
Oups, this fix breaks the forks notes, see the more complete answer.
0 votes

@PlantUML team : I think there is a regression with this beta :

@startuml
start
fork
    :Activity A;
    note:note on activity A
fork again
    :Activity B;
    note:note on activity B
    :Activity C;
end fork
stop
@enduml
 
Stable :
Beta :
 
Notes on "fork again" branch are considered as global notes.
answered Jul 4, 2016 by legz (490 points)
Ok, thanks for the report!
We've just publised V8045 which should fix this.
Do not hesitate to post if you find issues!
Regards,
Thanks for the fix.
By the way, there is still a little bug with notes on "fork": http://www.plantuml.com/plantuml/uml/Aov9B2hXIiilokRAooz9jG8H2lbv2c0H1I2mSamkoIpBBAbKSBG62w0eIuHBWirGI4nFpCn3q-U4JvyJcc9dQwxKl1I8zSKb-GK0

The note is in the flow instead of being on the left of the fork flow.
The idea is to put the note after "end fork" command:

@startuml
start
fork
    :Activity A;
    note:note on activity A
fork again
    :Activity B;
    note:note on activity B
    :Activity C;
end fork
note:note on fork
stop
@enduml

http://www.plantuml.com/plantuml/uml/Aov9B2hXIiilokPI008hn-IIpBBCaae5HskmG5v-IQeLY538prD8X4k2TIWafYTcvg7fSyAdpmbDiRCrLsfUYWBOUXGTO97Yalm20000

We still have the issue of connecting the note to the fork itself.
Ok, thanks for the tip. I will correct my diagrams.
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...