Skip to main content

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 routing routing 

  • Trigger: Executed by another workflow (subworkflow only; no independent trigger)

  • Primary outcome: Clears WRLCthe item’s retention indicatorscommitment fromand anreason, itemand recordremoves ina Alma.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 inputBarcode and Institution Code from athe parentcalling workflow.

    workflow.
  • Uses

    PreservesInstitution Code to route the incomingitem barcodelookup and institution 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.

  • 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 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.
  • ClearsThe subworkflow does not clear retention_note. It also does not check whether the item currently has a WRLC retention-relatedretention fields.

    commitment
  • before
  • changing

    Writes the updatedits item back to Alma.

  • Returns the updated item data to the calling workflow.fields.


Where it runs

  • Alma IZ(s):IZ:

      Selected
    • Dynamically determined via _institutionCode passeddynamically from the parentinput workflow.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)

      bib
    • 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 Another Workflow.”Workflow”

  • trigger
  • passes

    Requiresthrough the input fields:

    from
      the
    • parent

      workflow. The expected fields are Barcode

    • and
    • 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 _institutionCodeInstitution Code to dynamically select the appropriateIZ, Institutionand Zone.

    “Retrieve
  • Item
  • by

    DoesBarcode” notlooks targetup allthe networkitem members.

    there.
  • 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/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:

these
    fields
  • 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 fieldValue written
      item_data.committed_to_retain.value'false'
      item_data.committed_to_retain.descNo
      item_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 to Alma.its Alma IZ. The code assumes committed_to_retain and retention_reason are present in the retrieved item structure.

  • 3.
NZ bib update

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

    Thethe barcode identifies an item, the subworkflow updates that item’s retentioncommitted_to_retain and retention_reason fields arein cleared.

    the selected Institution Zone.
  • If

    Thethe updateditem’s item JSONbib is linked to the Network Zone and the institution is not 01WRLC_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 parentcalling workflow.

    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 item cannotupdate be retrieved:

    • The workflowcan still outputsoccur; datathe (dueNZ tobib continueRegularOutputpath settings).

      is skipped.
    • If

      Errorno handling583 must$x be managed bymatches the parentbarcode, workflow.

      no
    • 583
    field is removed.

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.