DocumentStatus

enum DocumentStatus : Enum<DocumentStatus> , KeyedEnum

Enum representing the status of a DraftDocumentEntity.

Below one can find a simple representation of the same flow, represented as document statuses:

       +------+------+
| INITIALIZED | <- Validation is run before initializing, an attempt won't be made if the input is invalid
+------+------+
|
|<--------------------------------+--------------------------------------------------+
| | |
| +--------------+---------------+ |
| | UPLOADING_PAUSED_NO_INTERNET | <retry count not reached>
v +--------------+---------------+ |
+-----+-----+ | +-------------+-------------+
| UPLOADING +---------------------------+--------------------+-------------->| UPLOAD_FAILED_RECOVERABLE |
+-----+-----+ | +-------------+-------------+
| | |
v | <retry count reached>
+-----+-----+ | |
| UPLOADED | | |
+-----+-----+ | |
|<----------+-------------------------+ | |
| | | | |
| +---------+---------+ +-------------+--------------+ | |
| | POLLING_TIMED_OUT | | POLLING_PAUSED_NO_INTERNET | | |
v +---------+---------+ +-------------+--------------+ | |
+-----+-----+ | | | |
| POLLING +-----+-------------------------+ | |
+-----+-----+ | |
| | |
|----------------------+ | |
| | | |
| | | |
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv FINAL STATES vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
| | | |
| | | |
v v v v
+---------+---------+ +---------+---------+ +--------------+--------------+ +------------+------------+
| PROCESSED_SUCCESS | | PROCESSED_FAILED | | UPLOAD_FAILED_UNRECOVERABLE | | REACHED_MAX_RETRY_COUNT |
+---------+---------+ +---------+---------+ +--------------+--------------+ +------------+------------+

Entries

PROCESSED_FAILED
Link copied to clipboard
PROCESSED_FAILED("PROCESSED_FAILED", isFinal, true)
DraftDocumentEntity has returned with an invalid response while long polling.
PROCESSED_SUCCESS
Link copied to clipboard
PROCESSED_SUCCESS("PROCESSED_SUCCESS", isFinal, true)
DraftDocumentEntity has successfully been long polled and has returned with a valid response
REACHED_MAX_RETRY_COUNT
Link copied to clipboard
REACHED_MAX_RETRY_COUNT("REACHED_MAX_RETRY_COUNT", isFinal, true)
DraftDocumentEntity has reached its maximum retry count while uploading or polling.
POLLING_PAUSED_NO_INTERNET
Link copied to clipboard
POLLING_PAUSED_NO_INTERNET("POLLING_PAUSED_NO_INTERNET")
DraftDocumentEntity has been uploaded to the API, and is now being actively long polled, but while polling the network was lost and could not be continued.
POLLING_TIMED_OUT
Link copied to clipboard
POLLING_TIMED_OUT("POLLING_TIMED_OUT")
DraftDocumentEntity has been uploaded to the API, and is now being actively long polled, but has timed out.
POLLING
Link copied to clipboard
POLLING("POLLING")
DraftDocumentEntity has been uploaded to the API, and is now being actively long polled.
UPLOAD_FAILED_UNRECOVERABLE
Link copied to clipboard
UPLOAD_FAILED_UNRECOVERABLE("UPLOAD_FAILED_UNRECOVERABLE", isFinal, true)
DraftDocumentEntity has failed to upload with what is deemed as unrecoverable error.
UPLOAD_FAILED_RECOVERABLE
Link copied to clipboard
UPLOAD_FAILED_RECOVERABLE("UPLOAD_FAILED_RECOVERABLE")
DraftDocumentEntity has failed to upload with what is deemed as recoverable error.
UPLOADED
Link copied to clipboard
UPLOADED("UPLOADED")
DraftDocumentEntity has been uploaded to the server and now qualifies to be polled.
UPLOADING_PAUSED_NO_INTERNET
Link copied to clipboard
UPLOADING_PAUSED_NO_INTERNET("UPLOADING_PAUSED_NO_INTERNET")
DraftDocumentEntity has begun the upload step, but has no internet access to continue.
UPLOADING
Link copied to clipboard
UPLOADING("UPLOADING")
DraftDocumentEntity has been begun the upload step which involves posting to the API and awaiting a response.
INITIALIZED
Link copied to clipboard
INITIALIZED("INITIALIZED")
DraftDocumentEntity has been created in the DraftDocumentDatabase.

Types

Companion
Link copied to clipboard
object Companion

Properties

isFinal
Link copied to clipboard
val isFinal: Boolean = false
key
Link copied to clipboard
open override val key: String
name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int