cancel
Showing results for 
Search instead for 
Did you mean: 

How to read all values of a queue

Former Member
0 Kudos

Hi All,

In Message mapping I am checking condition for field value based on incoming value.

In test cases i can see the second or third  occurence is getting supressed and first value fails the condition and mapping node not created.

I would like to know how to read multiple values from queue and check condition for each value and if correct value present condition should pass.

I tried all possible context changes but no luck.

Any ideas how to read all values coming .

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi Jan,

you can use the udf of type context or all values in the queue.

Please provide your mapping logic or mapping screenshot, to provide inputs.

regards,

Harish

Former Member
0 Kudos

Please see mapping shots attached.

Udf i am using is to check filed exists and if check the existing value to a constant.

It is working for one field. If fields are coming multiple times values in queue context are suppressing.

I need to check all the fields coming in queue .

plz advice.

String field = null;

if (var1 != null)

{

field = var1;

}

else if (var2 != null)

{

field = var2;

}

else if (var3 != null)

{

field = var3;

}

return field;

former_member184720
Active Contributor
0 Kudos

Hi Jan - what do you mean by multiple times?

Can you provide source xml and expected output?

It sounds similar to the other question ""

Did you try using that?

Former Member
0 Kudos

Hareesh ...you are back...good to see...

the other thread was our discusson only....but that was fixed so started this one.

Ok issue is:

Node1

Node2

Node3

One of them will come based the one that is coming i need to populate target fields.

Now inside nodes fields...I am checking 3 fields under each node to match against a constant value.

It is working if Node1 is occuring multiple times.

but if node2 or node3 are occuring multiple times it is not populating fields on target side.

In above mapping diagram it is suppressing the values in a queue. that was queue from UDF which i am using.

So now my query is  to check within the same udf pasted above it should not suppress any value it pass each value as output.

former_member184720
Active Contributor
0 Kudos

Can you please share the screenshot of your source & target structure.

Sorry but It's hard to understand

Former Member
0 Kudos

If multiple times first @name is occuring  feild udf should not supress values. it should pass n number values as output so that equalsS will check against constant value.

Thanks for your time

Harish
Active Contributor
0 Kudos

Hi

please convert udf to context udf. Please refer below wiki

UDF Execution Type - Context and Queue. - Process Integration - SCN Wiki

former_member184720
Active Contributor
0 Kudos

Hi Jan - Did you raise the context of @name and @iskey ? If so keep it normal and try..

please note that, It would be very difficult to provide the solution with imaginary structure.

I'm asking for the source structure(data type)

How would i know what/how/where is @name occurs in the payload ?

Please share the structure of both source and target and sample xml that you are trying to test so that we can suggest you..

Former Member
0 Kudos

<?xml version="1.0" encoding="UTF-8"?>

<msg version="" dbName="">

   <rowOp isLast="" cmitLSN="" cmitTime="" authID="" correlationID="" planName="">

      <updateRow subName="" srcOwner="" srcName="" intentSEQ="" rowNum="" hasLOBCols="">

         <col name="END_RSN_CDE" isKey="852369" invalidData="" rawData="">

            <smallint>

               <beforeVal invalidData="" rawData=""/>

               <afterVal invalidData="" rawData=""/>

            </smallint>

            <date>

               <beforeVal invalidData="" rawData=""/>

               <afterVal invalidData="" rawData=""/>

            </date>

            <char>

               <beforeVal invalidData="" rawData=""/>

               <afterVal invalidData="" rawData=""/>

            </char>

         </col>

         <col name="SVC_USER_SDT" isKey="789654" invalidData="" rawData="">

            <smallint>

               <beforeVal invalidData="" rawData=""/>

               <afterVal invalidData="" rawData=""/>

            </smallint>

            <date>

               <beforeVal invalidData="" rawData=""/>

               <afterVal invalidData="" rawData=""/>

            </date>

            <char>

               <beforeVal invalidData="" rawData=""/>

               <afterVal invalidData="" rawData=""/>

            </char>

         </col>

      </updateRow>

   </rowOp>

</msg>

former_member184720
Active Contributor
0 Kudos

Did you try like this

Former Member
0 Kudos

when i tried this  values are getting suprressed after And condition and no mapping is giving target output values.

Harish
Active Contributor
0 Kudos

Hi Ja,

Can you please provide the displau queue of If just before the output field?

regards,

Harish