Skip to Content
Feb 26, 2014 at 09:27 PM

Dynamic directory and file name



I have requirement of dynamic file name and dynamic directory with condition based on doctype from source

I have used the following code and for file and directory with two different udfs. If I am using only file it is working but not with the directory

String directory = new String("");
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http:/"+"/","Directory");

if (var1.equals( "DOR" ))
directory = "/Inbound/DOR";
else {

directory = "/Inbound/KOR";

return directory ;
catch(Exception e)
String Exception=e.toString();
return Exception;

in message mapping i used var1 to one of the not used field in target

similary i did for file with different udf and mapped sourcefield- to targetrootnode with same condition with different filename

But it is not working getting the following exception Message processing failed. Cause: The parameter "argument" has the value "remote://*/PACK _TEST20140226-152149-483.dat", so it contains the character "remote://*/PACK _TEST20140226-152149-483.dat" which is not allowed

Thanks for your help