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***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
This issue is now resolved. I was using the incorrect option in the Operation parameter while calling the method Connect-File.
Keep up to date on this post and subscribe to comments
- Connect-File method unable to write Data on File on server path
- How to have a new line using Map Structured in Connect-File method?
- Trying to write a file using Connect-file
- Connect-File putting unreadable special characters at the begining of the file
- How Can we configure connect-file to write files in one node