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 task applies to both Pega Cloud and on-premises environments and provides an example that is specific to Pega Cloud. If you are running Pega Platform 7.2.2 or 7.31, see Configure a file listener associated with a storage destination in the archive on Pega Community.
The following table displays the supported types of file repositories.
|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.
For more information, see Creating a repository.
|Customized file repository||Not supported||Not supported||File listeners do not support custom repositories.|
Create a file listener and configure the following values:
In the Source properties section, in the Source location field, enter
where <repository name> is the name of a repository.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.Enter *
Adjust any other file listener settings that are appropriate for your application and enterprise requirements.
For more information, see Creating a file listener.The file listener starts automatically when the nodes on which the listener is configured to run start.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.
To ensure that your configuration is successful, test the file service. For more information, see Unit testing a Service File rule.