Activity Diagram: More then one stop states

0 votes
asked Dec 16, 2014 in Bug by anonymous

Hi,

If I do this:

(*) --> "Something" as A1
    -right-> "Error state" as E1
A1 --> "Other thing" as A2
--> (*)

I get a properly aligned diagram, with A1 and A2 as the "trunk" and E1 as a branch. However, If i do this:

(*) --> "Something" as A1
    -right-> (*)
A1 --> "Other thing" as A2
--> (*)

 

I get a weird cyclic graph with both A2 and A1 pointing to the same halting state. Is there a way to have more than one halting points such that I would get the same layout as on the previous example, that is, A1 pointing to one halting state and A2 pointing to another one? I have a diagram with several exit conditions and it renders as an unreadable graph using the old syntax and a really large diagram with several sync points using the new syntax...

1 Answer

0 votes
answered Dec 17, 2014 by plantuml (294,540 points)

We are not supposed to change the "old" syntax.
However, since the modification is pretty simple, we have included a slight change in the last beta:
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

With this version, you can add an optional number to a stoping state, like in the following example:

@startuml
(*) --> "Something" as A1
-right-> (*1)
A1 --> "Other thing" as A2
--> (*2)
@enduml


Is it what you are expecting ?

However, we would be interested by your really large diagram with several sync points using the new syntax:
it would help us to improve the new syntax.
You can send it to us by mail if you do not want to publish it.

Thanks again,

commented Jan 5, 2015 by plantuml (294,540 points)
This has been released in V8016.
Regards
commented Apr 17, 2019 by sbrett9 (100 points)
Any chance this could be added to State Machine diagrams as well?
commented Feb 12 by Jonas

Yes please add this to State diagrams as well!

Never mind, I just found an easy workaround when I read about Stereotypes in the "State Diagram syntax and features" documentation. An example:

@startuml

left to right direction

title Example Ticket Status Diagram

[*] --> Created

state Active {
    state end1 <<end>>
    state end2 <<end>>
    state end3 <<end>>
    state end4 <<end>>
    Ongoing -left-> end1
    OnHold -left-> end2
    ToDo -left-> end3
    WorkDone -left-> end4
    Created --> Ongoing
    Created --> OnHold
    Created --> ToDo
    Created --> WorkDone
}

state Inactive {
    Archived -up-> Ongoing
    Archived -up-> OnHold
    Archived -up-> ToDo
    Archived -up-> WorkDone
    Archived --> Deleted
    Deleted --> [*]
}

Ongoing --> Archived
OnHold --> Archived
ToDo --> Archived
WorkDone --> Archived

@enduml

...