cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I have a problem with getting the mapping rigth.

I have the following source message:

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

<ns0:rtptest xmlns:ns0="http://">
   <messNo>123</messNo>
   <P01>
      <radNo>1</radNo>
      <P05>
         <P05data>11</P05data>
      </P05>
      <PXX>
         <PXXdata>111</PXXdata>
      </PXX>
   </P01>
   <P01>
      <radNo>2</radNo>
      <PXX>
         <PXXdata>222</PXXdata>
      </PXX>
   </P01>
   <P01>
      <radNo>3</radNo>
      <P05>
         <P05data>33</P05data>
      </P05>
      <PXX>
         <PXXdata>333</PXXdata>
      </PXX>
   </P01>
</ns0:rtptest>

The result should lokk in this way:

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

<ns0:rtptest xmlns:ns0"http://">
   <messNo>123</messNo>
   <P01>
   <radNo>1</radNo>
      <PXX>
      <PXXdata>111</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>2</radNo>
      <PXX>
      <PXXdata>222</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>3</radNo>
      <PXX>
      <PXXdata>333</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>1</radNo>
      <P05>
      <P05data>11</P05data>
      </P05>
   </P01>
   <P01>
   <radNo>3</radNo>
      <P05>
      <P05data>33</P05data>
      </P05>
   </P01>
</ns0:rtptest>

But we get the following result:

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

<ns0:rtptestxmlns:ns0="http://">
<messNo>123</messNo>
   <P01>
   <radNo>1</radNo>
      <PXX>
      <PXXdata>111</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>2</radNo>
      <PXX>
      <PXXdata>222</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>3</radNo>
      <PXX>
      <PXXdata>333</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>1</radNo>
      <P05>
      <P05data>11</P05data>
      </P05>
   </P01>
   <P01>
   <radNo>2</radNo>
   </P01>
   <P01>
   <radNo>3</radNo>
      <P05>
      <P05data>33</P05data>
      </P05>
   </P01>
</ns0:rtptest>

Ass you sse we get an extra P01 with <radNo>2</radNo> in it.

Thatone should not come. When we get this result we have P01 from the source mapped to P01 in the target.

I've tried to use P05 with the context set to rtptest to push the P01 but then we get the following result.

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

<ns0:rtptest xmlns:ns0="http://">
<messNo>123</messNo>
   <P01>
   <radNo>1</radNo>
      <PXX>
      <PXXdata>111</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>2</radNo>
      <PXX>
      <PXXdata>222</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>3</radNo>
      <PXX>
      <PXXdata>333</PXXdata>
      </PXX>
   </P01>
   <P01>
   <radNo>1</radNo>
      <P05>
      <P05data>11</P05data>
      </P05>
   </P01>
   <P01>
   <radNo>2</radNo>
   </P01>
</ns0:rtptest>

We are still getting the P01 with <radNo>2</radNo> but not the last one.

I want the P01 with <radNo>2</radNo> to not be pushed and the last P01 to be ther when I have data in P05.

Does anybody know how I can solve this?

BR

Kalle

0 Likes
View Entire Topic
GabrielSagaya
Active Contributor
0 Likes

PXXDATA EQUALS CONSTANT ("") -> NOT -> IFWITHOUTELSE->

REMOVECONTEXT->COLLAPSECONTEXT->SPLITBY VALUE(value change)->P01

radno-->radno

pxxdata->pxxdata

checking whether source data exist then create target parent node wrt source node.

Former Member
0 Likes

That config only gets me the first of the second P01.