Shared libraries

Integration developers can create a library of common or useful code functions to use in their integrations. Shared libraries are available to all inbound and outbound integrations in a workflow, and are included when exporting and importing.

For information on creating libraries to use in Flow Designer, see Components.

For example, you might create a function that retrieves the user ID of an xMatters user. Instead of including the entire function code in each integration, you can add a "getUserID" function to your shared libraries, and call the function from the transformation script in any inbound or outbound integration in your workflow as though it was still part of the original script. If you need to update the function later, you only have to modify it in a single location.

If you have functions or other code in a separate application or text file, you can add a new shared library directly from the Integration Builder tab. You can also add and manage your libraries while working in the transformation script editor.

For more information using shared libraries in transformation scripts, refer to the Integration Builder scripting reference.

If you have a function in a transformation script with the same name as a function in a shared library, the integration may not call the correct one (or the same one every time), leading to unexpected and unpredictable results. Use a unique name for each of your shared libraries.