X12 Envelope Service
The following table provides an overview of the X12 Envelope service:
- System name
- EnvelopeX12Type
- Graphical Process Modeler (GPM) categories
- All Services, EDI > X12
- Description
- Handles enveloping of outbound X12 interchanges.
- Business usage
- This service improves performance of EDI X12 by consolidating EnvelopeST, EnvelopeGS, and EnvelopeISA into a single service.
- Usage example
- An outbound purchase order is to be sent inside an X12 interchange. The document envelopes that match the SenderID, ReceiverID, and AccepterLookupAlias specified in the EDI Encoder service are retrieved. If required by the ST envelope, translation is performed using the map specified by the envelope. The ST, GS, and ISA envelopes are applied to the output of this step. It checks if the document being enveloped is a 997 or a 999. The service will then initiate a business process if one is specified in the ISA envelope definition.
- Preconfigured?
- Yes
- Requires third party files?
- No
- Platform availability
- All supported application platforms.
- Related services
- EDI Encoder, EDI Envelope
- Application requirements
- None
- Initiates business processes?
- Runs a business process specified in the interchange envelope definition.
- Invocation
- Runs as part of a predefined EDI X12EnvelopeUnified business process.
- Business process context considerations
- None
- Returned status values
- Translation Error–Translation produced errors.
- No_Documents_To_Envelope–EDIEncoder has not run prior to X12 Envelope service.
- No_Envelope_Defined–The ST envelope defined has a SenderID, ReceiverID, or AcceptorLookupAlias different from that in the EDIEncoder step of the business process.
- Error–A database or other exception takes place.
- Success–Service returns success if none of the above takes place.
- Restrictions
- None
- Persistence level
- System default
- Testing considerations
- None
How the X12 Envelope Service Works
The X12 Envelope service is used in the predefined X12EnvelopeUnified business process to envelope outbound EDI documents. No configuration of the service is required.
The following example illustrates one way that the X12 enveloping process could happen:
- A purchase order is deposited into a folder on your IBM® Sterling B2B Integrator system by your inventory management system.
- The file is collected by a File System adapter, which then initiates a business process that takes care of translating the file into EDI X12 format.
- That business process initiates the X12EnvelopeUnified business process, the document is translated into EDI X12 format, and then enveloped.
- The document envelopes that match the SenderID, ReceiverID, and AccepterLookupAlias specified in the EDI Encoder service are retrieved. If required by the ST envelope, translation is performed using the map specified by the envelope. The ST, GS, and ISA envelopes are applied to the output of this step. It checks if the document being enveloped is a 997 or a 999. The service will then initiate a business process if one is specified in the ISA envelope definition.
Document Tracking Levels and Performance
You can boost EDI performance in the IBM Sterling B2B Integrator by using the TRACKING_LEVEL parameter to adjust the tracking level for business processes.
You set the default global settings for the TRACKING_LEVEL parameter in the enveloping.properties file. However, these global settings can be overridden for certain EDI-related services by using the BPML-only TRACKING_LEVEL parameter. This enables you to obtain maximum EDI performance in some business processes and maximum search and tracking functionality in others. This parameter can be set for the following services:
Inbound Services
- CII Deenvelope service
- EDIFACT Deenvelope service
- EDI Post Processor service
- X12 Deenvelope service
- Generic Deenvelope service
Outbound Services
- EDI Encoder service
- CII Envelope service
- EDIFACT Envelope service
- Envelope Generic service
- X12 Envelope service
This performance boost is done at the expense of Tracking and Search functionality. The tracking level setting affects the following EDI functionality:
- EDI Correlation Search
- EDI Document Tracking
- EDI Reporting
The TRACKING_LEVEL parameter is not available in the IBM Sterling B2B Integrator service configuration or in the GPM. It must be added manually to the BPML. Use the TRACKING_LEVEL parameter with one of the following settings:
- Setting
- Description
- none
- Provides the largest EDI performance boost with the least tracking and search functionality. EDI Correlation Search, EDI Document Tracking and EDI Reporting are nonfunctional.
- basic
- Provides an EDI performance boost while also providing search functionality. EDI Correlation Search is functional. EDI Document Tracking and EDI Reporting are nonfunctional.
- full
- Default setting. Provides the lowest EDI performance with the highest search and tracking functionality. EDI Correlation Search, EDI Document Tracking and EDI Reporting are fully functional.
Using Wildcards in Enveloping and Deenveloping Services
To help reduce the number of envelopes that need to be created and maintained in the system, X12 and EDIFACT enveloping allows users to create wildcard envelope definitions. There are two aspects to this feature in outbound processing. The first is the use of an asterisk (*) in any mandatory field in an outbound envelope. The second is the ability to override values set in an envelope definition through the use of correlations. By using an asterisk in the Sender ID, Receiver ID, and Accepter Lookup Alias fields, it allows the EDI Encoder Service to match and use that envelope for every document it prepares for enveloping. You may use wildcards for one, two, or all three fields when you define an envelope, and the EDI Encoder will find and use the most specific match when it processes a document.
If an envelope field is set to an asterisk, the X12 Envelope service must obtain the actual value to use from a different source—the correlations. You must provide a correlation for an envelope value that is set to asterisk, but you can also set others. Correlations set on the document for other fields in an envelope override what is in the envelope itself. This enables you to create an envelope with default values that you can override only when desired. The exception to this rule is when the field is Sender ID, Receiver ID, or a qualifier for one of these fields. In these fields, you must define the value as an asterisk in the envelope definition if you want to override it with a correlation, otherwise the value from the envelope is always used.
The following list contains the correlation values that can be set inside of process data prior to calling the Correlation service to override outbound envelope values:
- X12EnvelopeParms/Out_ExpectAcknowledgement
- X12EnvelopeParms/Out_AcknowledgementFormat
- X12EnvelopeParms/Out_GroupAcknowledgementOverdueTime
- X12EnvelopeParms/Out_InterchangeAcknowledgementOverdueTime
- X12EnvelopeParms/Out_GroupAcknowledgementOverdueTimeMinutes
- X12EnvelopeParms/Out_InterchangeAcknowledgementOverdueTimeMinutes
- X12EnvelopeParms/OutDocEncoding
- X12EnvelopeParms/Out_TransactionSetIDCode
- X12EnvelopeParms/Out_GroupFunctionalIDCode
- X12EnvelopeParms/Out_GroupResponsibleAgencyCode
- X12EnvelopeParms/Out_GroupVersionReleaseIDCode
- X12EnvelopeParms/Out_GroupSenderID
- X12EnvelopeParms/Out_GroupReceiverID
- X12EnvelopeParms/Out_InterchangeAuthorizationInformationQualifier
- X12EnvelopeParms/Out_InterchangeAuthorizationInformation
- X12EnvelopeParms/Out_InterchangeSecurityInformationQualifier
- X12EnvelopeParms/Out_InterchangeSecurityInformation
- X12EnvelopeParms/Out_InterchangeSenderIDQualifier
- X12EnvelopeParms/Out_InterchangeSenderID
- X12EnvelopeParms/Out_InterchangeReceiverIDQualifier
- X12EnvelopeParms/Out_InterchangeReceiverID
- X12EnvelopeParms/Out_InterchangeControlStandardsIdentifier
- X12EnvelopeParms/Out_InterchangeControlVersionNumber
- X12EnvelopeParms/Out_InterchangeAcknowledgmentRequested
- X12EnvelopeParms/Out_InterchangeTestIndicator
The following example shows how you might set correlation values in a business process:
<operation name="SetTheCorrlations">
<participant name="CorrelationService"/>
<output message="Xout">
<assign to="TYPE">DOCUMENT</assign>
<assign to="CORRELATION_PATH">/ProcessData/X12EnvelopeParms/*</assign>
<assign to="SCOPE" from="'EDI'"/>
<assign to="." from="*"></assign>
</output>
<input message="xin">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="EDI Encoder">
<participant name="EDIEncoder"/>
<output message="EDIEncoderTypeInputMessage">
<assign to="AccepterLookupAlias">837</assign>
<assign to="EDIStandard">X12</assign>
<assign to="ReceiverID">TestA-GS-R</assign>
<assign to="SenderID">TestA-GS-S</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="EDI Envelope">
<participant name="EDIEnvelope"/>
<output message="EDIEnvelopeTypeInputMessage">
<assign to="MODE">DEFERRED</assign>
<assign to="RECEIVER_ID">TestA-GS-R</assign>
<assign to="SENDER_ID">TestA-GS-S</assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
After the steps shown in the previous example, you would include the Correlation service to set the values as correlations against your documents, then follow that with the EDI Encoder service.
Adding Translation Map Name to Process Data
The X12 Envelope service automatically adds the name of the map used by the translator (as specified when building the envelope) in an inbound or outbound translation to process data. The X12 Envelope service writes the map name into the process data regardless of the reason the translator was invoked; that is, for a compliance check only, or for both compliance check and translation. The map name in process data enables enhanced configuration possibilities for your business process models. For example, you can configure business processes to use the map name for tracking or cross reference purposes, configure decisions in your process models to choose a subprocess according to the map that was run, or to create a report when there are translation errors.