[QFJ-752] Instrument component dont show the instrumentParties repeating group Created: 30/Jul/13  Updated: 12/Mar/20

Status: Open
Project: QuickFIX/J
Component/s: Engine, Message Generation
Affects Version/s: 1.5.3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Christian Avalos Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: QuickfixJ


 Description   

the noInstrumentParties(1018) component is in the componentFields int array, and not in componentGroup, so, when it added a instrumentParties ,the generated message has the field 1018, but not the other possibles fields of instrumentParties (1019, 1050, 1051, 1052)



 Comments   
Comment by Christian Avalos [ 30/Jul/13 ]

this issue is fixed adding the noIntrumentParties fields into componentGroups attribute (and removing from componentFields int[] )

public class Instrument extends quickfix.MessageComponent {
static final long serialVersionUID = 20050617;
public static final String MSGTYPE = "";
private int[] componentFields =

{ 55, 65, 48, 22, 454, 460, 461, 167, 762, 200, 541, 224, 225, 239, 226, 227, 228, 255, 543, 470, 471, 472, 240, 202, 947, 206, 231, 223, 207, 106, 348, 349, 107, 350, 351, 691, 667, 875, 876, 864, 873, 874, 965, 966, 1049, 967, 968, 969, 970, 971, 996, 997, 1079, }

;
private int[] componentGroups =

{1018, }

;

public Instrument()

{ super(); }

......
}

Comment by Jörg Thönnes [ 31/Jul/13 ]

This message and field classes are generated automatically from the data dictionary so this is most probably a code generation issue.

Comment by Christoph John [ 31/Jul/13 ]

... or in the data dictionary.

Comment by Marcin L [ 12/Mar/20 ]

I was wondering if this is really a bug. Clearly the definition in FIX5* looks like this

<component name="Instrument">
[...]
<component name="InstrumentParties" required="N"/>
</component>

<component name="InstrumentParties">
<group name="NoInstrumentParties" required="N"> // 1018
<field name="InstrumentPartyID" required="N"/> // 1019
<field name="InstrumentPartyIDSource" required="N"/> // 1050
<field name="InstrumentPartyRole" required="N"/> // 1051
<component name="InstrumentPtysSubGrp"/>
</group>
</component>

<component name="InstrumentPtysSubGrp">
<group name="NoInstrumentPartySubIDs" required="N"> // 1052
<field name="InstrumentPartySubID" required="N"/> // 1053
<field name="InstrumentPartySubIDType" required="N"/> // 1054
</group>
</component>

Component classes have their own dedicated classes generated so to access the group we need to go via component abstraction.

public class Instrument extends quickfix.MessageComponent {
private int[] componentFields =

{ [...], 1018, [...] }

;
private int[] componentGroups = { };
}

public class InstrumentParties extends quickfix.MessageComponent {
private int[] componentFields = { };
private int[] componentGroups =

{ 1018, }

;
}

public class InstrumentPtysSubGrp extends quickfix.MessageComponent {
private int[] componentFields = { };
private int[] componentGroups =

{ 1052, }

;
}

This is not a single case. This is basically a case for every component containing another component with a repeating group e.g. in FIX44 UnderlyingInstrument -> UnderlyingStipulations

What kind of errors currently generated classes could produce with this behaviour?

Generated at Sat Nov 23 07:37:48 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.