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.
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 Routesat the APIend call toof the correctNetwork AlmaZone Institutionupdate Zone.
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.
Where it runs
-
- Alma IZ(s):
Dynamically determined via_institutionCodepasseddynamically from theparentsuppliedworkflow.Institution
01WRLC_SCF.
Systems touched:
Alma APIs (item retrieval and update)
Alma Network routingrouting; node
Reports / queries used: None
How it works
Logic overview
1. Trigger (Subworkflow Execution)
- A
Startscallingviaworkflow“WhensuppliesExecuted by Another Workflow.”
Requires input fields:
Barcode
Institution Code
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:
01WRLC_SCF.
For Copies:
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 _institutionCode to dynamically select the appropriate Institution Zone.
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/items
Uses 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_retain
Sets value = true
Sets desc = "Yes"
item_data.retention_reason
Sets value = WRLCRetentionDONOTDELETE
Sets desc = "WRLC Retention"
item_data.retention_note
Sets to empty string
⚠️ Important behaviors:
This workflow does not validate whether 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_retain
item_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.
Retentionbibliographic reasonrecord isalso setmeets the Network Zone conditions, the workflow adds a 583 field to WRLCRetentionDONOTDELETEthat (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 is invalidnot linked to the Network Zone, or retrievalthe fails:institution code is 01WRLC_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.
Item
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 stillshould outputs data (due to continueRegularOutput).
Error handling must be managed byinspect the parentresult. workflow.An error workflow is configured, but its behavior is Unknown (not in workflow export).
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.