separate final nodes in activity diagram

0 votes
asked Dec 20, 2017 by JL
Lets take this example:

(*) --> "Activity1"

    if ("check parameters") then
    -->[true] "Parse file" as Parsing
    else
    ->[false -> exit with error code](*)
    endif

Parsing --> (*)

I want to have two separate final nodes (*). Now [false -> exit with error code] and Parsing connect to one final node.

How to do this?  

I could this with 'start' and 'stop'  but then 'as' command was not working.

1 Answer

0 votes
answered Dec 20, 2017 by Serge Wenger Work (6,820 points)

You use the old Activity syntax. With the new syntax (as is not necessary):

@startuml
start
:Activity1;
if (check parameters) then (true)
   :Parse file;
else (false -> exit with error code)
   stop
endif
stop
@enduml​

commented Dec 20, 2017 by JL
How in the new syntax I can refer to the activity in the other place of uml code? (like with "as" in the old syntax).
Otherwise I will need to nest multiple if statements which is not easy to read.
...