Import Excel data to case (and show them in Constellation UI)

@MarioM17642831 That’s clever in leveraging pxGenerateExcelFile. One idea - instead of creating a custom rest service (which takes effort & maintenance), i was wondering if we could leverage one of OOTB Pega APIs to invoke the activity. GET /data can call a data page, inside which we can try calling the activity. Reference the API URL in the URL-type field. If works, this should have fewer LOEs.

Thanks for sharing the approach.

@Will Cho very nice idea, I did not thought about it, I will try it and will get back to you as soon as I find out.

Best regards,

Mario mesquita

@Will Cho I really try the approach you suggest, but in order to be able to download a file, we have to set the following headers:

content-type = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

content-disposition = attachment; filename=“filename.xlsx”

The GET /data as is final and also the activity that it uses, so I am not able to set those headers, and with that the response it is only a json not the file itself. So if there is another way to use it I will appreciate any help. So far the way I tried creating a REST service it is the way I could achieve it. I will really appreciate any help on that.

Best regards,

Mario Mesquita

I took a bit different, simpler approach. When creating a new case, I’m attaching the Excel template to the case so that user can download. Using pxAttachFile, we can attach the Excel template file from the Binary File rule to the case. There is a slight overhead of storing it to every case that it needs but should be very marginal. Please see screenshots below. CC: @MarcCheong

1 Like