Hi Venakta,
Read attachment name via mapping and set FileName via same mapping using Dynamic Configuration code.
Sample code to attachment name
String attachmentID = null;
AbstractTrace trace;
//gets the input attachment from the source message
GlobalContainer globalContainer = container.getGlobalContainer();
InputAttachments inputAttachments = globalContainer.getInputAttachments();
trace = container.getTrace();
ry
{
//checks for the availability of attachments in the input message if(inputAttachments.areAttachmentsAvailable()) { trace.addInfo("Attachments Available"); //gets the attachmentIds and store it in an Object array Collection<String> CollectionIDs = inputAttachments.getAllContentIds(true); Object[] arrayObj = CollectionIDs.toArray(); //Loops at the input attachments to get the content of the attachment for(int i =0;i<arrayObj.length;i++) { attachmentID =(String)arrayObj[i]; trace.addInfo((i+1) + ") Attachment Name: " + attachmentID); } }
}
catch (Exception e)
{ e.printStackTrace();
}
//Use above attachmentID value to set File Name using Dynamic configuration code
return "";
Regards,
Praveen Gujjeti