1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
@startuml
start
partition "Upload Modified File" {
:Initialize API Instance;
:Check for Dry Run;
if (Is Dry Run?) then (yes)
:Create Fake Response;
else (no)
:Get Current Online Data;
if (Error Fetching Data) then (yes)
:Handle Errors;
if (Retryable Error?) then (yes)
:Retry Fetching Data;
detach
else (no)
:Log and Display Error;
endif
endif
if (filesize > 0 and valid latest online data) then (yes)
if (is online file newer) then (yes)
:Log that online is newer;
:Perform safe backup;
note left: Local data loss prevention
:Upload renamed local file as new file;
endif
endif
:Determine Upload Method;
if (Use Simple Upload?) then (yes)
:Perform Simple Upload;
if (Upload Error) then (yes)
:Handle Upload Errors and Retries;
if (Retryable Upload Error?) then (yes)
:Retry Upload;
detach
else (no)
:Log and Display Upload Error;
endif
endif
else (no)
:Create Upload Session;
:Perform Upload via Session;
if (Session Upload Error) then (yes)
:Handle Session Upload Errors and Retries;
if (Retryable Session Error?) then (yes)
:Retry Session Upload;
detach
else (no)
:Log and Display Session Error;
endif
endif
endif
endif
:Finalize;
}
stop
@enduml
|