Hai Team,
Thanks for your support i have solved the problem by using the module context as the condition i have used the custom module on both the communication channels and appended the generated file
using that condition
String Sender = (String) moduleContext.getContextData("sender");
if(Sender!=null)
{
Action act = msg.getAction();
String interface_Name = act.getName();
FileWriter fw = new FileWriter("*****");
fw.write("outbound_interface_name:-->"+interface_Name+"\n");
fw.close();
}
else{
Action act = msg.getAction();
String interface_Name = act.getName();
FileWriter fw = new FileWriter("****",true);
fw.write("inbound_Interface Name:-->"+interface_Name+"\n"+"Message ID:-->"+MSGID+"\n"+"Message Direction:-->"+MSGDIR+"\n"+"Message Key:-->"+MSG_KEY+"\n"+"Business system sender:-->"+BS_sender+"\n"+"Business system receiver:-->"+BS_Receiver+"\n"+"SendTime:-->"+SendtTime+"\n"+"Receive time:-->"+RecivedTime);
fw.close();
}
Regards,
Avinash.