The Integration blog covers the latest in product updates, best practices, customer stories, and more.

  • August 5, 2019

Update library in continuous manner even after being consumed by integration

Update library feature provides much awaited update functionality on registered libraries. As part of the update library user can add new functions, remove unused functions or modify logic of existing functions.

Feature Flag

This feature is available when oic.ics.console.library.update feature flag is enabled.

Here is how library update works

Let's consider a simple Math library that defines basic add function that takes two parameters and is used in an integration.

Suppose you want to add other math functions like subtract, multiply and divide and change the way add operation is executed. You may update the registered library with new JS file that has these new functions using the Update menu on the library list page.

Upload the new JS file using the update library dialog.

When attempting to update the library with new code, the system validates the new library file and ensures it meets the following conditions.

  • Function signatures in the new file being uploaded should match the signatures of functions in the existing library that are used in integrations.
  • You may add new functions but removing a function used in integrations results in rejection of the new file.

If the new library file adheres to these conditions the library is updated and library edit page is displayed for further configuration changes.

Please note that if the returns parameter for a function used in an integration was changed in the updated library the system does not flag an error but it invalidates the downstream mapping in integrations and should be re-mapped.

Deactivate and activate the integration for changes to take effect in integrations that use the updated library.

Following is an example where the validation conditions are satisfied and the system accepts the uploaded library file.

Add function in math.js is used in integrations so the signature of this function in the updated library file is unchanged even though the add function definition is changed. As mentioned above the containing library file name is also part of a function signature so the file name is unchanged in the updated library. The updated library may contain other function definitions.

Example mentioned below is an illustration where validation fails and uploaded library file is rejected.

As the signature of functions in the new library file do not match with the library in the system, the new library file is rejected.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.