Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify implicit link between field and code set scenarios #49

Open
kleihan opened this issue Nov 10, 2023 · 2 comments
Open

Clarify implicit link between field and code set scenarios #49

kleihan opened this issue Nov 10, 2023 · 2 comments
Assignees
Labels
SCENARIO Support for scenarios

Comments

@kleihan
Copy link
Member

kleihan commented Nov 10, 2023

Section 3.8.2 Data domain of a field defines the following:

Since <codeSet> is also qualified by scenario, a field will link to
the code set of the same scenario. By default, "base" scenario field
links to "base" code set.

Has this paragraph become obsolete? There should be no more automatic link of field and code set scenario with v1.1 because a field now either has a datatype or a code set. A field with a scenario would then implicitly link to the datatype of code set scenario if there is one with the same name as the field scenario.

Provide an example with scenarios.

@kleihan kleihan added this to the Orchestra v1.1RC2 milestone Nov 17, 2023
@kleihan
Copy link
Member Author

kleihan commented Nov 17, 2023

V1.0 has an implicit link when using the scenario attribute in a field definition:

<fixr:field id="59" name="TimeInForce" type="TimeInForceCodeSet" scenario="DayOrders"/>

It requires the existence of a code set scenario with the same name that defines the valid codes for the field in that scenario:

<fixr:codeSet id="59" type="char" scenario="DayOrders">
    <fixr:code name="Day" id="59001" value="0"/>
</fixr:codeSet>

With V1.1 this implicit link then gets extended to datatype scenarios if the type attribute is used:

<fixr:field id="34" name="MsgSeqNum" type="int" scenario="SeqNum"/>

It requires the existence of a datatype scenario with the same name that defines the valid codes for the field in that scenario:

<fixr:datatype name="int" scenario="SeqNum">
	<fixr:mappedDatatype standard="XML" base="xs:positiveInteger"/>
	<fixr:mappedDatatype standard="ISO11404" base="Ordinal"/>
</fixr:datatype>

The implicit link between field and code set / datatype scenarios does not seem appropriate. Fields may need their own scenarios to distinguish between attributes other than codeSet and type, for example implLength.

<fixr:field id="448" name="PartyID" implLength="5" type="String" scenario="ShortPartyID"/>
<fixr:field id="448" name="PartyID" implLength="30" type="String" scenario="LongPartyID"/>

Hence it seems better to require explicit scenarios and no longer support implicit ones that may be subject to interpretation.

See also Pull Requests FIXTradingCommunity/fix-orchestra#171 and FIXTradingCommunity/fix-orchestra#173.

@kleihan
Copy link
Member Author

kleihan commented Jan 15, 2024

FIXTradingCommunity/fix-orchestra#171 asks for the addition of typeScenario and codeSetScenario to remove ambiguity. A field definition not only has a type (datatype or scenario) attribute but numerous others:

minInclusive
maxInclusive
implLength
implMinLength
implMaxLength
presence
encoding
value
rendering

Hence a field could not only have two or more type (datatype or code set) scenarios but also others. One would want to express a field scenario together with a type scenario in such cases. A single attribute scenario is then no longer sufficient. However, a use case is needed to show that this is not just a theoretical case.

@kleihan kleihan self-assigned this Aug 9, 2024
@kleihan kleihan added the SCENARIO Support for scenarios label Aug 21, 2024
@kleihan kleihan moved this to In progress in Orchestra v1.1 RC2 Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SCENARIO Support for scenarios
Projects
Status: No status
Development

No branches or pull requests

1 participant