<x12-edi:config name="X12_EDI__Configuration" identKeys="true" doc:name="X12 EDI: Configuration">
<x12-edi:schemas>
<x12:schema value="/x12/005010/850.esl"/>
</x12-edi:schemas>
</x12-edi:config>
X12 EDI Connector 2.7 - Schema and Trading Partner Configuration - Mule 4
Use these additional XML configuration options to:
-
Set your schema location if you are using custom schemas
-
Define your trading partner relationship by setting SELF or PARTNER identification
You can set the types of error conditions that reject receive transaction sets and any writer message separator operations. These general parameters control both Send and Receive document handling.
Set Your Schema Locations
If you’re using one or more custom schemas, locate these under
a directory in src/main/resources
and refer to the location relative to this directory.
For example, if an 850
schema (either overlay or full) is under src/main/resources/mypartner/850.esl
,
the schema location is /mypartner/850.esl
.
You can configure schema locations in the Anypoint Studio XML view. The schema files are loaded when the connector is initialized, so runtime expressions such as flow variables are not supported.
To configure schemas in Anypoint Studio:
-
Switch to the XML view by clicking Configuration XML
-
Modify your X12 EDI configuration to include a list of all the schemas for use by adding an
<x12:schema>
element for each document type:
If you don’t include any schemas in the configuration, X12 EDI Connector attempts to load the standard X12 schema definitions provided with the connector. However, in this case you won’t see any metadata to define the structure of the data passed in and out of the connector.
If the schema definition configuration includes a 997
or 999
Functional Acknowledgment schema, then that schema is used to generate Functional Acknowledgments.
To use the Functional Acknowledgment schema type (997 or 999 ), that schema must match the generate999Acks Parser parameter (false for 997 , true for 999 ).
|
XML Value (default) | Studio Option |
---|---|
formValidation="X12"/"HIPAA_SNIP1"/"HIPAA_SNIP2" |
The schema form and validation level can be either X12 or HIPAA. The default is X12. |
schemas=list of values |
List of schema paths the connector can use. These paths can be either a file system or |
characterEncoding="PLATFORM"/"ASCII"/"ISO8859_1"/"IBM1047"/"UTF8" |
The character encoding used for both send and receive messages. The default |
stringCharacterSet="BASIC"/"EXTENDED"/"UNRESTRICTED" |
Use a substitution character for invalid characters, or reject them as errors if set to |
stringSubstitutionChar="?" |
Substitution character used to replace invalid characters in string values. The default is |
versionIdentifierSuffix="XYZ" |
Version identifier code suffix for the group (GS). Setting this value affects both Send and Receive message handling. On the Receive side, the GS08 version code must contain X12 schema version (for example, |
Self Identification Parameters
Use these parameters to identify your side of the trading partner relationship.
XML Value (default) | Studio Option |
---|---|
interchangeIdQualifierSelf="ZZ" |
The ID qualifier for Mule in Exchange (known as the ISA segment). Use this value in combination with the |
interchangeIdSelf="MULE" |
The ID qualifier for Mule runtime engine in Exchange (known as the ISA segment). Use this value in combination with the |
groupIdSelf="MULEAPP" |
Application code for Mule runtime engine in a group (GS segment). |
Partner Identification Parameters
These identify your partner.
XML Value (default) | Studio Option |
---|---|
interchangeIdQualifierSelf="ZZ" |
The ID qualifier for a partner in Exchange (known as the ISA segment). Use this value in combination with the |
interchangeIdSelf="PARTNER" |
The ID qualifier for a partner in Exchange (known as the ISA segment). Use this value in combination with the |
groupIdSelf="PARTNERAPP" |
Application Code for a partner in a group (GS segment) |
Parser Parameters for Error Conditions
These control the parser operation and the types of error conditions that reject Receive transaction sets.
XML Value (default) | Studio Option |
---|---|
enforceLengthLimits="true" |
Enforce the minimum and maximum lengths for receive values. |
truncateExceedingMaxLength="false" |
Truncate to the maximum lengths for received values. |
enforceCharacterSet="true" |
Enforce the allowed character set. |
enforceValueRepeats="true" |
Enforce the repetition count limits for receive values. |
allowUnknownSegments="false" |
Allow unknown segments in a transaction set. |
enforceSegmentOrder="true" |
Enforce the segment order in a transaction set. |
allowUnusedSegments="false" |
Allow segments marked as |
enforceSegmentRepeats="true" |
Enforce segment repetition count limits in a transaction set. |
requireUniqueInterchanges="true" |
Require unique ISA Interchange Control Numbers (such as ISA13). The default behavior records the interchange numbers previously processed and rejects duplicate interchange numbers from the same partner. It is derived from the interchange Sender and Receiver identification. Setting to |
requireUniqueGroups="false" |
Enforce globally unique Group Control Numbers (GS06) for received functional groups. By default, group numbers need to be unique within an interchange. Setting to |
requireUniqueTransactionSets="false" |
Enforce globally unique Transaction Set Control Numbers (ST02) for received transaction sets. By default, transaction set control numbers need to be unique only within a particular functional group. Setting to |
daysToStore="30" |
Minimum number of days to store interchange, group, and transaction set numbers for uniqueness checking. |
ackAllSets="false" |
Include a separate AK2/AK5 ( |
generate999Acks="false" |
Generate |
reportSegmentErrors="true" |
Report segment error details to the sender in the |
includeFASchema="true" |
Expect |
acknowledgmentSchemaPath="" |
Expect the path either from the file system or the |
enforceConditionalRules="false" |
Enforce conditional rules for Receive values. |
enforceCodeSetValidationsParse="false" |
Enforce code set validations on the Read operation. |
Writer Parameters
These control the types of writer operations.
XML Value (default) | Studio Option |
---|---|
dataSeparator="*" |
Data element separator character. The default uses the configured value for all output messages and can be overridden at the message level. |
componentSeparator=">" |
Component separator character. The default uses the configured value for all output messages and can be overridden at the message level. |
repetitionSeparator="U" |
Repetition separator character. The default uses the configured value for all output messages and can be overridden at the message level. |
segmentTerminator="~" |
Segment terminator character. The default uses the configured value for all output messages and can be overridden at the message level. |
lineEnding="NONE"/"LF"/"CRLF"/"CR" |
Line ending to add between segments. The default is |
sendUniqueGroupNumbers="false" |
Send unique Group Control Numbers. |
sendUniqueTransactionNumbers="false" |
Send unique Transaction Set Control Numbers. |
implementationConventionReference="" |
Implementation convention reference for transactions (ST segment). Setting this value uses the ST Implementation Convention Reference unless overridden in the message parameters. |
initialInterchangeNumber="1" |
The initial Interchange Control Number used for outgoing messages. |
initialGroupNumber="1" |
The initial Group Control Number used for outgoing messages. |
initialSetNumber="1" |
The initial Transaction Set Control Number used for outgoing messages. |
ackRequested="false" |
Request acknowledgments for sent transactions flag. If true, |
defaultUsageIndicator="P" |
Default ISA15 interchange usage indicator: |
useSuppliedValues="false" |
Use values from supplied data for control segment identifiers (ISA/IEA, GS/GE, ST/SE segments). |
outputEdiMimeType="APPLICATION_PLAIN"/"APPLICATION_EDIX12" |
Output MIME type to be set for the message, either the default |
writeEnforceLengthLimits="true" |
Enforce minimum and maximum lengths for write values. The default of |
writeTruncateExceedingMaxLength="false" |
Truncate to the maximum lengths for received values. |
enforceConditionalRulesOnWriter="false" |
Enforce conditional rules for write values. |
interchangeNumberKey="" |
Interchange number key name for the object store. |
enforceCodeSetValidationsWrite="false" |
Enforce code set validations on the Write operation. |
Write Batch Parameters
These control the types of Write batch (<edifact:write-batch>
) operations.
XML Value (default) | Studio Option |
---|---|
batchDataSeparator="*" |
Data element separator character. The default uses the configured value for all output messages and can be overridden at the message level. |
batchComponentSeparator=">" |
Component separator character. The default uses the configured value for all output messages and can be overridden at the message level. |
batchRepetitionSeparator="U" |
Repetition separator character. The default uses the configured value for all output messages and can be overridden at the message level. |
batchSegmentTerminator="~" |
Segment terminator character. The default uses the configured value for all output messages and can be overridden at the message level. |
batchLineEnding="NONE"/"LF"/"CRLF"/"CR" |
Line ending to add between segments. The default is |
batchSendUniqueGroupNumbers="false" |
Send unique Group Control Numbers. |
batchSendUniqueTransactionNumbers="false" |
Send unique Transaction Set Control Numbers. |
batchInitialInterchangeNumber="1" |
The initial Interchange Control Number used for outgoing messages. |
batchInitialGroupNumber="1" |
The initial Group Control Number used for outgoing messages. |
batchInitialSetNumber="1" |
The initial Transaction Set Control Number used for outgoing messages. |
batchAckRequested="false" |
Request acknowledgments for sent transactions flag. If true, |
batchDefaultUsageIndicator="P" |
Default ISA15 interchange usage indicator: |
batchOutputEdiMimeType="APPLICATION_PLAIN"/"APPLICATION_EDIX12" |
Output MIME type to be set for the message, either the default |
batchInterchangeNumberKey="" |
Interchange number key name for object store. |
batchGroupNumberKey="" |
Group number key name for object store. |
batchTransactionNumberKey="" |
Transaction number key name for object store. |
batchEnforceLengthLimits="TRUE" |
Enforce minimum and maximum lengths for received values. |
batchTruncateExceedingMaxLength="false" |
Truncate to the maximum lengths for received values. |
enforceCodeSetValidationsBatch="false" |
Enforce code set validations on the Write Batch operation. |
Next Step
After you complete configuring the connector, you can try the Examples.