Giter Club home page Giter Club logo

Comments (8)

MikeEdgar avatar MikeEdgar commented on August 13, 2024

Hi @saravanan-periyasamy03 , do you mean that the composite separator is used in the data and it should not be interpreted as such? Since the ISA version is 00400, the repetition feature of X12 isn't actually enabled for the interchange.

For the PRF segment, the intent is that MILLWORK:LIT08-04-23 is the entire PRF01 element?

from staedi.

saravanan-periyasamy03 avatar saravanan-periyasamy03 commented on August 13, 2024

Hi @MikeEdgar ,

Yes. MILLWORK:LIT08-04-23 is the entire data of PFR01 and we don't want EDIStreamReader to interpret it and throw exception.

Since the ISA version is 00400, the repetition feature of X12 isn't actually enabled for the interchange. Are you saying for ISA version 00400 , the repetition will not take any effect?

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@saravanan-periyasamy03 , yes repetition will not take effect, but the composite element will be used, which is what you're seeing with :. Even then, it shouldn't throw an exception, but rather emit an error event (that you can ignore in this case).

Can you share a small file that reproduces the exception?

from staedi.

saravanan-periyasamy03 avatar saravanan-periyasamy03 commented on August 13, 2024

Hi @MikeEdgar ,

Here is the sample EDI,

ISA*00* *00* *02*ABCB *01*123456789 *230816*1432*U*00400*111283228*0*P*:~ GS*MM*ABCB*123456789*20230816*1432*283230*X*004010~ ST*866*111300152~ LX*1~ AT8*G*L*830*16~ PRF*230222069~ PRF*WORK:MIT08-04-23~ SE*6*111300152~ GE*1*283230~ IEA*1*111283228~

Note: We are not having the composite element defined in the schema.

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@saravanan-periyasamy03 , I'm not able to reproduce the exception with the test case below. Besides the schema, is there anything else I could be missing? Does this test case produce the exception for you?

@Test
void testIssue383() throws IOException {
    EDIInputFactory factory = EDIInputFactory.newFactory();
    InputStream source = new ByteArrayInputStream((""
            + "ISA*00*          *00*          *02*ABCB           *01*123456789      *230816*1432*U*00400*111283228*0*P*:~ "
            + "GS*MM*ABCB*123456789*20230816*1432*283230*X*004010~ "
            + "ST*866*111300152~ "
            + "LX*1~ "
            + "AT8*G*L*830*16~ "
            + "PRF*230222069~ "
            + "PRF*WORK:MIT08-04-23~ "
            + "SE*6*111300152~ "
            + "GE*1*283230~ "
            + "IEA*1*111283228~").getBytes());
    EDIStreamReader reader = factory.createEDIStreamReader(source);

    try {
        while (reader.hasNext()) {
            switch (reader.next()) {
            case SEGMENT_ERROR:
            case ELEMENT_OCCURRENCE_ERROR:
            case ELEMENT_DATA_ERROR:
                fail("Unexpected error: " + reader.getErrorType());
            default:
                break;
            }
        }
    } catch (Exception e) {
        fail(e);
    } finally {
        reader.close();
    }
}

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

Hi @saravanan-periyasamy03 , please see my earlier comment. I was not able to reproduce the exception and will need some additional information or a test case that demonstrates the problem in order to identify a fix.

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

@saravanan-periyasamy03 , is this still an issue for you?

from staedi.

MikeEdgar avatar MikeEdgar commented on August 13, 2024

Closing for now due to inactivity. Please comment/reopen if this is still a problem.

from staedi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.