on 02-18-2010 3:08 PM
Hi,
I'm trying to set the mail reply to field in email messages sent by mail receiver adapter.
To do this, I use the ASMA and developped my own UDF
public String setMailFrom(String mailFrom, Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create(
"http://sap.com/xi/XI/System/Mail",
"THeaderREPLY-TO");
String valueOld = conf.get(key);
if (valueOld != null) {
String valueNew = mailFrom;
conf.put(key, valueNew);
}
return mailFrom;
}
This works but I needed to asign the result of the udf to a node of my target message in order for the udf to be called.
Is there a way to call a UDF without assigning the result to anything in the target message....
Is there a better way to modify the ASMA than using a UDF in a mapping.
Thanks.
assign it to the root node of the target message.
Also use exceptions in your code so that you can do independent testing.
Additional ref:
/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.