I have an requirement where I need to read an excel file. Hence, I have given the user the Work-.pyFilePath control where user will get the browse button where he can browse and select a file.
The pxRequestor.pyFileUpload (Code-Pega-Requestor) will be holding the file name.
I am using the OOTB activity @baseclass.MSOParseExcelFile to parse the excel sheet and read the data into my pega properties. I have uploaded a template for the same.
Now business requests to attach the same file to the work object.
So, when I analyze, I am not able to user any OOTB activities which will be used to attach a file to the work object because all these activities users Data-WorkAttach-XXX page on the UI to hold the attachment.
But my UI has the pyFilePath on pyWorkPage.
So how can I attach a file and at the same time reads the content, parse the data using the binary file template and map the data to my pega properties?
I am able to do this by using the OOTB activity SaveAllAttachments activity. After the MSOParseExcelFile activity call, I set all the required properties on the Data-WorkAttach-File page and called SaveAllAttachments on the same page.