Sharing MailMessage object between processes

Hi guys,

I have a Main workflow, which processes emails (with attachments) via IMAP and if certain conditions are met, it passes some values to a long-running subprocess for human confirmation in Orchestrator Action Center, via Run Parallel Process.

Once the human confirms, one of the actions in the subprocess is to move the processed email to another folder in given mailbox.

Therefore, I need to pass MailMessage class object, as an input into Move IMAP Mail Message Activity. I am also passing other variables and objects as in_Arguments.

With MailMessage Argument though, I am getting an error:
“Run Parallel Process: Error getting value from ‘ReadTimeout’ on ‘UiPath.Mail.MemoryBlockStream’.”

I could not pinpoint exact meaning of the message, nor could come up with reasonable workaround to avoid using the object as argument (mailmessage is not serializable class).

Any ideas?

I am stuck, but is seems to be quite common functionality.

PS: I need to use IMAP access, as the client uses a non-standard mailserver platform.

Thanx

Cheers

L

@libork When you use Long Running workflows, you should make sure you follow the best practices given in the below link :

Also can you make the workflow as a Separate process, In this way you can use a Queue and a Queue Trigger on that process. So whenever you add items to the Queue, the process executes in parallel if it is a Background process.

@supermanPunch

Thanx a lot, indeed, arguments passed among processes must be of serializable type/class, so no chance of sharing MailMessage class.

Cheers

L

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.