Table of Contents

Creating a custom repository type


Only available versions of this content are shown in the dropdown

Use a repository API to create a custom repository type for repository types that are not provided with Pega Platform. For example, you can build a Google Drive custom repository type. Custom repository types appear in the Pega Platform user interface.

Before creating a repository, you must have access to the storage provider's API and you must select the authentication mode to use with the API. For interactive authentication, use OAuth 2.0 and the Information Mashup gadget. For more information about this gadget, see Creating an External web component. For non-interactive authentication, use basic authentication.

Once you create a custom repository type, create one or more connections to it. Custom repositories behave in the same way as the repositories delivered with Pega Platform.

  1. Open your application.

  2. Create a child class of Embed-Repository-Type for your repository type:

    Do not create a subclass directly under Embed-Repository-Type. This class is reserved for repositories that are implemented by Pega.
    • Include the repository name at the end of the new class name. For example, Embed-Repository-Type-Nexus.
    • Create the new class as an abstract class.
  3. To add support for the custom repository type to the Data-Repository rule form, override the pyRepoConfiguration section in the new class.

  4. Customize the activities for your class.

  5. Configure the repository type.

    1. Upload an icon that represents your custom repository type to the webwb directory.

    2. Update the Code-Pega-List.pyRepoTypes data transform with the repository details, such as icon and name.

  6. Implement the following repository APIs:

    • Create folder API (D_pxNewFolder)
    • Create file API (D_pxNewFile)
    • Get file API (D_pxGetFile)
    • List files API (D_pxListFiles)
    • Exists API (pxExists when rule)
    • Delete API (D_pxDelete)
    • Is Authenticated API (D_pxIsAuthenticated)

    For usage information about these APIs, see Repository APIs.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.