Configuring a file listener associated with a storage repository
You can configure a file listener to monitor a specific folder in your repository and call a file service to process the files. With this configuration, you can better organize your files and create work items from a repository of related files. This task is specific to Pega Platform 7.4 and later.
- Configure a file service in Pega Platform that defines how to process file content (the process rules) and invokes subsequent downstream content activities. For details, see Configuring a file service and file listener to process data in files.
- Make sure that your application has a PegaRULES:RepositoryAdministrator role. This role is required to create a repository by using the rule form and to use its file specification in the file listener rule form.
The following table displays the supported types of file
repositories. For more information,
see Creating a repository.Repository type On-premises systems Pega Cloud Services Configuration notes Pega Cloud File Storage Not applicable Default Pega Cloud File Storage is the default repository configured
and ready to use in applications running in Pega Cloud Services
environments. Amazon S3, Microsoft Azure, JFrog Artifactory Supported Supported These repository types are not configured by default in
Pega Platform. Configure a new
repository. For more information, see Creating a repository. Local file system Supported (recommended only when using a shared network
storage) Not supported Local storage on nodes in Cloud is ephemeral. Therefore, data
that is stored in Cloud can be lost. Customized file repository Not supported Not supported File listeners do not support custom repositories.
For descriptions of configurable file listener property fields, see Using file listeners and Where, when, and whether file listeners start.
- Create a file listener and configure the following values:
- In the Source properties section, in the
Source location field, enter
file://<repository_name>:<optional_folder_path>
where <repository name> is the name of a repository.For example: Pegacloudfilestorage is the default repository for Pega Cloud systems. You can set this listener to use any of the repositories that are displayed in . - In the Source name mask field, enter the type of
file that matches the type of files that you want the listener to read
and process.
For example: Enter * .csv
or *.pdf
. - Adjust any other file listener settings that are appropriate for your application and enterprise requirements.
For more information, see Creating a file listener.Result: The file listener starts automatically when the nodes on which the listener is configured to run start. Note: If you need to manually start the listener, for example, if you stopped the listener while working in a development environment, see Starting a listener. - In the Source properties section, in the
Source location field, enter
- To ensure that your configuration is successful, test the file service. For more information, see Unit testing a Service File rule.
Previous topic Configuring a file service and file listener to process data in files Next topic Parse Delimited rules