Code Monkey home page Code Monkey logo

Comments (2)

jemuelfontila123 avatar jemuelfontila123 commented on June 4, 2024

@kputnam hope u notice this

from stupidedi.

kputnam avatar kputnam commented on June 4, 2024

Hi Jemuel, I think the InvalidEnvelopeVal happens when there's no grammar associated to identifiers in the envelope. Kind of like a "I don't know how to parse the stuff inside the ST/SE" warning. That InvalidEnvelopeVal has a reason property that should give details.

You can see the reason when you use bin/edi-pp, it says this: unknown transaction set "005010" "IM" "210". So I think the problems is we don't have a grammar defined for IM-210 for the 5010 version of X12. Looks like there's a grammar for that in 4010 though. So if you have documentation you could make your own grammar and contribute it as a PR, or you can try using the 4010 grammar to parse the 5010 file:

config = Config.default.customize do |c|
  c.transaction_set.customize do |x|
    x.register("005010", "IM", "210") { Stupidedi::TransactionSets::FortyTen::Standards::IM210 }
  end
end

If you run into validation problems, it's probably because 5010 has changed some things since 4010. To workaround that, you can make a copy of the 4010 grammar and put it in your own namespace, and change as needed. Just take care if you don't have detailed documentation, since your example file might not shed a full light on what the grammar should allow or not and you might have to continually revise as you get more files down the road.

from stupidedi.

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.