xmlnocheck output question

98 views
Skip to first unread message

Alex Befu

unread,
Feb 2, 2012, 7:45:32 PM2/2/12
to Bots Open Source EDI Translator
I need to translate an x12 875 into xmlnocheck and using the examples,
I was successfully able to do this using the x122xml plugin, but I
need access to some of the envelope information, and adding the line:

out.put({'BOTSID':'header':inn.ta_info['frompartner']})

to the end of the translation file ended up in an error:

Traceback (most recent call last): ScriptError: Script file "C:
\Python27\lib\site-packages\bots\bots.usersys\mappings\x12.x122xml":
"Traceback (most recent call last): MappingRootError: error in root
put "{'testIndicator': u'ZZZZZZZZZZ', 'BOTSID': u'header'}". ".

So my question is how would I get the same functionality as a direct
dump of all of the fields from an x12 file into a xmlnocheck file but
while also being able to add in fields about the header information.
Thanks for any help.

hjeb...@gmail.com

unread,
Feb 3, 2012, 10:25:41 AM2/3/12
to bots...@googlegroups.com
hi alex,

these one-on-one translations are very special cases.
in general I advise not to use these.


to reach values in the envelope, the normal way is to use QUERIES in the grammar.

henk-jan ebbers

Alex Befu

unread,
Feb 3, 2012, 3:54:54 PM2/3/12
to Bots Open Source EDI Translator
Ok well I am using them because I was creating individual translation
files for each of the partners, but then I realized that I could just
create a full specification translation so that regardless of what
partner it was, the translation could be used as long as they were on
the same version. But after doing that I realized that the one to one
translation did the exact same thing. The reason that I was using the
one to one translation is because it was the fastest, and I was just
using bots to translate edi into a more easily parsable xml version,
and then using a Java xml parser to get the data out and into our
database. But I decided to use my Java side to "fudge" the header
values instead of trying to get them out of bots.

But I was wondering what the value of tailoring a edi translation to
each new partner was. Because it seems if you are just going to turn
the edi into a different format (xml or csv or something) then you
will probably have to parse that output again.

~Alex

hjeb...@gmail.com

unread,
Feb 6, 2012, 8:18:32 AM2/6/12
to bots...@googlegroups.com

On 02/03/2012 09:54 PM, Alex Befu wrote:
> But I was wondering what the value of tailoring a edi translation to
> each new partner was. Because it seems if you are just going to turn
> the edi into a different format (xml or csv or something) then you
> will probably have to parse that output again.

it all depends upon how 'standarized' a x12 message is.
over here, in the Netherlands, I do no need to use partner specific translations.
in US retail sector differences between edi-partner implementations are so big that partner specific mappings are often the easiest way.
for health care's 837: this is based upon existing forms.
I guess it should be feasible to use one mapping for all partners.
(where the inhouse file is based upon the (paper) form.)

henk-jan

BikeMike

unread,
Feb 6, 2012, 7:46:53 PM2/6/12
to Bots Open Source EDI Translator
On Feb 4, 6:54 am, Alex Befu <alexb...@gmail.com> wrote:
> using bots to translate edi into a more easily parsable xml version,
> and then using a Java xml parser to get the data out and into our
> database.

Hi Alex,
Just wondering why you chose this approach, why not get bots to write
to your database directly?

Kind Regards,
Mike

Alex Befu

unread,
Feb 8, 2012, 7:48:15 PM2/8/12
to Bots Open Source EDI Translator
We were actually using bots to replace a different piece of software
that would take in edi and output a special format to then be put
through a different layer and into the database. So we are using bots
to translate edi to xml and then we made a java application that would
take in this xml output and format it for the other piece of software
so there was no direct access to the database. Although if we were
doing this from the ground up we would probably just put everything
straight into the database.

~Alex

hjeb...@gmail.com

unread,
Feb 9, 2012, 1:42:50 PM2/9/12
to bots...@googlegroups.com

Kenny Thackwray

unread,
Feb 10, 2012, 1:35:42 AM2/10/12
to bots...@googlegroups.com

Hi Henk-jan
Pleaer remove me from the email list
Cheers Kenny

hjeb...@gmail.com

unread,
Feb 10, 2012, 2:11:39 PM2/10/12
to bots...@googlegroups.com
hi Kenny,

that is easy to do yourself using the google groups interface.

kind regards,
henk-jan

On 02/10/2012 07:35 AM, Kenny Thackwray wrote:
>
> Hi Henk-jan
> Pleaer remove me from the email list
> Cheers Kenny
>

Reply all
Reply to author
Forward
0 new messages