Activity Diagram: 'no'arrow going all the way back to the start

0 votes
asked Dec 18, 2023 in Question / help by KrisBB (120 points)

We are currently working on a set of user stories which we are trying to illustrate using activity diagrams.  We have ended up with a diagram where we would like one of the last arrows to go back up to the start of the diagram.  I've copied in the code below, and here is the link to the diagram (I hope, this is my first time posting to the forum): https://shorturl.at/pxy35

Please do let me know if I'm not posting this correctly, I'm happy to edit/redo!

@startuml

title User Flow: Validation check
:...;
:Initial schema has been created;
  while (\nVALIDATION CHECK) is (Validation failed)
    :System shows "Validation failed"
    Missing fields are highlighted;
    if (V2: System asks user if they want to save only or submit) then (V2: Save only)
      #White:User clicks "Save Draft";
      end
    else (Save and Submit)
      :User clicks "Save and Submit Schema";
    endif
  end while (Validation successful)
:System shows UI with schema for user confirmation;
  while (User decides whether schema is correct) is (Incorrect schema)
    :User clicks "Edit";
    :User clicks "Continue";
'Arrow from "User edits definitions" should go back up to VALIDATION CHECK      

floating note right
    Arrow should go back to 
    VALIDATION CHECK at the top
    and not 'User decides whether...'
end note
   end while (Correct schema)
   :User clicks "Save and Submit Schema";
:...;

@enduml

commented Dec 18, 2023 by The-Lu (64,760 points)

Hello K., and all,

Here is a not so good workaround... wink, using label/goto, as:

@startuml
title User Flow: Validation check
:...;
:Initial schema has been created;
  while (\nVALIDATION CHECK) is (Validation failed)
    :System shows "Validation failed"
    Missing fields are highlighted;
    if (V2: System asks user if they want to save only or submit) then (V2: Save only)
      #White:User clicks "Save Draft";
      end
    else (Save and Submit)
      :User clicks "Save and Submit Schema";
      label l
    endif
  end while (Validation successful)
:System shows UI with schema for user confirmation;
  while (User decides whether schema is correct) is (Incorrect schema)
    :User clicks "Edit";
    :User clicks "Continue";
'Arrow from "User edits definitions" should go back up to VALIDATION CHECK      
    goto l
   end while (Correct schema)
   :User clicks "Save and Submit Schema";
:...;
@enduml

Enjoy,
Regards,
Th.

commented Dec 19, 2023 by skb

Hi Th smiley

Thank you for the answer! 

Do you know a way of making the line black like the rest of the arrows? 

All the best, 

Skb

 

commented Dec 19, 2023 by The-Lu (64,760 points)

Hi S., and all,

Unfortunately not yet, it's always a wanted feature, see similar request here:

Awaiting this wanted feature, a simple workaround will be to change manually on an editor (sorry for that)...

Regards,
Th.

commented Dec 19, 2023 by skb

Hi again, 

That's unfortunate! But thank you for your getting back to us so quickly smiley 

All the best, 

Skb

1 Answer

0 votes
answered Dec 19, 2023 by Skb

An alternative route, we have tried out is to use repeat, which gives us almost what we want, except an arrow from "User clicks "Continue" to "User clicks "Save and Submit Schema". 

Is there a way to remove that one arrow? 

@startuml

title User Flow: Validation check

:...;

:Initial schema has been created;

repeat

while (\nVALIDATION CHECK) is (Validation failed)

:System shows "Validation failed"

Missing fields are highlighted;

:User completes/edits definitions;

if (System asks user if they want to save only or submit) then (Save only)

:User clicks "Save Draft";

end

else (Save and Submit)

:User clicks "Save and Submit Schema";

endif

end while (Validation successful)

:System shows UI with schema for user confirmation;

if (User decides whether schema is correct or needs editing) then (Correct Schema)

break

endif

->Incorrect Schema;

:User clicks "Edit";

repeat while (User clicks "Continue"\n IGNORE ARROW UNDER THIS)

:User clicks "Save and Submit Schema";

:...;

@enduml

...