Tags |
When the REST API handles a application/vnd.crossref.deposit+xml
deposit created via a POST to /deposits
the following process is carried out:
graph LR; createDeposit(1. create-deposit!); beginHandoff(2. begin-handoff!); performXmlDeposit(3. perform-xml-deposit-handoff); depositFail(4. failed!); depositSuccess(4. end-handoff!); depositUpdateMessageHandler(5. Deposit Update Message Handler); createDeposit-->beginHandoff; beginHandoff-->performXmlDeposit; performXmlDeposit-- Deposit Failed -->depositFail; performXmlDeposit-- Deposit Succeeded -->depositSuccess; depositSuccess-->depositUpdateMessageHandler click depositUpdateMessageHandler "../../deposit-update-message-handler" "Deposit Update Message Handler";
create-deposit!
- Creates a new deposit in MongoDB with ahandoff.status
ofincomplete
begin-handoff!
- Begins the handoff to doi.crossref.org, this doesn’t impacthandoff.status
but is used to track failure and retry countperform-xml-deposit-handoff
- Carries out the deposit using doi.crossref.org
If the deposit to doi.crossref.org has failed:
failed!
- Marks the handoff as complete and updatesstatus
tofailed
, notestatus
nothandoff.status
.status
indicates the deposit actually failed, not that there was an issue with the handover that can be retried
If the deposit to doi.crossref.org is successful:
end-handoff!
- Marks the handoff as complete and updateshandoff.status
tocompleted
- https://gitlab.com/crossref/deposit_update_message_handler monitors the mailbox associated with deposits made via the REST API, if there are any errors reported then it updates the deposit
status
tofailed
, otherwise tocompleted