Upload large files without causing out-of-memory errors by configuring your
application to store case and Pulse attachments
outside the Pega Platform database.
For example, you can
configure an external storage for attachments for insurance agents to ensure that the system
always have enough memory even with heavy upload of files that support insurance
claims.
Before you begin:
To enable storing of content by using web storage providers, ensure that you
correctly configure your web storage providers. For more information, see Integrating SharePoint Online with Pega Platform.
To enable storing of content by using file storage repositories, create or
configure a repository in your system. For more information, see Creating a repository.
To enable storing of content by using Content Management Interoperability
Services (CMIS) systems, perform the following activities:
Ensure that you configure a Connect-CMIS rule in
your system. For more information, see Creating a Connect CMIS rule.
Important: Ensure that you review the restrictions for adding a
repository for case attachments in Limitations for attachments in a file storage repository.
If you fail to observe restrictions as you implement a repository, you can
experience system failures.
The default storage for on-premises deployments is the
Pega database. As a best practice, use repositories
for case attachments. Repositories are the only supported content storage type that
supports streaming and that has no risk of running out of memory.
Your environment
type determines the repositories that you can configure for your external content
for case or Pulse attachments:
In Pega Cloud environments, you can use
pegacloudfilestorage and the
/attachments subfolder as the repository for case
attachments, or you can configure another type of repository.
Before
integrating the repository in your application, you can change the
repository that you use for case attachments to another external
repository type after you create the repository.
In the header of Dev Studio, click the name of the application, and then click
Definition.
On the Application form, click the Integration
tab.
In the Content storage section, configure at least one
external storage system:
Choices
Actions
CMIS systems
Select the Store in CMIS system
checkbox.
In the Connector name field, select
a connector.
A web service provider
Select the Store in web storage
provider checkbox.
In the Provider list, select an
installed web storage provider for which you have an account
and a content location.
In the Authentication profile box,
enter or select an authentication profile of the OAuth 2.0
type.
Note: Use the same authentication
profile to store content in and source from the web
storage provider.
Click Browse, and then select the
target folder for your attachments.
Click Select.
Optional: To display a prompt to users before they delete an
attachment, click the Prompt users for
confirmation before deleting content from storage
location checkbox.
A repository
Select the Store in repository
checkbox.
In the Repository list, select a
repository for which you have an account and a content
location.
Note: Pega Cloud
clients: To use Pega Cloud File storage, select the
pegacloudfilestorage
repository.
Click Browse, and then select the
folder for your attachments.
Note: Pega Cloud
clients: To use Pega Cloud File storage, select the
/attachments
sub-folder.
Click Select.
Optional: To display a prompt to users before they delete an
attachment, click the Prompt users for
confirmation before deleting content from
repository checkbox.
For example: Application configured to enable the storing of content for
attachments in a repository
Click Save.
Result: Pega Platform adds new attachments that
you create in a case or Pulse conversation to the
location that you choose.
Limitations for attachments in a file storage repository
When you configure your application to store case or Pulse
attachments in a repository, consider the limitations to ensure that your attachments are stored
and retrieved correctly.
Ensure that you review the following limitations for adding a
repository for case attachments:
Repositories support only file attachments. All other types of attachments reside in a
database.
You cannot change the content storage type from repository to a different type.
After you switch from database storage to repository storage, you cannot switch back to
database storage without losing access to the attachments in the repository.
You cannot modify the configuration of a repository after the repository is in use.
Application attachments that you provide on the application form reside in a
database.
Multiple applications in the same application rule stack must have the same repository
configuration, or users cannot access the file attachments.
Because the application Pulse gadget cannot prompt for
authentication details, Pulse attachments that you
provide on the Application Overview landing page reside in the repository only when your
session is already authenticated or when the repository supports non-interactive
authentication. If both of these conditions are false, an error occurs and the operation
fails.
The following features are not supported for custom repositories during DevOps:
Import and export
File listener
For large images and PDF attachments, poster creation is skipped, and then Pega Platform creates a placeholder thumbnail.
When using database storage, you can attach multiple files that have the same name to
the same case. For external storage, you cannot attach multiple files that have the same
name to the same case because storage providers treat the file name plus the path as a
key. Attempting to attach multiple files that have the same name to a case causes an
error. You can, however, attach files that have the same name to different cases.
Note: When you configure your application to store case attachments in
a repository, Pega Platform appends the case ID to the attachment
name. For example, an attachment called loanapplication.pdf
becomes loanapplication_CASE-1234.pdf.
The unsupported characters that might not work in attachment names are {""", "?", "*",
"<", ">", "|", ":"} .
Migrating
case attachments to a repository
Reduce the size of your Pega Platform database and improve
performance by migrating the case attachments for your application from a Pega Platform database storage to a repository.
Note: When you migrate your applications from on-premises to Pega Cloud deployments, move your attachments from a Pega database to a repository.
Before you begin: Ensure that the
http://doc-build02.rpega.com/techdoc/content/writing-guidelines/reference-common-dita-elements-ref.html?hl=apiname
">pzAttachmentMigrationProcessor queue
processor is running. For more information, see Changing a queue processor rule state.
Note: Note that
pzAttachmentMigrationProcessor
is
configured to
run
for a maximum of 100,000 attachments. For migrating a larger number of
attachments,
create a custom
Queue Processor
that
suits your needs. For more information see: Creating a queue processor rule.
In the header of Dev Studio, click ConfigureSystemReleaseUpgradeAttachment Migration.
In the Repository field, select the repository to which
you want to migrate case attachments.
Click Browse, navigate to the folder on your repository
that you want to use for case attachments, and then click
Select.
Click Start Migration.
Click Refresh to update the display.
Result: After the migration finishes, the results include the number
of migrated files. For the files that were not migrated, the system work object ID and
a description of the error, which you can use for troubleshooting.
What to do next: Ensure that the repository to which the files were
migrated is the same repository where you store new attachments. For more information,
see Sourcing attachments from external storage.
Previous topic
Sourcing attachments from external storage