Process Multiple Attachments from the Mail Source

Situation:

How to process multiple attachments from the Mail Source in the process flow.

Design: 

We can process Multiple attachments from Email by using complex event and Gateway condition, File source activity in process flow designer. Following are the steps to achieve the above scenario:-

  1. Copy the attached jar in ext folder of AdeptiaSuite (mail-attachment-list.jar). After placing the jar, restart the Adeptia services(Kernel.exe, webrunner.exe).
  2. Create a complex event activity using the attached (ComplexEvent.java) code.
  3. Update the properties (processFlowId, eventId, eventName, senderEmailId, emailSubject, fileSearchCriteria, receiverEmailId, password, tempFolderLocation) in ComplexEvent code as per your mail server specification.
  4. Create and Put Gateway condition, Put-Context-Var, FileSource, File Target Location activity in the process flow designer. PF.png
  5. In Gateway, edit the Sequence flow from Gateway to Put-Context-Var activity and choose the Condition type as Java Condition in condition wizard. In Java condition, copy and paste the attached code (ConditionGateway.java) and save the condition.
  6. In the Put-Context-Var, you need to override the variable 'fileName' of the File Source activity and need to put its value as '$$fileName$$'.
Have more questions? Submit a request

0 Comments

Article is closed for comments.