PASIprep Long Running Request Guidelines
Loading Indicator
A loading indicator should show up anytime a server request is made by the screen and it should remain until the server operation is finished (i.e. server has returned a response).
If there are multiple outstanding requests, the indicator must be visible until all requests are completed.
See the Loading Indicator on details on the appearance and behavior of the loading indicator.
Types of Requests
Server operation requests can be characterized as follow:
Bulk vs Single
Bulk operations involves multiple calls to the server to perform the operation. These operations can be represented with a determinate progress bar in the Loading Indicator as the UI can determine how many % of the server calls have completed.
Single operation involves using a single call to the server to perform the operation. These operations are represented with an indeterminate progress bar in the Loading Indicator as the UI cannot determine how long the operation can take.
Retrieval vs Submission
Retrieval operations are calls for retrieving information from the server to display on screen. Generally in 'normal' usage scenarios, these calls should not produce errors.
Submission operations are calls for saving data to PASI and they result in changes to data. Errors (e.g. validation rule rejections) may occur as a result that user may need to be informed of.
Handling Long Running Requests
In PASIprep, if an operation is taking a long time to complete, it is possible for user to navigate away from the screen without waiting for the operation to complete.
To avoid user executing too many multiple operations before they are completed, when user triggers an operation to occur, all action buttons/function links (especially Submission type operations) are recommended to be disabled on screen so user cannot execute more operations. When the operation(s) completes, then the buttons/functions should be re-enabled as needed.
Only retrieval bulk type operations will be cancellable by the user through the Loading Indicator.
When a retrieval type (bulk or single) operation is running and user navigates away from the screen, it is presumed that user no longer needs the results of the operation and thus the operation can be quietly dropped behind the scenes (any errors resulting from the operation can also be dropped quietly)
When a submission type operation is running, it should not be cancellable by the user or by the screen. If user navigates away from the screen, the operation will continue. When the operation completes, if there are service-level errors (e.g. validation rule errors) from the operation, it'll be displayed to the user in an error message panel (regardless of what screen they are currently on). These error messages will be prefixed with “Error from {operation}:” where {operation} is the operation name shown in the Loading Indicator for the operation.