I have 2 proprietary xmls each containing multiple 270 requests. I have a map that maps the proprietary xml to 270 EDI xml and I have a solution that generates one 270 file per one proprietary xml file. The idea is to batch both these X12 270 files into one file. I can use a receive port to pick up the generated individual 270s and create batch file. But I want to skip the extra step by promoting the properties needed for batching from my orchestration and handle in the message box itself in one single step. I promoted the DestinationPartyName, BatchName and ToBeBatched properties. I have configured the party, agreement and batching. When I drop the propreitary xmls to generate 2 transaction sets in one file, I receive the below error
Inner exception: The batch element is being suspended as it either failed schema validation or context properties are not matching batch definition. The error is : Stopping after the first error !!
Error: 1 (Field level error)
SegmentID: ST
Position in TS: 1
Data Element ID: ST02_TransactionSetControlNumber
Position in Segment: 2
Data Value: 1
4: Data element too short
I dont hardcode the ST02 value as 1 anywhere in my solution and I am not sure how “1” gets populated into ST02.
I tried generating one 270 file per one input xml file with batching turned off and it generates the 271 without any errors. But, this error occurs only when the batching is turned on.
How can I fix this?