on 08-13-2011 6:41 AM
Hi for all, i have the message 1 and parameter input of type integer named p_index
The Message 1 have following structure:
<Message>
<item>
<key>A</key>
<value>Auto</value>
</item>
<item>
<key>M</key>
<value>Manual</value>
</item>
</Message>
The objective is use the parameter p_index for retrieve the value of the field key of the node item with position p_index. For example: p_index is equal to 1 the key value is M or p_index is equal to 0 the key value is A.
Thanks for the help.
not sure if i understood ur Q correctly or not??
but i guess u r passing parameter (under signature tab) and based upon that parameter value u want to fetch the "Key" filed value from the source payload...
if yes then u can use CopValue function (under constants)..
Key----CopyValue( click on the drop down and select ur parameter) -
target
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, for all, my solution is create the following UDF:
public void getValueByPosition(String[] var, int index, ResultList result, Container container) throws StreamTransformationException{
result.addValue(var[index]);
}
And message mapping is:
key (Source) --> removeContexts --> getValueByPosition (with parameter p_index of the signature tab) --> key (Target)
Thanks.
User | Count |
---|---|
91 | |
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.