KB Article #177724

compilation error when deploying / simulating a map with a CHOICE in output

Problem

-- symptoms:

ERROR --> Failure detected during transaction. Error during :

<< reason = Error during pre commit action on Mapping

Server>>
Exception source message = '8031 - BroadcastAgent : SendToServer failed - compilation failed'


+- Assertion failed ! --
| Location: file Generator/ICodeInstruction.cpp, line 1106
| Expression: m_pRelativeTo == NULL || sForeignKey.length() > 0
| Fault message: attempt to collect an empty relative foreign key
+- Execution aborted --


Resolution

* Issue is due to wrong DML code auto-generated for an XML choice in output of a map.

* Issue will be fixed in Mapping Services 3.0.1_SP4 (to be released at this moment).

* Issue can be workarounded by fixing DML paths manually.

Ex: wrong DML code:

select 1st
else if defined in:!p37:SpecifiedIntermittentPartner! then
select 2nd
else if defined in:!p37:SpecifiedKnownPartnerContact! then
select 3rd
else if defined in:!p37:SpecifiedNewPartner! then
select 4th


must be replaced by larger path:


if defined in:\AdvanceShipmentNotification\AdvanceShipment\PurchasedBy\!p37:SpecifiedFullPartner! then
select 1st
else if defined in:\AdvanceShipmentNotification\AdvanceShipment\PurchasedBy\!p37:SpecifiedIntermittentPartner! then
select 2nd
else if defined in:\AdvanceShipmentNotification\AdvanceShipment\PurchasedBy\!p37:SpecifiedKnownPartnerContact! then
select 3rd
else if defined in:\AdvanceShipmentNotification\AdvanceShipment\PurchasedBy\!p37:SpecifiedNewPartner! then
select 4th