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:-
- 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).
- Create a complex event activity using the attached (ComplexEvent.java) code.
- Update the properties (processFlowId, eventId, eventName, senderEmailId, emailSubject, fileSearchCriteria, receiverEmailId, password, tempFolderLocation) in ComplexEvent code as per your mail server specification.
- Create and Put Gateway condition, Put-Context-Var, FileSource, File Target Location activity in the process flow designer.
- 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.
- 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$$'.
Comments
0 comments
Article is closed for comments.