Why is the first alt (condition) is not being shown, while the else is being nested with the other nested alt

0 votes
asked Mar 30, 2023 in Question / help by ALAAED (120 points)

Diagram preview

and this is the script for it: 


actor User

participant App

participant Server

participant Store

User -> App: Login

App -> Server: Request Role

alt Role == VervangIdentiteit

Server -> App: Show Switch User Button

User -> App: Request user switch

App -> Server: Make data API call with student UPN

Server --> App: Return The Response

alt Response Status is Success

App -> Store: Move User Data to Impersonator Store

App -> Server: Deregister From Push Notifications

App -> Store: Clear User Store

Store -> Server: Add Student UPN As Header to Network Calls From Impersonator Store

Server --> App: Redirect to Home Page

App -> Server: Fetch Impersonated Student Data

else Response Error is Error

alt Response is Unauthorized

Server -> App: Show You Do Not Have The Right Message

else Response is Other Error

Server -> App: Show Generic Error Message


else Role == Student

Server -> App: Show Regular User Interface


User -> App: Clicks Revert to Myself Button

App -> Store: Move Impersonator Store to User Store

App -> Store: Clear Impersonator Store

Store -> Server: Remove Student UPN From The Headers

App -> Server: Register for Push Notifications

Server --> App: Redirect to Home Page

App -> Server: Fetch User Data


1 Answer

0 votes
answered Mar 30, 2023 by Serge Wenger Work (15,620 points)


You have 3 alt and only 2 end. 

Click on image to show the code