11

How can I create right-directed arrow in the PlantUML new Activity Diagram syntax?

Using the old syntax, I can use -right->, but I don't find any similar notation from the new syntax guide. How can you achieve the same result with the new syntax? I need to use the new syntax because of its Swimlane support.

Example of diagram with right arrow using old syntax:

@startuml
(*) --> "An Activity"
-right->  "Another Activity"
--> (*)
@enduml

Diagram generated using above code

Thanks.

Peter Uhnak
  • 9,617
  • 5
  • 38
  • 51
ryanfadholi
  • 111
  • 1
  • 4
  • As far as I know this is still not possible, and I haven't seen it in incubation either ( http://plantuml.com/incubation ). – Peter Uhnak Aug 19 '17 at 16:07

2 Answers2

4

In theory based on the documentation of PlantUML and its source code this should work:

@startuml
start
:An Activity;
-right->
:Another Activity;
stop
@enduml

But I try it in the online editor of it and the result is different: http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuG8pkAmSynGSaqioop9BAgsvT8ioqpDATEr0mlab6Qb523cW-lm2BeVKl1IWPW00

Because other formatting can be used (e.g. blue, dashed arrow) I don't understand why this is not working. Maybe this should be reported as a bug to the developers of PlantUML.

-4
@startuml
(*) --> "An Activity"
->  "Another Activity"
--> (*)
@enduml

Worked for me. -> is for right, --> is for down.

This does seem to only work when activities are named with quotation marks. When they are named with :x; syntax, this does not work

Tim Diekmann
  • 7,755
  • 11
  • 41
  • 69
Jack G
  • 96
  • 9
  • This is the old syntax, not the new as OP asked for. `->` is simply a shorter line than `-->` and not for right/down as you claim. – Zimano Jul 18 '19 at 12:03