Archiving Completed Files

We are trying to move files from one directory to another in the pegacloudrepository. We have made use of the pxListFiles Data Page to view the files in the repository however, there is no data page in the Repository API to move files in this way. There are pages for creating and deleting files however our files are very large so makes a lot more sense to move rather than delete and recreate. How can we acheive moving files within a repository?

https://docs.pega.com/bundle/platform/page/platform/data-integration/repository-apis.html

@TomC24761 I see that you logged a support ticket and that you were provided with the below solution in INC-C5553:

As very high-level indication, client was advised that they can use @baseclass pxCopyFromRepository activity steps 8.4 - 8.10.

Client can copy files using below logic:

  1. a java step with step page D_pxGetFIle to get put the stream on the parameter page as the source.
    java.io.InputStream FileData = (java.io.InputStream)myStepPage.getObject(“pyStream”);
    tools.getParameterPage().putObject(“FileDataStream”,FileData);
  2. a java step with a step page of D_pxNewFile on the destination on the pegacloudrepository to wire it to source.
    tools.getStepPage().getProperty(“pyStream”).setValue(tools.getParameterPage().getObject(“FileDataStream”));
  3. a save-datapage step for the D_pxNewFile destination page;
  4. Pega confirmed with the cloud operations team and they confirmed that they are not responsible for file management in Pega Cloud repositories. Therefore client can either use the existing platform functionality pxCopyFromRepository or write their own custom activity to achieve this requirement.