EDI Enveloping Service

The EDI Enveloping service translates messages, determines which business processes need to run to apply EDI envelopes, and starts those business processes. The EDI Enveloping service has two methods of translating and enveloping messages:

  • In Deferred mode, the EDI Enveloping service runs at a scheduled time and it translates and envelopes messages into interchanges in batches.
  • In Immediate mode, the EDI Enveloping service translates and envelopes messages immediately after the EDI Encoder service processes the messages.

Before the IBM® Sterling B2B Integrator runs the EDI Enveloping service, you must have the EDI Encoder service process EDI messages that need to be translated and enveloped. The EDI Encoder service tags messages so that the EDI Enveloping service can properly translate and envelope them.

Note: If the input message character encoding is specified, it overrides the encoding specified in the map. The output message content type and character encoding are set based on the information contained in the map.

The following table provides an overview of the EDI Enveloping service:

System name
EDIEnvelopeType
Graphical Process Modeler (GPM) categories
  • All Services
  • EDI > X12
  • EDI > EDIFACT
  • EDI > CII
  • EDI > VDA
  • EDI > SWIFT
  • EDI > RND
Description
Responsible for translating and enveloping a message. It can be configured to run in either of two modes: Deferred or Immediate.
  • In Deferred mode, the service queries the IBM Sterling B2B Integrator to identify messages that require translation and enveloping. The query can incorporate an optional filter that allows the business process developer to restrict messages by any or all of Sender ID, Receiver ID, and Envelope ID. The service then divides the messages according to the envelopes they require and initiates the appropriate enveloping business processes. In deferred mode, the IBM Sterling B2B Integrator translates and envelopes messages in batches at specified intervals.
Note: The EDI Enveloping service should be excluded from the business process when the EDI Encoding service is used; instead, the deferred EDI Enveloping service must be used in a different business process and should be triggered periodically.
  • In Immediate mode, the service translates and envelopes the current message as soon as the EDI Encoder service is finished with the message. It operates on the primary message it receives and initiates the appropriate enveloping business process.
Preconfigured?
A configuration of this service is created when the product is installed. However, before using a service configuration in a business process, you must specify values for the following parameters:
  • MODE (required)
  • SENDER_ID (optional)
  • RECEIVER_ID (optional)
  • ENVELOPE_ID (optional)
Requires third party files?
No
Platform availability
All supported application platforms
Related services
EDI Encoder service
Application requirements
No
Initiates business processes?
None
Invocation
Runs as part of a predefined business process.
Returned status values
  • Success – The messages were successfully submitted for enveloping.
  • Error – Errors were encountered and the messages were not submitted for enveloping.
Restrictions
No

Implementing the EDI Enveloping Service

To implement the EDI Enveloping service, complete the following tasks:

  1. Call the EDI Encoder service.
  2. Create an EDI Enveloping service configuration.
  3. Configure the EDI Enveloping service. For information, see Configuring the EDI Enveloping Service.
  4. Use the EDI Enveloping service in a business process.

Configuring the EDI Enveloping Service

To create a EDI Enveloping service configuration, you must specify field settings in the IBM Sterling B2B Integrator and in the Graphical Process Modeler (GPM).

IBM Sterling B2B Integrator Configuration

The following table describes the fields used to configure the EDI Enveloping service in the IBM Sterling B2B Integrator:

Note: The field names in parentheses represent the corresponding field names in the GPM. This information is provided for your reference.
Field Description
Name Unique and meaningful name for the service configuration. Required.
Description Meaningful description for the service configuration, for reference purposes. Required.
Select a Group Select one of the options:
  • None – You do not want to include this configuration in a group at this time.
  • Create New Group – You can enter a name for a new group in this field, which will then be created along with this configuration.
  • Select Group – If you have already created one or more groups for this service type, they are displayed in the list. Select a group from the list.
Note: See Using Service Groups.
Enveloping Mode

(MODE)

Instructs the IBM Sterling B2B Integrator when to translate and envelope messages:
  • Deferred – Translate and envelope messages in batches at specified intervals.
Note: When using deferred mode, the EDI Enveloping service should be excluded from the business process when the EDI Encoding service is used; instead, the deferred EDI Enveloping service must be used in a different business process and should be triggered periodically.
  • Immediate – Translate and envelope the current message as soon as the EDI Encoder service is finished with the message.
Halt on Translation Error Whether to stop processing transactions when a translation error occurs. Valid values are:
  • Yes – Stop processing transactions when a translation error occurs. This is the default in Immediate mode.
  • No – Continue processing transactions if a translation error occurs. This is the default in Deferred mode.
Output Report to Process Data Whether to output the Translation report to process data. Valid values are Yes (Send report to process data) and No.
Note: The following fields are displayed only if Deferred mode was selected.
Sender ID Enter a Sender ID to be used as a filter for selecting messages from the database for enveloping. Optional.
Receiver ID Enter a Receiver ID to be used as a filter for selecting messages from the database for enveloping. Optional.
Envelope Enter an envelope definition to be used as a filter for selecting messages from the database for enveloping. Optional.
Run as User The Run As User field only displays as an option if Deferred mode was selected.

Type the user ID to associate with the schedule, or click the icon and select a user ID from the list.

Valid value is any valid application user ID.

Note: This parameter allows someone who does not have rights to a specific business process to run it. If you select Admin as the user ID, you will inherit Administrative rights (for this run of the business process only), and enable the scheduled run.
Use 24 Hour Clock Display If selected, the adapter will use the 24-hour clock instead of the default 12-hour clock.
Schedule Information about scheduling the service configuration to run in deferred mode.

