Provides reference information for settings of an X12 business process.
The Validation setting of an X12 Document Router controls how the router validates the incoming message. If the incoming message fails the specified validation, InterSystems IRIS® reports the failure in the event log, and the X12 routing process passes the message to its bad message handler only; see the Bad Message Handler setting. If the message fails the specified validation but there is no bad message handler, an error is logged but the message is not sent to any target. If the message passes validation, the X12 routing process sends the message to the targets specified by the routing rules.
Ideally, you can use routing rules and data transformations to ensure each message is acceptable to the target system, and can, consequently, avoid using validation. This ensures that all messages are processed by the appropriate target. If you enable validation, InterSystems IRIS applies the validation tests before the routing rules. Any message that fails validation is not sent to a target based on the routing rules; it is sent only to the Bad Message Handler. However, there are some environments where X12 message validation is the preferred way to filter messages. For example, in the following situations, using X12 validation is a good choice:
You are developing or debugging an interface and want to determine the kind of message variants that your system needs to handle.
The target application cannot handle messages that have variances from the specification, and the routing rules and transformations cannot resolve those variances.
There is a regulatory or other business requirement that the messages conform to the specification.
X12 validation does add overhead to the routing process. This overhead can be significant and can reduce the maximum load of messages that your production can handle.
The Validation property allows you to specify flags that control the following:
Whether the message has a valid document type.
Whether the message structure is validated.
Whether the fields within the segments and the components within a composite structure conform to the schema.
If you specify an empty string as the Validation property value, the message router skips validation and routes all messages. When you create a new X12 routing process in the Management Portal, the Validation setting is initialized to an empty string.
A message can pass validation and not conform exactly to the schema definition depending on the Validation flags specified.
The following table lists the X12 validation flags and describes how the routing process validates the message when each is specified.
||Validation examines the DocType property of the document to see if it has a value.
||Validation verifies that the document segment structure is well formed, and that it can be parsed using the schema identified in the DocType property of the document. This ensures that all required segments in the schema definition are included in the message and that the message does not contain any misplaced segments that are not allowed by the schema.
||Both d and m are active. This is the default for business processes (routers).
||Validation enforces segment structure, which is the number and repetition of fields within a segment.
||Validation enforces composite structures, which is the number of components.
||Validation enforces relational conditions on segments and fields. Relational conditions indicate which fields or components are required or excluded based on the presence of other fields or components. At minimum, you must additionally specify s for segment-level validation. You can also specify c for component-level validation.
||Validation enforces that the required elements are present. If s is also specified, then it tests if the required fields are present in the segment. If c is also specified, then it tests if the required components are specified in a composite structure. If neither s nor c is specified, then r has no effect.
||Validation tests whether any elements that are marked as “Not used” are present. It tests for the presence of fields if s is also specified and tests for the presence of components if c is also specified. If any of these elements are present, validation fails. Note that this test cannot be performed if the only schema available is the “new-style” schema because it requires information stored only in the legacy schema.
||Validation tests the length of elements. It tests the length of fields if s is also specified and tests the length of components if c is also specified.
||Validation tests for the correct datatype of the elements. It tests the datatype of fields if s is also specified and tests the datatype of components if c is also specified.
||Validation tests that the value of elements is allowed by the code table. It tests against the code table of fields if s is also specified and tests against the code table of components if c is also specified. Note that this test cannot be performed if the only schema available is the “new-style” schema because it requires information stored only in the legacy schema.
||Equivalent to dmscrlt, which are all validation that can be performed relying only on the “new-style” schema.
||Equivalent to dmscrultv, which are all validations.
||Validation continues through the entire document even after encountering an error. If e is not specified, validation stops after encountering the first error.
||Skips validation and routes all messages. This is the default for business services and operations.
X12 element validation is only available in the InterSystems IRIS 2019.1.1 maintenance release and later maintenance releases. If you are running release 2019.1.0, you do not have this feature.