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 thecorrectappropriate Alma Institution Zone.Retrieves the item by barcode, sets
committed_to_retainto No, and clearsretention_reason.- Updates the item in Alma.
- Retrieves the item’s IZ bib and checks whether it is linked to an NZ bib.
- If the bib is NZ linked and
Institution Codeis not01WRLC_SCF, retrieves the NZ bib and removes a 583 field whose$xmatches 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.before - changing
Writes the updatedits itemback to Alma. Returns the updated item data to the calling workflow.fields.
Where it runs
-
Alma
IZ(s):IZ:- Selected
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
bibAPIs (itemretrievalandupdate)APIs, 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 AnotherWorkflow.”Workflow” trigger - passes
fromRequiresthrough the inputfields:- the
- parent
workflow. The expected fields are
Barcodeand Institution Code
- parent
If these fields are missing, the workflow will fail or route incorrectly.
2. Preserve Input
The “Stash barcode” code node:
Copies:BarcodeInstitution 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:
“RetrieveUsesusesto_institutionCodeInstitution Codedynamicallyselect theappropriateIZ,InstitutionandZone.Item - by
there.DoesBarcode”notlookstargetupallthenetworkitemmembers.Missing
⚠️ 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/itemsUses 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:
- fields
item_data.committed_to_retainSetsvalue = falseSetsdesc = "No"
item_data.retention_reasonClears value and description
item_data.retention_noteClears value
⚠️ Important behaviors:
This workflowdoes not validatewhetherin theitem is currently marked as WRLC retention.It forcibly clears the fields.It assumes the Almaretrieved itemstructure includes:JSON:-
Item field Value written item_data.committed_to_retain.value'false'item_data.committed_to_retain.descNoitem_data.retention_reason.valueEmpty string item_data.retention_reason.descEmpty string
item_data.committed_to_retain-
item_data.retention_reason
If Alma’s API structure changes, this logic may break.
6. “Update Item
- Info”
Calls Alma API:PUT /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}
Writeswrites the modified item back toAlma.its Alma IZ. The code assumescommitted_to_retainandretention_reasonare present in the retrieved item structure.
3.
After 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. - Results are returned to the
parentcallingworkflow.workflow; no 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.- If the bib is not linked to the NZ, or the institution is
01WRLC_SCF, the itemcannotupdatebe retrieved:
is skipped.The workflowcan stilloutputsoccur;datathe(dueNZtobibpathcontinueRegularOutputsettings).- If
noErrornohandling583must$xbe managed bymatches theparentbarcode,workflow.583
Artifacts produced
- An
Updatedupdated Alma item record. - When
eligible, an updated Network Zone bibliographic record without a corresponding 583 field.
- No files, sets,
reports,spreadsheets, or email notifications.