on 06-29-2009 10:02 AM
Hi,
In my mapping i have a requirement where the input can be any of three values or not existing. (lets just call them V0, V1, V2 and V3, where V0 is the not existing tag)
If the input is V0, or V1 or V2 i need output an Empty Constant, If the input is V3 i need to pass the value.
I've worked this out with a graphical mapping, but it involves a lot of boxes. It works though.
I'm still wondering if i can do it with a UDF though. Only problem is that my JAVA knowledge is not nearly as good as it should be, so maybe one of you out there can give me some ideas/code.
The thing that give the most headache is the fact that the tag might not exist at all in the source message. How do I deal with that in JAVA code?
Any ideas are welcome.
Kind regards
Robert
Problem is solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert,
below is the Jave code, below code is w.r.t exection type as CONTEXT/QUEUE
public void calculate(String[] var1, String[] var2, String[] var3, String[] var4, ResultList result, Container container) throws StreamTransformationException{
if(var1.length != 0 || var2.length != 0 || var3.length != 0)
result.addvalue(" ");
else if(var4.length != 0)
result.addValue(<passthe value>);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.