You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, the message “AllocationReport” contains two components, both containing the group “NoLegs” (555), although the groups have different content.
QuickFix tries to create a DDMap per message, containing (in its “Groups” property) all the groups from all the components of the message.
When it has to create the DDMap for the “AllocationReport” message:
it processes the component “TrdInstrmtLegGrp” and inserts the group “NoLegs” to the dictionary, with key 555.
It processes the component “InstrmtLegAllocGrp” and tries to insert its “NoLegs” group, but the dictionary already contains the key 555, therefore an Exception is thrown.
elseif(childNode.Name=="group"){DDField fld =FieldsByName[childNode.Attributes["name"].Value];DDGrpgrp=newDDGrp();XmlAttributereq=childNode.Attributes["required"];if(req!=null&&req.Value=="Y"&&(componentRequired==null||componentRequired.Value==true)){ddmap.ReqFields.Add(fld.Tag);grp.Required=true;}if(!ddmap.IsField(fld.Tag)){ddmap.Fields.Add(fld.Tag,fld);}grp.NumFld=fld.Tag;parseMsgEl(childNode,grp);ddmap.Groups.Add(fld.Tag,grp);//########### It fails when the second component is processed ###########}
The text was updated successfully, but these errors were encountered:
santiagoribero
changed the title
DataDictionary cannot be build out of an message containing two components with a same group name
DDMap cannot be build out of a message containing two components with a same group name
Jun 10, 2019
Your code diagnosis is a little different than mine, but it all stems from the same flawed design. The original writers simply didn't plan for this to ever happen.
I'm going to close this as dupe, but I'll make a note in the other issue to refer to your code findings here.
Example case:
As you can see, the message “AllocationReport” contains two components, both containing the group “NoLegs” (555), although the groups have different content.
QuickFix tries to create a DDMap per message, containing (in its “Groups” property) all the groups from all the components of the message.
When it has to create the DDMap for the “AllocationReport” message:
The text was updated successfully, but these errors were encountered: