I would to know what are the various ways we can validate the inbound and outbound ANSI X12 Document. Ex: Invalid Segment Count, Invalid ANSI X12 Qualifier, Missing Requirement, Missing Required Segment etc. I am using 6.1 and Using TN to submit the EDI document.
The normal EDI validations done for (Inbound/Outbound)based on the Schema the WmEDI packages services will help.
For Inbound validation document level use the (wm.b2b.edi:convertToValues)and provide the following inputs EDIFFSchema=(X12document),validate=true,maxErrors=-1,
returnErrors=AsArray it will give output "errors"list,fomat this errors and display to users
For Outbound Validation document level use the
wm.b2b.edi:convertToString service and provide the inputs
ffSchema(X12 document) and if any errors it will give output “errorArray”,so format this errors and display to users.
And TN will do the EDI X12 Envelope Validation upon receiving the document,so basically you have to handle documentlevel validations using the inputs as i mentioned above.
Thanks for the Response. I tried that. It looks like working but see the error message
hasError pathName /Values/ISA/GS/ST/SE/SE01
errorMessage Document segment count error (actual count is: 40 SE01=45).Control Number: 0001
But hasError is false???. I guess this need to set as true???
For outbound I specified the ffSchema but it’s not validating it.
I have the REF segment built with BM but no REF02. But it didn’t point out that.
Any thoughts are greatly appreciated.
This is a bug in 6.1. Contact tech support for the fix on SE01 count error.
Regarding OutboundValidation on REF segment,check in the FFSchema itself whether REF/REF02 field is required in runtime or not.Another way is see in the X12 document rightclick on this REF02 field and check the properties Constraints whether this Field is checked(Field mustexist in runtime)?same thing applies for the required segments.
Then only the convertToString will validate based on the ffSchema.
I verified the REF02 properties it is not a required field. But as per ANSI X12 Constratins if REF01 is there then REF02 should be there…
is webMethods considered all X12 validation in their schemas???
If this is the case the faster way is to change in the schema REF/REF02 field is required.or else contact tech support and report this minor problem.
I believe mostly webMethods considers the X12 validations and update the schemas in either fixes or in newer version releases.
But some times customization to EDI schemas is necessary,this is what some clients does to proceed with the development.
BTW what is your IS/TN version,EDI Module version,EDI DocumentType that you are working on?
Thanks for the response. We are using webMethoods 6.1(All IS/TN/EDI), The Document we are working on ANSI X12 4030.
Thanks for clarification.
You can go a head and change REF02 in the EDI X12 4030 schema itself,but if you find same problems with remaining other seqments then contact tech support and raise the ANSI X12 validation rule,so they will provide a fix and solve the issue.This might be useful info for all the clients and will know how to fix it.
I thought you didn’t like changing Schemas. I see you’ve come around.
I have done this changes in the EDI Schema’s before but unless if they are not critical and continue the dev/testing work.
I am not against this rule,but this is not a good practice.so get this fix by webMethods itself if critical.