Statuses
Deposit Services primarily acts on three types of resources: Submission
, Deposit
, and RepositoryCopy
. Each of these resources carries a status. Managing and reacting to the values of resource statuses is a major function of Deposit Services.
Abstractly, Deposit Services categorizes the value of any status as either intermediate or terminal.
It isn't clear, yet, whether this abstract notion of intermediate and terminal need to be shared amongst components of PASS. If so, then certain classes and interfaces in the Deposit Services code base should be extracted into a shared component.
A terminal status means the resource has completed its workflow and reached the end. No additional state changes are expected, and the resource is considered final and read-only.
An intermediate status means the resource is still in progress within its workflow and has not yet reached completion. The resource is expected to be modified until it achieves a terminal status.
A general pattern within Deposit Services is that resources with terminal status are explicitly accounted for (this is largely enforced by policies which are documented elsewhere), and are considered "read-only".
Submission Status
Submission status is enumerated in the AggregatedDepositStatus
class. Deposit services considers the following values:
NOT_STARTED
(intermediate): Incoming Submissions from the UI must have this status value.IN_PROGRESS
(intermediate): Deposit services places the Submission in anIN_PROGRESS
state right away. When a thread observes aSubmission
in this state, it assumes that another thread is processing this resource.FAILED
(intermediate): Occurs when a non-recoverable error happens while processing theSubmission
.ACCEPTED
(terminal): Deposit services places the Submission into this state when all of itsDeposit
s have beenACCEPTED
.REJECTED
(terminal): Deposit services places the Submission into this state when all of itsDeposit
s have beenREJECTED
.
Deposit Status
Deposit status is enumerated in the DepositStatus
class. Deposit services considers the following values:
SUBMITTED
(intermediate): the custodial content of theSubmission
has been successfully transferred to theDeposit
sRepository
.ACCEPTED
(terminal): the custodial content of theSubmission
has been accessioned by theDeposit
'sRepository
, i.e. custody of theSubmission
has successfully been transferred to the downstreamRepository
.REJECTED
(terminal): the custodial content of theSubmission
has been rejected by theDeposit
'sRepository
, i.e. the downstreamRepository
has refused to accept custody of theSubmission
content.FAILED
(intermediate): the transfer of custodial content to theRepository
failed, or there was some other error updating the status of theDeposit
.
RepositoryCopy Status
RepositoryCopy status is enumerated in the CopyStatus
class. Deposit services considers the following values:
COMPLETE
(terminal): a copy of the custodial content is available in theRepository
at this location.IN_PROGRESS
(intermediate): a copy of the custodial content is expected to be available in theRepository
at this location. The custodial content should not be expected to exist until theDeposit
status isACCEPTED
.REJECTED
(terminal): the copy should be considered to be invalid. Even if the custodial content is made available at the location indicated by theRepositoryCopy
, it should not be mistaken for a successful transfer of custody.
RepositoryCopy status is dependent on the Deposit
status. They will always be consistent. For example, a RepositoryCopy
cannot be COMPLETE
if the Deposit is REJECTED
. If a Deposit
is REJECTED
, then the RepositoryCopy
must also be REJECTED
.
Common Permutations
There are some common permutations of these statuses that will be observed:
ACCEPTED
Submission
s will only haveDeposit
s that areACCEPTED
. EachDeposit
will have aCOMPLETE
RepositoryCopy
.REJECTED
Submission
s will only haveDeposit
s that areREJECTED
.REJECTED
Deposit
s will not have anyRepositoryCopy
at all.IN_PROGRESS
Submission
s may have zero or moreDeposit
s in any state.FAILED
Submission
s should have zeroDeposit
s.ACCEPTED
Deposit
s should have aCOMPLETE
RepositoryCopy
.REJECTED
Deposit
s will have aREJECTED
RepositoryCopy
.SUBMITTED
Deposit
s will have anIN_PROGRESS
RepositoryCopy
.FAILED
Deposit
s will have noRepositoryCopy
.
Last updated