Subworkflow – Add WRLC Retention
This subworkflow applies a WRLC retention commitment to a specified item by setting the retention-related fields in Alma for a given barcode and institution.
At a glance
-
Status:
InactiveActive (parent workflow is Active) -
Applies consortium-wide?:
YesYes -
Runs on: Alma Institution Zones via Network
routingrouting -
Trigger: Executed by another workflow (subworkflow only; no independent trigger)
-
Primary outcome:
Marks an item as committed toApplies WRLC retentionintoAlma.the item and, when eligible, records the commitment on the Network Zone bibliographic record. -
Who receives results: No direct output; results are returned to the calling workflow.
Why this exists
WRLC retention commitments are recorded at the item level in Alma using structured retention fields. When an item is designated for WRLC retention, those fields must be setrecorded consistently acrosson institutions.
items. For items whose bibliographic records are linked to the Network Zone, the commitment can also be represented by a 583 field on the shared bibliographic record. This subworkflow standardizesgives how retention commitments are applied, ensuring that parentcalling workflows can add WRLC retention flags in a consistent and reusable way withoutto duplicatingmake logic.those updates.
What it does
-
- Receives
inputaBarcodeandInstitution Codefrom aparentcallingworkflow.workflow. PreservesUses theincominginstitution code to route item retrieval and updates to the appropriate Alma Institution Zone.- Retrieves the item and sets Committed to Retain to Yes and Retention Reason to
WRLCRetentionDONOTDELETE(WRLC Retention). - Clears the item’s Retention Note only when its current value is exactly
Duplicate. Other retention notes are preserved. - Saves the updated item, then retrieves its Institution Zone bibliographic record to check for a Network Zone link.
- If the record is linked to the Network Zone and the institution code is not
01WRLC_SCF, looks up the institution’s OCLC code and adds a 583 retention field to the Network Zone bibliographic record. - Returns the barcode and institution code
for reporting. Routesat theAPIendcall toof thecorrectNetworkAlmaZoneInstitutionupdateZone.path.Retrieves the item by barcode.Sets WRLC retention-related fields.Writes the updated item back to Alma.Returns the updated item data to the calling workflow.
- Receives
Where it runs
-
- Alma IZ(s):
- Selected
Dynamically determined via_institutionCodepasseddynamically from theparentsuppliedworkflow.InstitutionCode;
01WRLC_SCF. Systems touched:
Alma
bibliographicAPIs (itemretrievalandupdate)APIs; Alma Network
theroutingrouting;nodeLibOW
Reports / queries used:
None.None
- Alma IZ(s):
How it works
Logic overview
1. Trigger (Subworkflow Execution)
- A
Startscallingviaworkflow“WhensuppliesExecuted by Another Workflow.” Requires input fields:Barcodeand Institution Code.
- The workflow
If these fields are missing,retrieves the item in the selected Institution Zone. It applies the WRLC retention values and saves the item. A retention note of exactly Duplicate is cleared; any other note remains.
record.
2.It Preserveproceeds Input
Thea “StashNetwork barcode”Zone update only if the linked record type is NZ and the supplied institution code node:
- not
01WRLC_SCF.Copies:
- eligible record, it retrieves the institution’s OCLC code from the WRLC Institution Information data table, retrieves the Network Zone bibliographic record, adds a 583 field, and saves the record. The field includes the OCLC code, the supplied barcode, and the workflow’s configured retention statement.
that update, the final node returns Barcode
Institution Code
Stores them internally as:
_inputBarcode_institutionCode
This ensuresto the calling workflow can reference the original input values for error handling or reporting.
3. Route to Correct Institution
The Alma Network node:
Uses_institutionCodeto dynamically select the appropriate Institution Zone.workflow.Does not target all network members.
⚠️ If _institutionCode is incorrect or missing, the API call may fail or affect the wrong IZ.
4. Retrieve Item
Calls Alma API:GET /almaws/v1/itemsUses the provided barcode.
Always outputs data (even on error), allowing the parent workflow to handle failures.
5. Apply WRLC Retention Fields
The “Add WRLC Retention Code” node updates:
item_data.committed_to_retainSetsvalue = trueSetsdesc = "Yes"
item_data.retention_reasonSetsvalue = WRLCRetentionDONOTDELETESetsdesc = "WRLC Retention"
item_data.retention_noteSets to empty string
⚠️ Important behaviors:
This workflowdoes not validatewhether the item is already marked as retained.It forcibly sets the retention-related fields.It assumes the Alma item structure includes:item_data.committed_to_retainitem_data.retention_reason
If Alma’s API structure changes, this node may fail.
6. Update Item
Calls Alma API:PUT /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}
Writes the modified item back to Alma.
If results exist
The item is marked
as committed tofor WRLC retention. If - the
Retentionbibliographicreasonrecordisalsosetmeets the Network Zone conditions, the workflow adds a 583 field toWRLCRetentionDONOTDELETEthat(WRLCrecord.Retention).The workflow contains no check for an existing matching 583 field before adding one. Updated item JSON is returned to the parent workflow.No independent notifications are sent.
If no results
If the
barcodebibliographic record isinvalidnot linked to the Network Zone, orretrievalthefails:institution code is01WRLC_SCF, the Network Zone update path does not run. The item update has already been attempted, but that path has no separate final output node.- retrieval,
item update, and the retention code nodes are configured to continue with regular output on error. The export does not establish that a missing item or failed update will be handled successfully; the calling workflow
stillshouldoutputs data (due tocontinueRegularOutput). Error handling must be managed byinspect theparentresult.workflow.An error workflow is configured, but its behavior is Unknown (not in workflow export).
Item
- retrieval,
Artifacts produced
- An
Updatedupdated Alma item record with the WRLC retentionapplied.values. - When
eligible, an updated Network Zone bibliographic record with an added 583 field.
- No files, sets,
reports,spreadsheets, or email notifications.