Possibility to add multiple values for SequenceEnd
- Dominant language
- C#
- Stars
- 490
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
I have encountered a situation where I might have to use multiple value for the `SequenceEnd` field for the `EdiSegmentGroupAttribute`.
This is a part of the EDI DELFOR D96A standard structure:

Underlined with red are the starting segments for two consecutive segment groups in the parent segment group.
The blue circle says that Segment Group 22 can be absent.
Here are some of the classes I defined in my Model:
//[EdiSegmentGroup("QTY", SequenceEnd = "PAC")]
[EdiSegmentGroup("QTY", SequenceEnd = "NAD")]
public class Sg20:Qty
{
public Scc SchedulingConditions { get; set; }
public List SomeDateTime { get; set; }
public List SegmentGroup21 { get; set; }
}
[EdiSegmentGroup("RFF", SequenceEnd = "PAC")]
public class Sg21:Rff
{
public Dtm SomeDateTime { get; set; }
}
[EdiSegmentGroup("PAC", SequenceEnd = "NAD")]
public class Sg22:Pac
{
public ListMeasurements { get; set; }
public ListQuantity { get; set; }
public ListSomeDateTime { get; set; }
public List SegmentGroup23 { get; set; }
}
[EdiSegmentGroup("PCI", SequenceEnd = "NAD")]
public class Sg23:Pci
{
public ListGoodsIdentityNumber { get; set; }
}
[EdiSegmentGroup("NAD", SequenceEnd = "UNS")]
public class Sg24:Nad
{
public ListLocationIdentification { get; set; }
public ListFreeText { get; set; }
public List SegmentGroup25 { get; set; }
public List SegmentGroup26 { get; set; }
public List SegmentGroup27 { get; set; }
public List SegmentGroup29 { get; set; }
public List SegmentGroup31 { get; set; }
}
Here is the actual issue: If Seg 22 is present in the EDIFACT message, then the `SequenceEnd` value for Seg 20 will have to be "PAC". If it is missing, the value should be "NAD". I will not know from the start how the message is constructed, so I need to have a possibility to set the `SequenceEnd` field in such a way to support both situations. Maybe there's some other way I'm missing to achieve what I wish? I searched the issues on `SequenceEnd` on this page and nothing stood up to help me out...
Thank you for your help!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with EdiSegmentGroupAttribute and the handling of its SequenceEnd value. Determine how segment-group boundaries are resolved when Sg22 is present or absent, then verify that both PAC and NAD can correctly terminate Sg20 for the supplied DELFOR D96A structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100