Version

    29. Libraries

    A Library is a redistributable package containing reusable graphs, subgraphs, jobflows, data services or metadata. It can be developed in CloverDX Designer and then deployed to CloverDX Server. It allows comfortable sharing of CloverDX elements.

    Development and Installation

    Libraries are developed as regular projects. When the development is finished, the developer can use CloverDX Designer to export the whole project into a package. During the export, the author selects which elements are public – meant to be used by others. We call these elements the public interface of the library. They will be visible to all users. Libraries may contain other (internal) elements, which may be used as sub-routines in the public ones.

    The export creates a single file with ".clib" extension. This file can be uploaded to CloverDX Server in the Libraries section. Adding or deleting libraries requires the "Libraries administration" permission. Once installed, public elements from the library may be used by all authenticated users of the Server.

    Installed libraries may be seen as a special type of public shared sandbox with read-only permissions. Internally, the packages are unpacked into the ${libraries.home} directory. By default, it points to "libraries" sub-directory located in ${sandboxes.home}.

    Usage

    Graphs, Jobflows

    When creating new schedule or event listener on the CloverDX Server, public graphs and jobflows from installed libraries can be used.

    Subgraphs

    When developing new graphs in a Server project in CloverDX Designer, public subgraphs from installed libraries are shown in the Palette. They are also available in the Add Component dialog.

    Data Services

    Data services from installed libraries can be deployed on the CloverDX Server.

    Metadata

    When developing new graphs in CloverDX Designer, public metadata from installed libraries can be linked as a shared metadata by opening context menu on the Metadata group in the outline and selecting New metadata  Link shared definition from library.

    Updating a Library

    Since CloverDX 5.15, you can have multiple versions of the same library.

    librariesView
    Figure 107. Administration of Libraries

    Library Documentation

    The library documentation consists additional detailed information about the library. To be visible it must be in a separate file placed in the root of the source project before exporting a library. We support 3 file names (case insensitive, in the preferred order):​

    • readme.md - rendered Markdown - a visage like in the CloverDX Marketplace

    • readme.txt - plain text​

    • readme - plain text​

    The documentation is displayed in the library detail in a separate tab (the first one) next to the Overview and is optional – if not present then the tab is hidden​. It is displayed for installed libraries and for libraries available in a repository.

    LibraryDocumentation
    Figure 108. Library documentation tab

    Library Configuration

    Only the users with "Libraries administration" permission are allowed to configure installed libraries.

    When you are exporting a library in CloverDX Designer you can select one job which you may use as a initialization job for your library. If the library has such a job it is indicated by a bullseye icon in the libraries list.

    libraryInfoIconDetail
    Figure 109. Library can be configured

    You can run this initialization job by clicking on Initialize library button in the configuration bookmark. This job can be executed as many times as necessary.

    libraryConfigurationTabDetail
    Figure 110. Configuration bookmark

    It is possible to configure your libraries with parameters. When you are exporting a library in CloverDX Designer you can add library.prm file into it and define parameters which will be configurable on CloverDX Server. If the library has such a file, it is indicated by a wrench icon in the libraries list.

    libraryParametersTooltip
    Figure 111. Library has configurable parameters

    The supported parameter types are String, Secure String, Boolean, Integer, Decimal, and Enumeration. The parameter’s description is shown as an “i” icon with a tooltip.

    libraryConfigurationParameters
    Figure 112. Library parameters

    Library Repository

    Library repositories allow you to share your libraries. A repository is a local or remote directory with ".clib" archives, each containing one library.

    Currently, we support the following remote protocols: FTP, SFTP, Amazon S3, Azure Blob Storage, SMB and SMB2.

    In CloverDX Server, you can add one or more repositories and then browse the repository and install selected libraries.

    Our CloverDX Marketplace, which includes a collection of CloverDX libraries that implement various functionalities, is automatically added during CloverDX Server installation with an empty database. For existing Server installations the CloverDX Marketplace repository can be added by clicking on the Add CloverDX Marketplace button. After performing this step, the button will become disabled and will indicate that the repository has already been added. The CloverDX Marketplace repository (its URL is az-blob://cloverdx.blob.core.windows.net/marketplace-repository) can be located in the Repository dropdown.

    libraryRepository
    Figure 113. FTP Library Repository

    Library Import

    When you import configuration, CloverDX Server installs imported libraries if it can find them in any of the available repositories. Both the name and the version of the library must match.