Mulesoft X12 EDI 837: Interchange Control Number

352 views Asked by At

Getting below error while reading EDI 837 file using X12 connector(using default config).

Schema: 005010 Version identifier suffix: X222A1

Errors=[X12Error(1,,true,INTERCHANGE_NOTE,025,Duplicate Interchange Control Number,INTERCHANGE_LEVEL,261478,-1,,Duplicate interchange control number 261478)]

Runtime: 4.3

Below config xml

<file:config name="File_Config" doc:name="File Config" doc:id="8542781c-f67d-4d79-9648-b2d15ab37b0c" />
    <x12:config name="X12_EDI_Config" doc:name="X12 EDI Config" doc:id="bbe0ec79-d418-41d0-a8b2-4c154b0428b2" versionIdentifierSuffix="X222A1">
        <x12:schemas >
            <x12:schema value="/x12/005010/837.esl" />
        </x12:schemas>
    </x12:config>
    <flow name="ediFlow" doc:id="70290c60-1e47-43e1-b759-144cbbf24716" >
        <file:listener doc:name="On New or Updated File" doc:id="777e4c99-b633-426b-b94e-1e7f4d7190b2" autoDelete="true" config-ref="File_Config" directory="C:\test">
            <scheduling-strategy >
                <fixed-frequency />
            </scheduling-strategy>
        </file:listener>
        <x12:read doc:name="Read" doc:id="9deb24c2-97c0-438e-a8f7-f88416164b67" config-ref="X12_EDI_Config" target="edidata"/>
        <logger level="INFO" doc:name="Logger" doc:id="6969a6c5-9918-42f2-96b7-14e74684c422" message="EDI 837 file: #[vars.edidata]"/>
    </flow>
</mule>
1

There are 1 answers

0
aled On

It seems that the data contains duplicated Interchange Control Number. By default the connector will raise an error if that happens. If you want to ignore duplicates set in the configuration of the connector "Require unique interchanges" to false. The documentation of this configuration says:

Require unique Interchange Control Numbers (ISA13) for received interchanges. The normal behavior is to record the interchange numbers previously processed and reject any duplicate interchange numbers from the same partner (as determined by the interchange sender and receiver identification). If false, this instead allows processing of the received interchange to continue and leaves it to the application flow to track numbers and handle appropriately.