Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8894

Dynamic Directory Module getting null on getMessageProperty

$
0
0

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.448InformationDay Directory:10
10.02.2014 13:46:53.448InformationMonth Directory:02
10.02.2014 13:46:53.448InformationYear Directory:2014
10.02.2014 13:46:53.448Informationinput Directory:null

 

What might be causing the directory to be null?  What step did I miss?

 

Regards,

Diane


Viewing all articles
Browse latest Browse all 8894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>