Hi there, Add the recid to the sip.metadata (which create_recid() will do for you). If you jsonalchemy is setup correctly, it should include 001 tag with the recid in the generated marcxml available in sip.package, and upload_record_sip will run bibupload -r. This you will usually just run after the user hits submit, and thus there's not much difference from waiting until bibupload runs, except making your life easier, by already having the link.
Yeah, probably my jsonalchemy is not doing something, because the recid is not included in the generated marcxml. No. First generate recid, stick in sip.metadata, then generate marcxml and stick in sip.package, then bibupload -r. The sip can't and shouldn't be edited after it's been given to bibupload. Ok, that's done except for including the recid in the marcxml. I tried Tibor's approach, but the thing is that bibupload delays the records...I mean, the recid would be successfully assigned after the record is created (in theory), but since bibupload/bibsched schedules their insertion, they stand waiting on queue and when I query the last record inserted it usually isn't the last submitted one. Anyway, I think I'll take a look on the jsonalchemy stuff to check why the recid isn't being included in the marcxml. Cheers, Pedro