<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 - XML 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/app
and refer to the location relative to this directory.
For example, if an 850 schema (either overlay or full) is under src/main/app/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, the 12 EDI attempts to load an appropriate schema at runtime for each transaction set, using 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) it must match the generate999Acks Parser parameter (false for 997, true for 999 ).
|
XML Value | 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 replacement for invalid characters, or reject them as errors if none is set or enabled for receive messages in the parser options. The default is |
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 the X12 schema version (for example, 004010, 005010, and so forth) followed by this suffix. Not setting this value means the receive-only just verifies that the GS version identifier code starts with the configured schema version. On the send side, the combination of the X12 schema version and this suffix comprises the GS08 value. |
Self Identification Parameters
Use these parameters to identify your side of the trading partner relationship.
XML Value | 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 in Exchange (known as the ISA segment). Use this value in combination with the |
groupIdSelf="muleapp" |
Application Code for Mule in a group (GS segment). |
Partner Identification Parameters
These identify your partner.
XML Value | 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 | Studio Option |
---|---|
enforceLengthLimits="true" |
Enforce the minimum and maximum lengths for receive 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 (ISA13). The default behavior records the interchange numbers previously processed and rejects duplicate interchange numbers from the same partner. It is derived by 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 only need to be unique within an interchange. Setting this to |
requireUniqueTransactionSets="false" |
Enforce globally unique Transaction Set Control Numbers (ST02) for received transaction sets. By default, transaction set control numbers only need to be unique with a particular functional group. Setting this 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 (997) or AK2/IK5 (999) acknowledgment for every received transaction set. By default ( |
generate999Acks="false" |
Generate 999 Implementation Acknowledgments instead of 997 Functional Acknowledgments. Set to |
reportSegmentErrors="true" |
Report segment error details to the sender in the 997/999 flag.
Setting to |
includeFASchema="true" |
Expect 997 or 999 Functional Acknowledgments and include the 997/999 schema. |
acknowledgmentSchemaPath="" |
Expect the path either from the file system or the classpath. If the path is specified, it overwrites the default acknowledgment path. |
enforceConditionalRules="false" |
Enforce conditional rules for receive values. |
Writer Parameters
These control the types of writer operations.
XML Value | 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 it as 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, 997/999 acknowledgments are requested for all sent transactions. |
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). The default is always to generate control numbers when writing allowing you to use chosen values. |
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 |
enforceConditionalRules="false" |
Enforce conditional rules for write values. |
Next Step
After you complete configuring the connector, you can try the Examples.