Notes on conditionnal elements

+1 vote
asked Jun 25, 2016 in bug by legz (510 points)

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!

commented Jun 29, 2016 by legz (510 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
answered Jul 1, 2016 by plantuml (134,570 points)
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,
commented Jul 2, 2016 by legz (510 points)
Thanks!

Do you prefer that I open a new 'wanted feature' ticket for the remaining point or I leave this one open?
commented Jul 4, 2016 by legz (510 points)
Oups, this fix breaks the forks notes, see the more complete answer.
0 votes
answered Jul 4, 2016 by legz (510 points)

@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.
commented Jul 4, 2016 by plantuml (134,570 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,
commented Jul 5, 2016 by legz (510 points)
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.
commented Jul 5, 2016 by plantuml (134,570 points)
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.
commented Jul 5, 2016 by legz (510 points)
Ok, thanks for the tip. I will correct my diagrams.
...