@startuml
skin rose
skinparam ActivityFontSize 15
skinparam ArrowFontSize 12
start
:User executes add event command;

'Since the beta syntax does not support placing the condition outside the
'diamond we place it as the true branch instead.

if () then ([person exists])
    if () then ([no duplicates or clashes])
        :Add a new event to the person in the address book;
        :Returns result message with
        the event that has been added;
    else ([else])
        :Throw CommandException;
    endif
else ([else])
    :Throw CommandException;
endif
stop
@enduml