Valid values:

  • Do not use schedule

    If this field is selected, this service does not start a business process and does not run on a schedule.

  • Run based on timer

    Valid values are the hour and minutes at which to run the service. Indicate whether you want the service to run at startup.

  • Run daily

    Valid values are the hour and minutes at which to run the service, daily. You can also specify a time interval. Indicate whether you want the service to run at startup.

  • Run based on day(s) of the week

    Valid values are the day of the week, the hour, and the minutes at which to run the service. You can also specify a time interval. Indicate whether you want the service to run at startup.

  • Run based on day(s) of the month

    Valid values are the day of the month (including the last day of the month (LDOM)), hour, and the minutes at which to run the service. You can also specify a time interval. Indicate whether you want the service to run at startup.

GPM Configuration

The following table describes the fields used to configure the EDI Enveloping service in the GPM. You set the default global settings for these parameters in the enveloping.properties file. However, these global settings can be overridden in the EDI Enveloping service by using the following parameters in the GPM. Use these parameters when it is necessary to adjust the lock times and lock wait times for specific business processes.

Field
Description
Config
Name of the service configuration. Required.
EDIENVELOPE_MAX_LOCK_TIME
Maximum amount of time that the EDI Enveloping service will hold a lock on an enveloping process. This parameter enables you to fine tune your EDI processing. You can set this parameter in envelope.properties.in, and then use the same parameter here to override the properties file setting where necessary. The default value is 86400 seconds.

This parameter is used in Deferred mode to avoid situations where enveloping service releases the lock before it is done processing a message—possibly due to slow response from the database. If there are concurrent EDI enveloping business processes running, an EDI Enveloping service in another business process could possibly retrieve the same message from the database and process it, which would result in duplicate outbound messages.

EDIENVELOPE_LOCK_WAIT_TIME
Maximum amount of time that the EDI Enveloping service will wait for a lock before returning an error and reporting failure to obtain the lock. The service would use this parameter value when another EDI Enveloping business process has the lock, which causes this EDI Enveloping service instance to have to wait for the lock. The default value is 86400 seconds. This parameter is used in Deferred mode only.

Correlation Data

The EDI Enveloping service and EDI Deenveloping service automatically collect the following correlation information from EDI messages:

Category
Data Collected
Sender ID
  • InterchangeSenderID
  • GroupSenderID
  • TransactionSenderID
Receiver ID
  • InterchangeReceiverID
  • GroupReceiverID
  • TransactionReceiverID
Control Numbers
  • InterchangeControlNumber
  • GroupControlNumber
  • TransactionControlNumber
Acknowledgement Requested
  • InterchangeAckRequested
  • GroupAckRequested
Acknowledgement Status
  • InterchangeAckStatus
  • GroupAckStatus
Standard
Standard – values are CII, EDIFACT, VDA, RND, SWIFT, and X12
ID
  • FunctionalID
  • TransactionSetID
Versions
  • InterchangeVersion
  • GroupVersion
  • TransactionVersion
Date and Time
  • InterchangeDateTime
  • GroupDateTime
Overdue Time
  • InterchangeOverdueTime
  • GroupOverdueTime
Level
Level – values are Interchange, Group, and Transaction
Direction
Direction – values are Inbound and Outbound
Envelope Type
  • InterchangeEnvelopeType
  • GroupEnvelopeType
  • TransactionEnvelopeType
Envelope Name
  • InterchangeEnvelopeName
  • GroupEnvelopeName
  • TransactionEnvelopeName
Envelope Version
  • InterchangeEnvelopeVersion
  • GroupEnvelopeVersion
  • TransactionEnvelopeVersion
Compliance Status
  • InterchangeComplianceStatus
  • GroupComplianceStatus
  • TransactionComplianceStatus

Values are OK and NOT OK

Test Mode
TestMode – values are Production, Test Data and Information
Counts
  • TransactionCount
  • GroupCount
Container Doc ID
ContainerDocID

The information for these correlations is automatically collected at each enveloping and deenveloping stage for a message, which facilitates tracking individual messages as they move through the IBM Sterling B2B Integrator.

There is no setup required for using the correlation information collected by the EDI Enveloping and EDI Deenveloping services. After you use one of these services in a business process, the information is available through the Correlation Search option.

Using Wildcards in Enveloping and Deenveloping Services

As a way to help reduce the number of envelopes you need to create and use, the EDI Enveloping and EDI Deenvelope services support use of an asterisk (*) as a wildcard character in mandatory envelope fields for X12 and EDIFACT only. By using wildcards, you can set up one set of envelopes that can be used for multiple trading partners. If certain trading partners have specific requirements, you can still have envelopes that pertain just to them, and the EDI Enveloping service chooses the envelope that is the best match. In other words, the envelope that has the most matches to specific fields in the data (for example Receiver ID, Receiver ID Qualifier), is the one selected.

Updated Envelope Translation Error Messages

When you are translating a batch of documents and need to differentiate between translation errors that occur because of empty sets and translation errors that occur when all sets are bad, you can add a property to the customer_overrides.properties file to enhance your error reporting by using the following procedure:

  1. In the install_dir/install/properties directory, locate the customer_overrides.properties file.
  2. Open the customer_overrides.properties file in a text editor.
  3. Add this value:
    
    enveloping.enveloping.X12.useUpdatedEnvelopeTranslationErrorMsgs=true
    
  4. Save the customer_overrides.properties file.