How to generate right-direction arrow using PlantUML new Activity Diagram syntax?
Asked Answered
S

2

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.

Sacral answered 19/8, 2017 at 15:54 Comment(1)
As far as I know this is still not possible, and I haven't seen it in incubation either ( plantuml.com/incubation ).Atreus
E
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.

Eulalie answered 25/10, 2018 at 13:51 Comment(0)
D
-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

Derrik answered 2/7, 2018 at 12:40 Comment(1)
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.Discontinue

© 2022 - 2024 — McMap. All rights reserved.