BasementCall Persistency

To check whether a User is linked to a Role, or a Customer has ever bought a Product, you can use Basement Calls in the configuration. For example in the BusinessEntity Security. And every time a BusinessEntity is called for, these checks are executed in real-time. For most cases this is necessary because the data keeps changing. But in some cases, that real-time check is not really necessary. And it might improve the overall performance if the check would only be executed once upon login.

Introducing BasementCall Persistency

Let's say you have a check if an Employee is linked to a Security Role. And these Roles are assigned to the Employee when he/she joins the company, based on the job description. Now if these roles change very often, it is necessary to check in real-time if the logged on Employee is linked to a specific Role. However, if these Roles hardly ever change, just one check when the Employee logs on to the Portal might suffice. To make this possible, and with this improve the performance, we are introducing the BasementCall Persistency. It will improve the performance in the following conditions:

  • You know data does not change that often
    For example with the Employee Roles mentioned. The Roles are assigned once, and might change only a few times per year.
  • The check has to be performed against webservice
    If the check involves setting up a connection to a webservice, this might be time-consuming. If your BasementCall needs to check against webservice data, BasementCall Persistency can really improve performance.
  • The check has to be performed against a large data-set
    Same as with the webservice, querying large data-sets can be time-consuming, so this is where the performance can benefit from BasementCall Persistency

When to use BasementCall Persistency?

Most important question to ask yourself: "How often do the conditions change?". If conditions change on a daily basis, BasementCal Persistency moght not be the best option. Second question is: "What if the change is not re-evaluated immediately?". In that case, the user would have to log out and back in again, for the change to be effective. If it is mandatory that the changes are applied immediately, without sign-out, sign in. BasementCall Persistency is not the best option. If that is not a problem, go ahead and use BasementCall Persistency.

How to make a BasementCall Persistent?

In the BasementHelper, you can find the list of your BasementCalls at the bottom of the page. Here we have introduced a button "Make Persistent" which will be shown if the current setting is that the BasementCall will be executed in real-time. This is the current behavior. By clicking that button, the BasementCall will become Persistent. Which means it will only be evaluated once, and from there re-used from the cache instead of performing it over and over again in real-time.

Once a BasementCall is Persistent, a button "Use Real-Time" is shown to revert back to the original behavior. Do remember, changing the Persistency has effect only once users sign-out and back-in again.