Skip to main content

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?: Yes Yes 

  • Runs on: Alma Institution Zones via Network routing routing 

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

  • Primary outcome: Marks an item as committed toApplies WRLC retention into Alma.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.

Alma

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 inputa Barcode and Institution Code from a parentcalling workflow.

      workflow.
    • PreservesUses the incominginstitution 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 the APIend call toof the correctNetwork AlmaZone Institutionupdate Zone.

      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.


Where it runs

    • Alma IZ(s):

        Selected
      • Dynamically determined via _institutionCode passeddynamically from the parentsupplied workflow.

        Institution
      • Code;
      the workflow does not select all institutions at once. The Network Zone bibliographic update excludes items supplied with institution code 01WRLC_SCF.
    • Systems touched:

      • Alma APIs (item retrieval and update)

        bibliographic
      • APIs;
      • Alma Network routingrouting; node

        the
      • LibOW
      WRLC Institution Information data table, used to look up an institution’s OCLC code.
    • Reports / queries used: None

      None.

How it works

Logic overview

1. Trigger (Subworkflow Execution)

    1. A

      Startscalling viaworkflow “Whensupplies Executed by Another Workflow.”

    2. Requires input fields:

      • Barcode

      • and
      • Institution Code

        .
    3. The
    4. 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.

  • The workflow mayretrieves failthe orInstitution routeZone incorrectly.

    bibliographic
    record.

    2.It Preserveproceeds Input

    with

    Thea “StashNetwork barcode”Zone update only if the linked record type is NZ and the supplied institution code node:

    is
      not 01WRLC_SCF.
    • For

      Copies:

      an
        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.
      • After

        that update, the final node returns Barcode

      • and
      • 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.

      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/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.

    • If
    • the

      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 retention applied.

      values.
    • When

      eligible, an updated Network Zone bibliographic record with an added 583 field.

    • No files, sets, reports, spreadsheets, or email notifications.