on 04-24-2013 11:03 AM
Hi,
I have a requirement to have a dynamic filename at receiver file channel.
This filename depends on the value in one of the fields in the payload.
For Eg.
If Value in FIELD is blank then filename should be - Filename1
If Value in FIELD is not blank then filename should be - Filename2
Variable substitution does not help as we have to check the condition on the value of the field and then decide the filename.
Can it be done by Dynamic Configuration Udf ?
What would be the code?
Regards,
Vikas
Hi Vikas,
Use this in the UDF,
String str = "";
if(a == "")
{
str = "Filename1" + ".xml";
}
else
str = "Filename2" + ".xml";
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
conf.put(FileName, str);
return "";
Regards,
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mishra,
It can be handle by Dynamic Configuration UDF. In the udf pass the FIELD as input and write the validation.
Thanks,
Satish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Madanmohans blog is explaining your questions:
Combining three different aspects of PI (ASMA, AF Module and variable substitution) in one shot
/Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.