HI - I am testing my custom module and seem to be having trouble retrieving the directory.
On the channel I have populated the filename and directory, checked the Adapterspecific Message-Attributes and checked all there items (Directory included).
I have my module in the Module tab and I see that it is called.
Code is:
Object obj = null;
Message msg = null;
MessageKey key = null;
MessagePropertyKey dirKey = null;
SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy");
SimpleDateFormat sdfMonth = new SimpleDateFormat("MM");
SimpleDateFormat sdfDay = new SimpleDateFormat("dd");
String sYear; String sMonth;
String sDay;
try {
// Calculate Day, Month, and Year
Calendar cal = Calendar.getInstance();
sYear = sdfYear.format(cal.getTime());
sMonth = sdfMonth.format(cal.getTime());
sDay = sdfDay.format(cal.getTime());
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
key = new MessageKey(msg.getMessageId(), msg.getMessageDirection());
dirKey = new MessagePropertyKey("Directory",http://sap.com/xi/XI/System/File);
audit = PublicAPIAccessFactory.getPublicAPIAccess().getAuditAccess();
//creating object for audit log audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS, "AddYMDFolderToEndOfDirectory: New Module called");
// getting Directory from ASMA parameters
dynamicpath = msg.getMessageProperty(dirKey);
audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS, "input Directory:" + dynamicpath);
audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS, "Year Directory:" + sYear);
audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS, "Month Directory:" + sMonth);
audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS, "Day Directory:" + sDay);
Audit Log shows:
10.02.2014 13:46:53.448 | Information | Day Directory:10 |
10.02.2014 13:46:53.448 | Information | Month Directory:02 |
10.02.2014 13:46:53.448 | Information | Year Directory:2014 |
10.02.2014 13:46:53.448 | Information | input Directory:null |
What might be causing the directory to be null? What step did I miss?
Regards,
Diane