on 07-08-2008 4:21 PM
Hello Experts,
On the target message we have a field where the message sequence number have to be saved.
So the question is how we can do that?
Is there is some global storage to save the counter?
I guess JAVA-sections and GlobalContainer will not work here as I need some storage which we be global to all instances of the mapping.
Thanks for your responses.
Best Regards,
Artsiom Anichenka
You can follow these steps to generate a sequence no using global container.
1) Define a global variable by clicking the JAVA_SECTION_TOOLTIP icon on the design tab of source message type of ur message mapping.
2) Enter the following in the GlobalVariables Section
Integer counter =0;
3) Define a user defined function
function myudf(Container container)
{
Integer seq = 0;
GlobalContainer globalContainer = container.getGlobalContainer();
a = globalContainer.getParameter("counter");
seq = globalContainer.getParameter("counter");
seq = seq + 1;
globalContainer.setParameter("counter",seq);
return a;
}
4) use myudf to your target field
myudf--->target sequence no field
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 | |
11 | |
10 | |
9 | |
9 | |
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.