All Pega Cloud 2 clients who use the local file system path in custom Java code must refactor to use the Pega Cloud File storage repository API as soon as possible. The refactoring must be complete before beginning the update to Pega Cloud 3 or before the end of June 2025, whichever comes first. Pega Cloud 3 does not support the local file system path. Pega Cloud 2 will also no longer the support local file system path by the end of June 2025. All code that still refers to the local file system path after the update to Pega Cloud 3 or after June 2025 on Pega Cloud 2 may experience errors until you refactor to the Pega Cloud File storage repository API.
Steps to refactor to the Pega Cloud File storage repository API
- Search for “sync-data” across your applications in Pega Platform.
- Wherever “sync-data” appears in a file path, replace the file path up to and including "sync-data" with “file://pegacloudrepository:” or “file://pegacloudfilestorage:/sftp”. Any subfolders after "sync-data" should remain the same. For example:
- "/usr/local/tomcat/work/sync-data" becomes "file://pegacloudrepository:" or “file://pegacloudfilestorage:/sftp”.
- "/usr/local/tomcat/work/sync-data/bix/" becomes “file://pegacloudrepository:/bix” or “file://pegacloudfilestorage:/sftp/bix”.
- Exception: If “sync-data” appears in a Pega rule labeled “Final” in your search, just ignore it. Do not change it. This happens most often with pzCheckIsInValidSource. This Exception applies to all actions in steps 2-5 of these instructions.
- Wherever the sync-data file path appears in combination with java.io.File, replace java.io.File with PRFile. For example:
- java.io.File tempFile = new java.io.File("/usr/local/tomcat/work/sync-data/bix/" + filename); becomes PRFile tempFile = new PRFile("file://pegacloudfilestorage:/bix/"+ filename);
- Wherever the sync-data file path appears in combination with java.io.FileInputStream, replace java.io.FileInputStream with PRInputStream. For example:
- java.io.InputStream inputStream = new java.io.FileInputStream("/usr/local/tomcat/work/sync-data/bix/" + filename); becomes java.io.InputStream inputStream = new PRInputStream(file://pegacloudfilestorage:/bix/+ filename);
- Wherever the sync-data file path appears in combination with java.io.FileOutputStream, replace java.io.FileOutputStream with PROutputStream.
- java.io.OutputStream outputStream = new java.io.FileOutputStream("/usr/local/tomcat/work/sync-data/bix/" + filename); becomes java.io.OutputStream outputStream = new PROutputStream(file://pegacloudfilestorage:/bix/+ filename);
If the searches yield no results, you are not using the local file system path and do not need to take any further action. For more information about file storage, see Using Pega Cloud File storage.