on 11-09-2007 8:03 AM
Hi Experts, i need some knowledge sharing here.
Anybody can tell me how can we get the numbers of rows in a message by using loop in BPM?
I was thinking of using Loop and container node. But i still don't get it how can i use the loop condition so that my loop is not looping forever.
Thank you so much guys....
I use the "Count" function in graphical message mapping and count the segments and add these to an unused field in the footer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"I use the "Count" function in graphical message mapping and count the segments and add these to an unused field in the footer"
Hi thx for the reply, however, can you explain to me in more detail.
My scenario is i got a message with structure like this:
Source Message:
Header 1..1
item 1..N
Type 1..1
Target Message:L
Header 1..1
result 1..1
Now, i want to count how many are there Type with value is for example 'E' and map it to the target message in node 'result'. So if there are 2 'Type' with value 'E' therefore the 'result' will filled with number '2'. If there is only 1 'Type' with value 'E' thus the 'result' will be filled with number '1'.
Do I have to use oneAsMany function?
Wishnu,
This can be easily achieved using UDF. Just create Advanced UDF -Queue. Write the below code
UDF [ Advanced - queue, input variable - type]
int count =0;
for(int j =0;j<type.length;j++)
{
if(type[j].equals("E"))
count+=1;
}
result.addValue(""+count+"");
Mapping
Type[Change Context to Header]--->UDF--->result
raj.
Hi,
Use loop step with container operation in integration process.
Use a container variable to hold the value of the count.
Hope this helps.
Prasad Babu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.