On 05/12/2016 05:28 PM, Jason Capriotti wrote:
> I haven't quite got this working (yet), but it seems like it will work.
>
> One thing I noticed is the *inn* value passed to the map from *handleconfirm* doesn't have *ta_info* attached to it. I think I can get the information I need from the *queries* property
> (inn.queries), but this seems like a slight discrepancy from how other maps work.
>
> Another comment... Outside of my desire to modify the 997, I'm wondering if there /could/ be a way to tap into the header portion of the translation? Two ideas are:
>
> * Provide a new route exit point that fires between parsing the file and running the translations.
>
will note that one.
but that would be a quite complicated one with limited use case, as far as I can see -> but convince me!
check transform.py. around line 168
first except clause catches from message (not edi file)
(should add specific exception type here)
> * Maybe a better option is along the lines of adding a function the grammar, which is very easy... allow the grammar function to raise a MessageError which would stop processing (similar to when
> you're missing a mandatory field).
>
think having the option to raise exception that reject whole interchange does about the same.
(I am trying to pull as much as possible to translations ('translation is the centre').
kind regards,
henk-jan ebbers
>
> The second bullet would look something like this...
>
> *In the grammar:*
>
> def validate(thisnode):
> raise MessageError('Some validation failed')
>
>
> *In bots/inmessage.py (parse_edi_file, after UnicodeError is caught):*
> > > For more options, visit
https://groups.google.com/d/optout <
https://groups.google.com/d/optout> <
https://groups.google.com/d/optout <
https://groups.google.com/d/optout>>.