Unable to add arrow text description after backward keyword.

0 votes
asked Oct 4 in Question / help by wro02922 (760 points)

Is it possible to insert arrow text between "Warning" and "Foo" objects?

I cannot add an arrow text after backward keyword (dsc_4 overwrites dsc_3).

@startuml
start
->dsc_1;
repeat :foo;
->dsc_2;
:Submit;
->dsc_3;
backward :Warning; 
->dsc_4;
repeat while (Valid?) is (No) not (Yes)
->dsc_5;
stop
@enduml

PlantUML diagram

2 Answers

0 votes
answered Oct 4 by plantuml (232,260 points)
selected Oct 6 by wro02922
 
Best answer
This should not be too difficult to implement.

The most difficult part is to find a nice syntax and we are out of inspiration here :-)

Any suggestion ? Feel free to post some possible syntax examples!

Thanks
commented Oct 5 by wro02922 (760 points)

1. The description of the arrow to the 'backward' action is correctly located, i.e. dsc_4 should not overwrite dsc_3, which is related to the 'Submit' action.
2. The description back to the 'foo' action can be executed as for elsif, i.e.
(incoming description) elseif (condition) else (outgoing description)
3. I would apply the same approach to the while loop.
P.S.
If you find time, it would be worth updateing the elseif description in help, i.e. at the moment (incoming description) elseif is undocumented.

@startuml
start
->dsc_1;
(incoming description from backward) repeat :foo;
->dsc_2;
:Submit;
->dsc_3;
backward :Warning; 
->dsc_4;
repeat while (Valid?) is (No) not (Yes)
->dsc_5;
stop
@enduml


@startuml
start
->dsc_1;
(incoming description from backward) while (data available?)
  ->dsc_2;
  :read data;
  ->dsc_3;
  :generate diagrams;
  ->dsc_4;
backward :Warning; 
->dsc_5;
endwhile
stop
@enduml

Thanks

commented Oct 6 by plantuml (232,260 points)

Sure, you are right about point 1 :-)

This has been fixed with last beta http://beta.plantuml.net/plantuml.jar and on the online server.

For the other points, it would be nice if you could open new issues for each one. Thanks!

commented Oct 6 by wro02922 (760 points)
Many thanks. I will open a new feature requests.
0 votes
answered Oct 12 by plantuml (232,260 points)

We are still looking for a clear syntax.

With last official release, you have to use:

@startuml
start
->dsc_1;
repeat :foo;
 ->dsc_2;
 :Submit;
 ->dsc_3;
(->incoming) backward :Warning; (->outcoming)
repeat while (Valid?) is (No) not (Yes)
->dsc_5;
stop
@enduml

Any feedback welcome :-)

...