Sunteți pe pagina 1din 4

Mapping Issue - Multiple Occurrences...

Adam Vogg 11 posts since 09-Sep-2016


Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 14:23
Hello,

I have an issue where when a particular node occurs for multiple times, only the first instance is correctly
mapping a value. I think I need to resolve issue with context or other node functions. I have been trying to
read more about these, but I can't figure this out. Here is the detail:

Source node (<Operation> is 1...unbounded)

<Operation>
<OpID>10</OpID>
<Site type="PlannedLocation">
<ID>DHV</ID>
</Site>
<Site type="PlannedDepartment">
<ID>ELECFAB</ID>
</Site>
</Operation>
<Operation>
<OpID>20</OpID>
<Site type="PlannedLocation">
<ID>DHV</ID>
</Site>
<Site type="PlannedDepartment">
<ID>MECHFAB</ID>
</Site>
</Operation>

How I need destination (<access> is 1...unbounded)

<access>
<OrgCode>DHV</OrgCode>
<DEPARTMENT_CODE>ELECFAB</DEPARTMENT_CODE>
</access>
<access>
<OrgCode>DHV</OrgCode>

Generated by Jive on 2016-10-05Z


1
Mapping Issue - Multiple Occurrences...

<DEPARTMENT_CODE>MECHFAB</DEPARTMENT_CODE>
<access>

Here is how I am mapping DEPARTMENT_CODE. This works when only 1 Operation exists. It fails when
there is another occurence of Operation. With error of "Values missing in queue context."

Where am I going wrong?


Tags: mapping

Gaurav Kant 147 posts since 12-Nov-2014


Re: Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 14:47
Hi Adam,

Change the type context to root node and try.

Regards,
Gaurav

Adam Vogg 11 posts since 09-Sep-2016


Re: Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 15:03
Gaurav,

Thank you for reply. I tried changing both @type and <ID> to context Root node, and still getting the same
error.

Also to mention, I am mapping <Operation> to <access>.

Gaurav Kant 147 posts since 12-Nov-2014


Re: Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 15:05

Generated by Jive on 2016-10-05Z


2
Mapping Issue - Multiple Occurrences...

Adam,

Pls try below approach. IfWithoutelse will throw error if condition will fail so to handle this use if-else like below.

Regards,
Gaurav

Gaurav Kant 147 posts since 12-Nov-2014


Re: Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 15:12
In addition to above, If receiver side OrgCode is required field then you can you mapwithdefault after if-else
to avoid any failure in response.

Regards,
Gaurav

Adam Vogg 11 posts since 09-Sep-2016


Re: Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 15:21
I tried the if-then-else, and while it is not generating an error any longer in the mapping test, it is putting in null
values for DEPARTMENT_CODE instead of the value I need.

Praveen Gandepalli 2,707 posts since 03-Apr-2006


Re: Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 15:27
Hi Adam,

Generated by Jive on 2016-10-05Z


3
Mapping Issue - Multiple Occurrences...

Use attached mapping.

Regards,
Praveen.
• test.png 29.3 K
• mapping_1.png 44.9 K

Adam Vogg 11 posts since 09-Sep-2016


Re: Mapping Issue - Multiple Occurrences not pulling correctly 05-Oct-2016 15:39
Praveen,

Thank you very much, sir. This worked. I wouldn't have thought about moving the <access> element into the
same functional mapping like that. I am going to study this a bit to gain further understanding.

Thank you again,

Adam

Generated by Jive on 2016-10-05Z


4

S-ar putea să vă placă și