In principle it could be nice to have one websubmit function that take one
parameter which would be the new value to be put in 980, and having such
submission function taking care of preparing marcxml and triggering bibupload,
etc.
I don't know the internals of your functions, but as i understand it,
there could a workflow where SBI creates -as usual- the xmlmarc and
puts the correct collection in your 980 (at least my implementation
takes doctype and categformat and puts them into 980). From there, in
order to "appove" it you only have to take out the restriction bit
(which, i suppose, is easily done with either direct access to the
appropriate table, or, even better with a temp .xml file and bibupload)
and a change in sbmAPPROVAL table...
Even if your workflow initially puts all pending docs in a 'hidden'
collection, you could put the correct doctype in another local field
(let's say 989), and then when you approve it, just create a temp .xmp
file and use bibupload in 'correct' mode to replace the old 980 with
the value(s) from 989.
Another similar approach would be for the approve function to remove a
'magic' string (in the already complete record) similar to DELETED,
which, when present, the record is not displayed/counted in the
respective collections and is accessible only by the librarians who
have the 'approve' right for that collection...
This way the approve function can be very generic and no parameter
passing (for the collection code) is needed.
Just my two cents :)
Cheers,
Theodoros