Subworkflow – Remove WRLC Retention
This subworkflow removes WRLC retention commitments from a specified item by clearing retention-related fields in Alma for a given barcode and institution.
At a glance
-
Status: Inactive (parent workflows are Active)
-
Applies consortium-wide?: Yes (
-
Runs on: Alma Institution Zones via Network
routingrouting -
Trigger: Executed by another workflow (subworkflow only; no independent trigger)
-
Primary outcome: Clears
WRLCthe item’s retentionindicatorscommitmentfromandanreason,itemandrecordremovesinaAlma.matching NZ 583 field when applicable -
Who receives results: No direct output; results are returned to the calling workflow.
Why this exists
WRLC retention commitments are recorded aton Alma items and, for bib records linked to the itemNetwork levelZone, may also be recorded in Alma. When a retention583 commitmentfield needson tothe beNZ removedbib. (for example, as part of a broader retention management process), thisThis subworkflow standardizes how those fields are cleared.
By isolating this logic into a reusable subworkflow,gives parent workflows cana consistent way to remove retentionthose datarecords consistentlywhen acrossa institutionscommitment withoutis duplicating code.withdrawn.
What it does
Receives
inputBarcodeandInstitution Codefromatheparentcallingworkflow.workflow.- Uses
PreservesInstitution Codeto route theincomingitembarcodelookup andinstitution code for error reporting.
Routes the API callupdate to the correctappropriate Alma Institution Zone.
Retrieves the item by barcode, sets committed_to_retain to No, and clears retention_reason.
Institution Code is not 01WRLC_SCF, retrieves the NZ bib and removes a 583 field whose $x matches the input barcode. It then updates the NZ bib.
-
commitmentClearsThe subworkflow does not clearretention_note. It also does not check whether the item currently has a WRLCretention-relatedretentionfields.
Writes the updatedits item back to Alma.
Returns the updated item data to the calling workflow.fields.
Where it runs
-
Alma
IZ(s):IZ: Dynamically determined via_institutionCodepasseddynamically from theparentinputworkflow.Institution Code; the workflow does not run across all network members.
Alma NZ: Updated only when the item’s IZ bib is linked to the NZ and the institution code is not 01WRLC_SCF.
Systems touched:
Alma APIs (item retrieval and update)
Alma Network routingrouting, nodeand the WRLC Institution Information data table.
Reports / queries used: None
How it works
Logic1. overviewInput and routing
1. Trigger (Subworkflow Execution)
Starts viaThe “When Executed by Another Workflow.”Workflow”
Requiresthrough the input fields:
workflow. The expected fields are Barcode
Institution Code
If these fields are missing, the workflow will fail or route incorrectly.
2. Preserve Input
The “Stash barcode” code node:
Copies:
Barcode
Institution Code
Stores them internally as:
_inputBarcode
_institutionCode
This ensures error reporting in the parent workflow can reference the original input values.
3. Route to Correct Institution
The. Alma Network node:
Usesuses to_institutionCodeInstitution Code dynamically select the appropriateIZ, Institutionand Zone.
DoesBarcode” notlooks targetup allthe networkitem members.
⚠️ If _institutionCode isor incorrect orinput missing,may prevent the updateintended mayitem failfrom orbeing affect the wrong IZ.updated.
2. Item update
4. Retrieve Item
Calls Alma API:
GET /almaws/v1/items
Uses the provided barcode.
Always outputs data (even on error), allowing parent workflow error handling.
5. Remove WRLC Retention Fields
The “Remove WRLC Retention Code” nodechanges modifies:
item_data.committed_to_retain
Sets value = false
Sets desc = "No"
item_data.retention_reason
Clears value and description
item_data.retention_note
Clears value
⚠️ Important behaviors:
This workflow does not validate whetherin the item is currently marked as WRLC retention.
It forcibly clears the fields.
It assumes the Almaretrieved item structure includes:JSON:
item_data.committed_to_retain.value
'false'
item_data.committed_to_retain.desc
No
item_data.retention_reason.value
Empty string
item_data.retention_reason.desc
Empty string
item_data.committed_to_retain
item_data.retention_reason
If Alma’s API structure changes, this logic may break.
6. “Update Item
Calls Alma API:
PUT /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}
Writeswrites the modified item back to Alma.its Alma IZ. The code assumes committed_to_retain and retention_reason are present in the retrieved item structure.
3.
NZ bib updateAfter the item update, “Retrieve Bib” gets the item’s IZ bib. The workflow proceeds to NZ 583 removal only when the bib’s linked record type is NZ and Institution Code is not 01WRLC_SCF.
On that path, the workflow looks up the institution in the WRLC Institution Information data table, retrieves the linked NZ bib, and uses “Remove 583 Field” to match a 583 field by its $x barcode. “Update Bib Record” writes the resulting bib back to Alma. If no 583 field matches the barcode, the removal step leaves the bib’s 583 fields unchanged.
The SCF exception assumes that the retention commitment is managed through the owning institution’s item and its NZ-linked bib.
If results exist
- If
the selected Institution Zone.Thethe barcode identifies an item, the subworkflow updates that item’sretentioncommitted_to_retainandretention_reasonfieldsareincleared. - If
Thetheupdateditem’sitem JSONbib is linked to the Network Zone and the institution is not01WRLC_SCF, the subworkflow also looks for a 583 field whose $x matches the barcode. If found, it removes that field and updates the NZ bib.
No independentseparate notification is sent.
If no results exist
If the barcode does not identify an item, no retention fields are cleared. The item retrieval node is
invalidconfigured to continue on error, but the following code expects an item record, so the parent workflow should not assume the removal succeeded.
01WRLC_SCF, the item The workflowcan still outputsoccur; datathe (dueNZ tobib path continueRegularOutputsettings).
Errorno handling583 must$x be managed bymatches the parentbarcode, workflow.
Artifacts produced
- An
Updatedupdated Alma item record. - When
eligible, an updated Network Zone bibliographic record without a corresponding 583 field.