cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping: different Queues.

Former Member
0 Kudos

Hi All,

I have a problem.

I have a source structure where i check 2 fields.

example:

<root>
<element>
 <id>Z01</id>
 <sub>
  <text>01Text</text>
 </sub>
<element>
<element>
 <id>Z02</id>
 <sub>
  <text>02Text</text>
 </sub>
<element>
<element>
<id>Z03</id>
 <sub>
  <text>03Text</text>
 </sub>
<element>

i check field <b>id</b> .. and field <b>text</b>.

So i have two queues going in my user function.

And when for example value is Z03 in the first queue i get from the second queue the value with the same index. Works fine!

But now following problem comes up:


<element>
 <id>Z01</id>
 <sub>
  <text>01Text</text>
 </sub>
 <sub>
  <text>01Text_2</text>
 </sub>
<element>

With some element like this the text queue is longer than the id queue and i didn't work anymore.

any idea?

Regards,

Robin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Are you using some custom function to manage this ?

Can you post here the code, in order to allow to forum partecipants to check if they can see some bug ?

You know "Errare humanum est"

Regards,

Sandro

Former Member
0 Kudos

Hi Sandro,

the customer function isn't the problem.

I just want to have the queues in the same length.... because than the customer function works as well.

How can i handle such a thing?

When you look at the source messages i posted before you see why they have the different length..is there any possibility like "only queue entry on Context Change" or something similiar?

any adivse?

Regards,

Robin

Former Member
0 Kudos

You have the java code in the custom function, and you know, when you can write code you have no limit.

Just create the missing entry with the custom function, with addValue, and test if the queue contain Context Change and so.

Regards,

Sandro

Former Member
0 Kudos

Well the problem is, its always different.

for example one request has 1 more queue entry on text. And the next request maybe 8.

I have to syncronise the queues somehow before they reach my customer function.

Regards,

Robin

Former Member
0 Kudos

You can syncronize 2 queue with a nested loop of a queue on the other.

Sandro

Former Member
0 Kudos

Hi,

i try this allready without success.

You have maybe some example how this would look.

Regards,

Robin

Former Member
0 Kudos

i can use something like that:


for ( int i = 0; i < a.length; i++ ) {
if(b.length > i){
result.addValue(b<i>);
}else{
result.addValue("***");
}
}

so my queues become the same length ... but that isn't enough for me.

I have to add the "***" on this place in the queue where in source structure the subsegment occurs 2 times.

Some help would be great.

Regards,

Robin

Former Member
0 Kudos

Robin,

could you give me a sample of how you want the target structure to be, so I can try to help you better?

Kind Regards,

Sergio