how to handle case attachments in "Data Instance First" design pattern

hi, may I know how to handle case attachments in “Data Instance First” design pattern?

In this pattern, data is persisted before case creation, then how about the files attached to the case?

Thanks.

@MaxonL16591286 The Data first design pattern what it is doing you capturing data first and then you are deciding whether you need a case created for this or can this data be just stored as a data instance in the Pega table.

If you are required to have a case then you can avoid this approach and directly create a case and then OOTB attachment activity can be directly used. If you are going with the approach you can create a custom activity to create an attachment page of Data-WorkAttach-file and then use link-object method to link this with the data object created, currently, I think there is no ootb activity which can help.

@MaxonL16591286 in this design pattern, you get the data first to decide case is required or not. If case required, then case can be created and then you can have attachment upload screen in later part.

But if it’s only 1 screen and you don’t have any option other than getting attachments in the first screen itself, you can have below approach. In this approach attachment details will be stored in a pagelist. Once you have decided with the data that case is required, you would be creating case and along with that you can loop this pagelist, form attachment page for each page and then save attachment and link it to work object.

https://support.pega.com/question/attachment-temp-case