Can the EDI components be used to process varying record types in a single file?

226 views
Skip to first unread message

Dave Balsillie

unread,
May 9, 2016, 5:17:05 PM5/9/16
to COZYROC
I'm trying to use the EDI component to process varying record types in a file. It "looks" like the component should do the work, but I'm not sure it's even possible. Attached is the XML specification (translates ok by the component) and a sample file.

When running the task I get the following:
     Reached end of mapping model but there are more EDI segments in the incoming message. Currently at segment number 6 -

It's referring to record 6 in the sample file.

The records are identified by the first field (types 1,2,3)

I have an EDI830 process (over two year now) running successfully, so I don't think it's some other error in the set up.

Related question: Now that www.milyn.org is defunct, are there any plans to update the EDI components to a different set of standards and/or provide detailed documentation on the configuration files? Is there a BDP for building / validating / testing the configuration file, so that it's clear what errors in coding may be present?
edi-message-mapping-1.0.xsd
POS Data.xml

Ivan Peev

unread,
May 9, 2016, 9:26:04 PM5/9/16
to COZYROC
Hi Dave,

Very creative idea. Thank you for sharing! We have never thought it might be possible to process such file layout. May I ask what is used in the varying records file as delimiter (segment delimiter) ? Is it a newline combination?

So far the schema in use has proven capable of handling most of the required EDI formats and it is also very compact compared to other schemas on the market. Therefore we do not intend to change the schema used at this time.

Dave Balsillie

unread,
May 10, 2016, 8:42:01 AM5/10/16
to COZYROC
Yes it is in fact the newline combination.

As I said, it doesn't yet process, since I'm getting an error when it encounters the second set of records (starting at row 6). Perhaps it's master / child logic built into the EDI transform. Without more comprehensive documentation on the configuration file, it's difficult to know if what I'm even doing is feasible.

Can you comment on my configuration file? Is there a setting or nested definition, that could overcome the error?

Ivan Peev

unread,
May 10, 2016, 9:51:57 AM5/10/16
to COZYROC
Hi Dave,

You can nest or not nest in your EDI layout definition. It is up to you. I have the feeling it might be possible to make it work. But first you have to fix the segment delimiter you have set. To setup newline [CR][LF] for segment delimiter specify the following : segment="
"

Dave Balsillie

unread,
May 11, 2016, 8:50:47 AM5/11/16
to COZYROC
I understand it's up to me, just looking for guidance on the change / layout I would need to use.

Changing the delimiter had no effect. I suspected I might have to have this, but again, without some sort of documentation on the parser I didn't know if two digit delimiters would be supported. (Didn't want to introduce additional unknowns.) Worse case, the [CR] would have been appended to the last field.

What does "reached end of mapping model" signify? It sound like it means it couldn't find a definition to match, but clearly row 6 has a segcode="1". Is it possible that it's tied up in some other logic, like trying to find a trailer segment (much like a closing tag in XML)?

Ivan Peev

unread,
May 11, 2016, 9:02:15 AM5/11/16
to COZYROC
Dave,

"reached end of mapping model" means there is incoming input data which is not describe in the layout you have defined.
Reply all
Reply to author
Forward
0 new messages