Ran into this while generating source for TT's DD.
The DD contains the NoSides tag in two different places (it denotes a top-level group, and a nested group inside of a different group).
In their DD:
<message name='TradeCaptureReport' msgcat='app' msgtype='AE'>
...
--> <group name='NoSides' required='N'>
<group name='NoPartyIDs' required='N'>
<field name='PartyID' required='N' />
<field name='PartyRole' required='N' />
<field name='PartyRoleQualifier' required='N' />
<field name='PartyIDSource' required='N' />
</group>
<field name='OrderID' required='N' />
<field name='OrderIDGUID' required='N' />
<field name='Account' required='N' />
<field name='Side' required='N' />
<field name='AllocQty' required='N' />
<field name='AllocPositionEffect' required='N' />
</group>
<group name='NoTCRLegs' required='N'>
<field name='LegLastPx' required='N' />
<field name='LegLastQty' required='N' />
--> <group name='NoSides' required='N'>
<field name='OrderID' required='N' />
<field name='OrderIDGUID' required='N' />
<field name='Account' required='N' />
<field name='Side' required='N' />
<field name='AllocQty' required='N' />
<field name='AllocPositionEffect' required='N' />
</group>
</group>
That's totally legit as far as I know. However, the generator generates this (in Messages\FIX44\MessageFactory.cs):
public Group Create(string beginString, string msgType, int correspondingFieldID)
{
...
if (QuickFix.FIX44.TradeCaptureReport.MsgType.Equals(msgType))
{
switch (correspondingFieldID)
{
case QuickFix.Fields.Tags.NoSecurityAltID: return new QuickFix.FIX44.TradeCaptureReport.NoSecurityAltIDGroup();
case QuickFix.Fields.Tags.NoLegs: return new QuickFix.FIX44.TradeCaptureReport.NoLegsGroup();
case QuickFix.Fields.Tags.NoLegSecurityAltID: return new QuickFix.FIX44.TradeCaptureReport.NoLegsGroup.NoLegSecurityAltIDGroup();
--> case QuickFix.Fields.Tags.NoSides: return new QuickFix.FIX44.TradeCaptureReport.NoSidesGroup();
case QuickFix.Fields.Tags.NoPartyIDs: return new QuickFix.FIX44.TradeCaptureReport.NoSidesGroup.NoPartyIDsGroup();
case QuickFix.Fields.Tags.NoTCRLegs: return new QuickFix.FIX44.TradeCaptureReport.NoTCRLegsGroup();
--> case QuickFix.Fields.Tags.NoSides: return new QuickFix.FIX44.TradeCaptureReport.NoTCRLegsGroup.NoSidesGroup();
}
}
That function's interface is defined in QuickFix\IMessageFactory.cs. Obviously it's a mistake to think that msgtype and group-counter-tag alone are enough to identify the Group.
Luckily, the only user of this function is QuickFix\Message\Message.cs -> SetGroup(...), so changing it should not be that disruptive.
So, the tasks to solve are:
Ran into this while generating source for TT's DD.
The DD contains the NoSides tag in two different places (it denotes a top-level group, and a nested group inside of a different group).
In their DD:
That's totally legit as far as I know. However, the generator generates this (in Messages\FIX44\MessageFactory.cs):
That function's interface is defined in
QuickFix\IMessageFactory.cs. Obviously it's a mistake to think that msgtype and group-counter-tag alone are enough to identify the Group.Luckily, the only user of this function is
QuickFix\Message\Message.cs -> SetGroup(...), so changing it should not be that disruptive.So, the tasks to solve are:
QuickFix\Message\Message.cs->SetGroup(...)can pass an ancestry chain to the group-create methodIMessageFactory::Create/groupto take that ancestry chainQuickFix\DefaultMessageFactory.cs->Create/groupper that interface change. It will need to create the right group based on the ancestry chain.Messages\FIXxx\MessageFactory.cs->Create/groupmethods. Generated methods will need to create the right group based on that ancestry chain.