Hi Pedro,

1) Generating recid prior to upload:
It all depends on the workflow and what you else you need to do. E.g. in Zenodo I need to know the recid prior to uploading, because I use the recid to generate a DOI which goes into the marcxml. Also, knowing the recid before bibupload runs, allows me to quickly generate a preview and record link to the soon to be uploaded record which I can display to the end-user right after they hit submit. In another workflow, it might be fine not to know the recid until after bibupload has been running.

2) JSONAlchemy: All the workflows should be moved to invenio-demosite, where you should have the recid (https://github.com/inveniosoftware/invenio-demosite/blob/pu/invenio_demosite/recordext/fields/atlantis.cfg#L698). It's WIP at the moment, and Esteban should soon have some changes coming in for JSONAlchemy. I.e. you should install invenio-demosite on top of Invenio as well, and we should move the workflows out of Invenio to invenio-demosite.

Does that answers your questions?

Cheers,
Lars
On 14.03.2014 17:42, Pedro Miguel Paiva Gaudencio wrote:
Hi Lars,

I got the deposit submission upload thingy working, just some things left (I think/hope): the marcxml is generated without the 001 (record id - bibupload runs in -r mode in upload_record_sip() and fails because the recid was previously created) and 980(collection information ["article", "book", "preprint", "report", etc] - which hides the record by default) fields.

I understood that the recid it's not supposed to be present in the new records' marcxml, but if I don't generate the recid (reserved_recid()and create_recid()) the workflow will fail when he gets to run_tasks().

I also understood (not quite sure if I'm right) that when we upload the new deposition, it will be generated a marcxml file from the json that the sip contained.

I checked the jsonalchemy.get_producer_rules() and it does not contain any rule for the 'recid', and so this is pobably why it's not being generated (from the json) along with the rest of the xml (on jsonalchemy.wrappers.legacy_export_as_marc()).

For the upload of new records to work peacefully we need to:

  * add the 001 (adding rules for 'recid' in the producer rules?) and
    980 fields to the marcxml?
  * add only the 980 field and always upload_record_sip() in -i mode?


Do we need the recid already reserved and created in the sips for the new records before the upload (since when a new record is inserted by bibupload a recid is created for that record)? If so, why?


This is my workflow (note that I'm only uploading new records and never editing existing submissions):

 1. prefill_draft(draft_id='default'),
 2. render_form(draft_id='default'),
 3. prepare_sip(),
 4. reserved_recid(),
 5. create_recid(),
 6. process_sip_metadata(process_recjson_new),
 7. finalize_record_sip(),
 8. upload_record_sip(),
 9. run_tasks(update=False)


Sorry about the extensive reading.

Thanks in advance,
Pedro


--
Lars Holm Nielsen
CERN, IT Department, Collaboration & Information Services
http://zenodo.org | Tel: +41 22 76 79182 | Cel: +41 76 672 8927

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to