Question
Cognizant
GB
Last activity: 6 Apr 2017 6:02 EDT
File getting corrupted when Connect-File method is being used
Requirement: User sends an email with attachment(s) to a mailbox.PEGA monitors the mailbox and processes the email along with the attachment. The attachment is then required to be moved to a server location say ServiceExport directory.
Implementation: Email listener has been configured to monitor the mailbox and create work item when a mail is processed. When the work item is created, the attachment of the email gets tagged to the work item as work object attachments.The OOTB activity AddAttachmentFromEmail has been overriden and a Connect-File step has been introduced. The Connect File step is invoked with a Connect-File rule and the attachment name and the attachment content as parameters. The attachment name and attachment content paramters is being set from the AttachmentName and AttachmentValue parameters which are populated when the email listener processes the email and creates the work item.In the Connect File rule, the destination has been set as the ServiceExport directory.
Issue : The work object attachments is being copied to the ServiceExport directory but when the attachment is being opened , it is saying that the file cannot be opened as it has become corrupted. I have tried with different file types such as pdf,csv etc and in all the cases the same issue is being encountered.
Is there any way to make sure the file is not corrupt when being moved to the destination using Connect-File method?
***Updated by moderator: Lochan to add Categories***