Resource Lock

The resourceLock APIs help provide data consistency in an environment where multiple client applications can access the same resource, such as a loan.

Resource lock requests are only required when you need to hold a lock through multiple API calls; otherwise, a session-less lock is automatically applied, locking the loan only for the duration of the single API call.

🚧

Supported Resources

This API currently supports operations on the loan resource. Other resources will be supported in a future release.

When a loan is locked, all resources (contacts, eFolder, etc) within the loan inherit that lock.
There are two types of resource locks:

  • V3 Resource Lock types: exclusive and NGSharedLock
    "lockType":"exclusive" | "NGSharedLock"
  • V1 Resource Lock types: exclusive and shared
    "lockType":"exclusive" | "shared"

Exclusive

An exclusive resource lock should be used carefully. Acquiring an exclusive lock causes Encompass to grant the currently logged-in user exclusive write access to the resource. Authorized users can read a locked resource, but they cannot delete or update the resource. Attempting to lock a resource that has an exclusive lock, returns a message to the user stating that the resource is already locked and provides an option of opening the resource in read-only mode. The Encompass SmartClient currently only acquires an exclusive lock.

Shared

Shared lock is typically used by Encompass apps (or custom apps) to allow API updates while the user has the loan open in the app. Any updates to the loan while locked are applied sequentially as they occur. When a shared lock is applied to a resource, an exclusive lock cannot be obtained.