Process Multiple Attachments from the Mail Source

Situation:

How to process multiple attachments from the Mail source activity in the process flow.

Design: 

We can process Multiple attachments from Email by using complex event and Gateway condition, mail 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 attached (ComplexEvent.java) code.
  3. Update the properties (processFlowId, eventId, eventName, hostName, senderEmailId, emailSubject, fileSearchCriteria, receiverEmailId, password) in ComplexEvent code as per your mail server specification.
  4. Create and Put Gateway condition in the process flow designer before Mail Source activity in the process flow. Process_Flow.jpg
  5. In Gateway, edit the Sequence flow from Gateway to Mail Source activity and choose the Condition type as Java Condition in condition wizard. In Java condition, copy and paste the attached code (Condition Gateway.java)and save the condition.
  6. Replace the Mail Source Name with the name of mail source activity created in the below lines of Condition Gateway.java code.
  • context.setActivityParameter("Mail Source Name","fileName",fileList[totalFiles - 1]);
  • context.setActivityParameter("Mail Source Name","leaveCopyOnServer",true);
  • context.setActivityParameter("Mail Source Name","leaveCopyOnServer",false);
Have more questions? Submit a request

0 Comments

Article is closed for comments.