[FX-97] Required Fields in Optional Components Should be Flagged as Optional - Fix8 JIRA

Required Fields in Optional Components Should be Flagged as Optional

Description

Reference is made to the discussion on the fix8 support group, URL of the thread is:
https://groups.google.com/forum/#!topic/fix8-support/OzwAnRDxemA

The code generated by the f8c compiler for a message with optional components and mandatory fields within them flags the fields as mandatory though component itself is optional.

For example, in the attached xml schema, the message for collateral report is:
<message name="CollateralReport" msgtype="BA" msgcat="app">
<field name="CollRptID" required="Y" />
<field name="CollInquiryID" required="N" />
<field name="CollStatus" required="Y" />
[snip]
<component name="Instrument" required="N" />
[snip]
</message>

And the component instrument is defined as:
<component name="Instrument">
<field name="Symbol" required="Y" />
<field name="SymbolSfx" required="N" />
<field name="SecurityID" required="N" />
[snip]
</component>

As instrument is not mandatory in the collateral report message, the required="Y" for symbol in instrument should be ignored. However, fix8 compiler generated code treats the Symbol as a required field in the collateral report.

The FIX44 spec mentions this:
***= Required status should match "Req'd" setting for <Instrument> component block in the message definition

In this case the decision by the fix8 compiler to treat the field as mandatory is probably incorrect.

Environment

Fix 4.4

Status

Assignee

David Dight

Reporter

Venkat

Labels

None

Branch

None

Products

None

Components

Fix versions

Affects versions

0.9.5

Priority

Minor