EDI

Use the predefined operations in the Electronic Data Interchange (EDI) application to parse, validate and transform EDI messages received from the webMethods B2B Integration application. Use these transformed messages to create orchestrations.

This application requires you to have access to the webMethods B2B Integration capability instance. Operations convertDocumentToEDIMessage, convertEDIMessageToDocument, and processEnvelope supports the processing of high-volume documents.

The predefined operations available for EDI application are:

addGroupEnvelope
Adds a functional group header to an EDI message according to the UN/EDIFACT, ANSI X12, UCS or VICS standards.
addInterchangeEnvelope
Adds an interchange control header to an EDI message according to the UN/EDIFACT, ANSI X12, UCS or VICS standards.
convertDocumentToEDIMessage
Converts a document to an EDI message.
convertEDIMessageToDocument
Converts an EDI message that is a stream or string into a document.
createTradacomsMessage
Creates a TRADACOMS message with the STX header segment, payload and the END segment.
formatConfiguration
Validates and creates a format configuration based on the input that is provided for each format service.
formatDate
Format the input value based on the provided input and output date format.
formatDecimal
Formats exponential decimal values based on the operationType.
formatNumber
Formats given value by adjusting a decimal character based on the operationType.
formatTime
Formats the input value based on the provided input and output time format.
generateFunctionalAcknowledgement
Creates a functional acknowledgment (FA) that acknowledges all levels of an input EDI document.
getDelimiter
Returns the first delimiter character that is found in the input characterString.
getEDIString
Creates a complete EDI transaction set (either string or InputStream type) from an EDI transaction set header segment.
getFirstKey
Returns the name of the first key present in the input parameter Doc.
nullifyIfBlank
Returns null or blank based on the blankOrNull value when the input is null or contains blank spaces.
processEnvelope
Accepts and processes the envelope of an ANSI X12/UN/EDIFACT/UCS/VICS/EANCOM EDI or TRADACOMS message and converts the envelope header segments to a document.

addGroupEnvelope

Adds a functional group header to an EDI message according to the UN/EDIFACT, ANSI X12, UCS or VICS standards.

Note:
  • Insert a value for either ediMessages or ediStream input parameter.
  • When you insert the values for both ediMessages and ediStream input parameters, the webMethods module for EDI considers ediMessages as the input value.
  • When an empty space is set for an ediMessage, the field value is considered as unset and the value set for ediStream is considered as an input value.
Input parameters
ediMessages
String. (Optional). EDI messages to which a group envelope is added.
ediStream
Object. (Optional). EDI stream to which a group envelope is added.
documentType
String. Represents the standard of ediMessages. Configure either X12/UCS/VICS or UN/EDIFACT.
functionalIdentityCode
String. Functional ID code of the EDI document.
senderQual
String. (Optional). EDI ID qualifier for the sender ID. It is used with sender.
sender
String. Identifies the sender in the group envelope. For example, if you specify 01 for senderQual (indicating a D-U-N-S number), specify the D-U-N-S number for sender.
receiverQual
String. (Optional). EDI ID qualifier for the receiver ID. It is used with receiver.
receiver
String. The receiver to be identified in the group envelope. For example, if you specify 01 for receiverQual (indicating a D-U-N-S number), specify the D-U-N-S number for receiver.
grpCtlNumber
String. (Optional). Group control number of the EDI document.
agencyCode
String. (Optional). Responsible agency code according to EDI standard, T (default) or X.
versionCode
String. EDI standard version and release code. For example, 4010, 3040.
outputType
String. (Optional). The type of document output. The available options are string and stream. The default value is a string.
x12/ucs/vics
Document. (Optional). When the document type is X12, UCS or VICS, configure the following parameters:
timeFormat
String. (Optional). The time format for the GS 05 field of the EDI message. Supported time formats are HHmm, HHmmss, HHmmssD and HHmmssDD. The default timeFormat is HHmm.
Note: DD is the decimal seconds; decimal seconds are expressed as follows, D is tenths (0–9) and DD is hundredths (00–99).
time
String. Optional. Represents the time of an EDI message in the header group, field GS05. You can modify the time in the EDI payload. webMethods B2B reflects the updated time in the EDI document.
date
String. Optional. Represents the date of an EDI message in the header group, field GS04. You can modify the date in the EDI payload. webMethods B2B Integration reflects the updated date in the EDI document.
Note: When the value for input parameter versionCode is-
  • Less than 004000, the date format must be yyMMdd.
  • Equal to or greater than 004000, the date format must be yyyyMMdd.
un/edifact
Document. When the document type is UN/EDIFACT, configure the following parameters:
syntaxVersion
String. Syntax version of the envelope level.
releaseCode
String. (Optional). EDI message standard release code. For example, 96A, 97b.
assignedCode
String. (Optional). EDI message standard assigned code. For example, OD, EN.
password
String. (Optional). The recipient transmission reference password.
time
String. Optional. Represents the time of an EDI message in the header group, field UNG04, sub-field S00402. You can modify the time in the EDI payload. reflects the updated time in the EDI document. webMethods B2B reflects the updated time in the EDI document.
date
String. Optional. Represents the date of an EDI message in the header group, field UNG04, sub-field S00401. You can modify the date in the EDI payload. webMethods B2B reflects the updated date in the EDI document.
Note: When the value for input parameter syntaxVersion is-
  • Less than or equal to 3, the date format must be yyMMdd.
  • Greater than 3, the date format must be yyyyMMdd.
delimiters
Document. (Optional). Delimiters used in the EDI document.
segment
String. (Optional). Segment terminator for the EDI document. For example, \u000a.

Default New line character

field
String. (Optional). Field separator for each EDI segment. For example, the exclamation mark (!).

Default *

subfield
String. (Optional). Separator for composite elements. For example, caret (^).

The default is colon (:).

release
String. (Optional). Release character for composite elements. For example, caret (^).

The default is question mark (?).

Output parameters
ediMessage
String. (Optional). Contains the ediMessage. If the input parameter outputType is set to a string, the value of this field populates.
ediMessageStream
Object. (Optional). When the outputType input parameter is set to stream, the value appears for the parameter ediMessageStream. If the EDI message is less than 1 MB, the value of ediMessageStream is java.io.ByteArrayInputStream. If the EDI message is greater than 1 MB, the value ediMessageStream is com.wm.ff.util.AutoCloseReservationInputStream.
statusCode
String. Status code based on success or failure.
statusMessage
String. Status message after you run the operation.

addInterchangeEnvelope

Adds an interchange control header to an EDI message according to the UN/EDIFACT, ANSI X12, UCS or VICS standards.

Note:
  • Insert a value for either ediMessages or ediStream input parameter.
  • When you insert the values for both ediMessages and ediStream input parameters, the webMethods module for EDI considers ediMessages as the input value.
  • When an empty space is set for an ediMessage, the field value is considered as unset and the value set for ediStream is considered as an input value.
Input parameters
ediMessages
String. (Optional). EDI messages to which a group envelope is added.
ediStream
Object. (Optional). EDI stream to which a group envelope is added.
documentType
Either X12/UCS/VICS or UN/EDIFACT.
senderQual
String. (Optional). EDI ID qualifier for the sender ID. It is used with sender.
sender
String. The sender is to be identified in the group envelope. For example, if you specify 01 for senderQual (indicating a D-U-N-S number), specify the D-U-N-S number for sender.
receiverQual
String. (Optional). EDI ID qualifier for the receiver ID. It is used with receiver.
receiver
String. The receiver to be identified in the group envelope. For example, if you specify 01 for receiverQual (indicating a D-U-N-S number), specify the D-U-N-S number for receiver.
ctlNumber
String. (Optional). The interchange control number of the EDI document.
ackRequested
String. (Optional). Indicates whether to request an acknowledgment for this interchange:
false
Do not request an acknowledgment. Default is false.
true
Requests an acknowledgment.
outputType
String. (Optional). The type of document output. The available options are string and stream. The default value is a string.
delimiters
Document. (Optional). Delimiters used in the EDI document.
segment
String. Segment terminator for the EDI document. For example, \u000a. Default \
field
String. Field separator for each EDI segment. For example, the exclamation mark (!). Default *
subfield
String. Separator for composite elements. For example, caret (^). The default is colon (:).
release
String. (Optional). Release character for composite elements. For example, caret (^). The default is the question mark (?).
decimal
String. (Optional). Decimal character for composite elements. For example, caret (^). If UN/EDIFACT > unaSegmentRequired is true, the decimal delimiter is used. Default is the period (.). If UN/EDIFACT > unaSegmentRequired is false, decimal is ignored.
X12/UCS/VICS
Document. When the document type is X12/UCS/VICS, assign values to the parameters:
authQual
String. (Optional). Authorization qualifier for the interchange envelope.
authInfo
String. (Optional). Authorization information for the interchange envelope.
securityQual
String. (Optional). Security qualifier for the interchange envelope.
securityInfo
String. (Optional). Security information for the interchange envelope.
ctlVersion
String. A version of the EDI standard used with a 00 prefix. For example, if version is 4010, specify 004010.
addLeadingZerosToCtlNumber
String. (Optional). (Only ANSI X12) Adds leading zeros to the interchange control number to make it a nine-digit number.
false
Do not add leading zeros to the interchange control number. Default is false
true
Add leading zeros to the interchange control number to make it a nine-digit number. For example, 12 becomes 000000012.
repSeparator
String. (Optional). A separator for the repeated occurrences of a simple data element or a composite data structure. Field length is 1.
Note: The repSeparator must be different from the record, field or subfield delimiters.
messageAlignment
String. (Optional). Aligns the messages.
left
Aligns messages to the start.
right
Aligns messages to the end.
none
No justification. Default
testIndicator
String. (Optional). Whether to indicate production or test mode.
P
Production. P is the default value.
T
Test.
I
Information.
time
String. Optional. Represents the time of an EDI message in the header interchange, field ISA10. You can modify the time in the EDI payload. reflects the updated time in the EDI document.
date
String. Optional. Represents the date of an EDI message in the header interchange, field ISA09. You can modify the date in the EDI payload. reflects the updated date in the EDI document. The date format must be yyMMdd.
UN/EDIFACT
Document. When the document type is UN/EDIFACT, assign values to the parameters:
syntaxID
String. Syntax identifier.
syntaxVersion
String. (Optional). Syntax version of the envelope level.
password
String. (Optional). Recipient transmission reference password.
passwordQual
String. (Optional). Recipient reference password qualifier.
applReference
String. (Optional). Application reference.
priority
String. (Optional). Processing priority code.
agreementID
String. (Optional). Interchange agreement identifier.
unaSegmentRequired
String. (Optional). Adds a UNA segment to the resulting final message.
true
Create UNA segment.
false
Do not create UNA segment.
directoryVersionNumber
String. (Optional). Type the directory version number in the UNB01/S00103 subfield of the EDIFACT envelope interchange header.
characterEncoding
String. (Optional). Type the character encoding in the UNB01/S00104 subfield of the EDIFACT envelope interchange header.
syntaxReleaseNumber
String. (Optional). Type the syntax release number in the UNB01/S00105 subfield of the EDIFACT envelope interchange header.
senderInternalId
String. (Optional). Type the sender's internal ID in the UNB02/S00203 subfield of the EDIFACT envelope interchange header.
senderInternalSubId
String. (Optional). Type the sender's internal sub ID in the UNB02/S00204 subfield of the EDIFACT envelope interchange header.
receiverInternalId
String. (Optional). Type the receiver's internal ID in the UNB03/S00203 subfield of the EDIFACT envelope interchange header.
receiverInternalSubId
String. (Optional). Type the receiver's internal sub ID in the UNB03/S00204 subfield of the EDIFACT envelope interchange header.
testIndicator
String. (Optional). Indicates the testing parameters.
1
1 indicates that the interchange is a test.
2
2 indicates that test the syntax of the structure only.
3
Returns the request without any change.
4
Returns the response without any change except for this data element changing 3 to 4.
time
String. Optional. Represents the time of an EDI message in the header interchange, field UNB04, sub-field S00402. You can modify the time in the EDI payload. webMethods B2B reflects the updated time in the EDI document.
date
String. Optional. Represents the date of an EDI message in the header interchange, field UNB04, sub-field S00401. You can modify the date in the EDI payload. webMethods B2B reflects the updated date in the EDI document.
Note: When the value for input parameter syntaxVersion is
  • Less than or equal to 3, the date format must be yyMMdd.
  • Greater than 3, the date format must be yyyyMMdd.
Output parameters
ediMessage
String. (Optional). Contains the ediMessage. If the input parameter outputType is set to a string, the value of this field populates.
ediMessageStream
Object. (Optional). When the outputType input parameter is set to stream, the value appears for the parameter ediMessageStream. If the EDI message is less than 1 MB, the value of ediMessageStream is java.io.ByteArrayInputStream. If the EDI message is greater than 1 MB, the value ediMessageStream is com.wm.ff.util.AutoCloseReservationInputStream.
statusCode
String. Status code based on success or failure.
statusMessage
String. Status message after you run the operation.

convertDocumentToEDIMessage

Converts a document to an EDI message. When you create an orchestration with ConvertDocumentToEDIMessage, you must select the appropriate document type. Selecting the appropriate type helps ensure the structure of an ediDocument appears in the pipeline data when you map with another ediDocument during orchestration. For the operation convertEDIMessageToDocument, the transaction is treated as a high-volume document.

Input Parameter
ediDocument
Document. The ediDocument you want to convert to an EDI message.
documentType
String. (Optional). Either Default or TRADACOMS.
encoding
String. (Optional). The type of encoding used to write a message to the output file. Default UTF-8.
delimiters
Document. (Optional). Delimiters used in the outbound EDI document. Note: This parameter is not applicable to TRADACOMS messages.
segment
String. (Optional). Segment terminator character to be appended at the end of each record in the output string.
field
String. (Optional). A field separator to be inserted between each field for each segment.
subfield
String. (Optional). Separator for composite elements.
release
String. (Optional). Release character to use as the escape character for composite elements.
messageAlignment
String. (Optional). Aligns the messages.
left
Aligns messages to the start.
right
Aligns messages to the end.
none
No justification. Default.
noEmptyTrailingFields
String. (Optional). Indicates whether to remove empty trailing fields from the output.
true
Removes empty trailing fields from the output. For example, AAA*01*02! (where ! is the segment terminator).
false
Does not remove empty trailing fields. Instead, it uses the field separator to denote an empty field. For example, AAA*01*02********!(where * is the field separator and ! is the segment terminator).
txnCtlNumber
String. (Optional). The value of the control number to set in the outbound transaction.
hasUndefData
String. (Optional). Processes the undefined output of the operation processEnvelope. Applicable for X12 and UNEDIFACT documents.
true
Processes the undefined data.
false
Do not process the undefined data.
outputType
String. (Optional). The type of document output. The available options are string and stream. The default value is a string.
formatConfiguration
Document array. (Optional). Format configuration for each format service.
formatName
String. Name of the format service.
internalFormat
String. (Optional). The format required by your internal application. Specify a string that follows the conventions described in java.text.DecimalFormat and java.text.SimpleDateFormat.
externalFormat
String. (Optional). The format required as per the EDI standard. Specify a string that follows the conventions described in java.text.DecimalFormat and java.text.SimpleDateFormat.
true
The service validates and updates the document to reflect the converted value.
false
The service validates, but does not update the document with the converted value.
Note: The input document array mapped to the formatConfiguration must be the output of EDI formatConfiguration operation.
Output parameters
ediMessage
String. (Optional). Contains the ediMessage. If the input parameter outputType is set to a string, the value of this field populates.
ediMessageStream
Object. (Optional). When the outputType input parameter is set to stream, the value appears for the parameter ediMessageStream. If the EDI message is less than 1 MB, the value of ediMessageStream is java.io.ByteArrayInputStream. If the EDI message is greater than 1 MB, the value ediMessageStream is com.wm.ff.util.AutoCloseReservationInputStream.
errors[]
String List. (Optional). Error message that describes the errors encountered during conversion. When no errors, error[] is null.
segmentCount
String. (Optional). The number of segments in the ediMessage.
statusCode
String. Status code based on success or failure.
statusMessage
String. Status message after you run the operation.

convertEDIMessageToDocument

Converts an EDI message that is a stream or string into a document. When you create an orchestration with ConvertEDIMessageToDocument, you must select the appropriate document type. Selecting the appropriate type helps ensure the structure of an ediDocument to appear in the pipeline data when you map with another ediDocument during orchestration.

Note:
  • You must insert a value for either ediMessages or ediStream input parameter.
  • When you insert the values for both ediMessage and ediStream input parameters, the webMethods module for EDI considers ediMessage as the input value.
  • The document is considered extensive based on its transaction volume.
Input parameter
ediMessage
String. (Optional). Contains the ediMessage. If the input parameter outputType is set to a string, the value of this field populates.
edistream
Object. (Optional). Contains the edistream. If the input parameter outputType is set to a string, the value of this field populates.
documentType
String. (Optional). Either Default or TRADACOMS
encoding
String. (Optional). The encoding of the message passed into an ediMessage or edistream.
delimiters
Document. Delimiters to parse the input message. If no delimiters are specified, then the parameter uses the default delimiter defined for the flat file schema.
Note: This parameter is not applicable to TRADACOMS messages.
segment
String. Segment terminator used in the input message.
field
String. Field separator used in the input message.
subfield
String. Subfield separator used in the input message.
release
String. Release the character used in the input message.
validate
String. (Optional). Validates the ediMessage.
true
Return errors describing how the ediMessage violates the constraints described in the flat file schema.
false
Do not return error messages describing how the ediMessage differs from the specified flat file schema. The default value is false.
processOnlyTopLevelRecord
String. (Optional). Processes the segments one at a time or process all input data at one time.
true
Starts processing segment structures with a top-level record as defined by the flat file schema. The parameter returns to the caller when it encounters another top-level record in the input data.
false
Processes all input data at one time. The default value is false.
ignoreSpaces
String. (Optional). Ignores white space from the beginning of the segments.
true
Ignore white spaces. The default value is false.
false
Use the segments as they are. Specify false when the data contains positional data records.
repeatingFieldSeparator
String. (Optional). Inserts field separator between repeating fields of an EDI document. Note: This parameter is not applicable to TRADACOMS messages.
formatConfiguration
Document array. (Optional). Format configuration for each format service.
formatName
String. Name of the format service.
internalFormat
String. (Optional). The format required by your internal application. Specify a string that follows the conventions described in the Java class java.text.DecimalFormat and java.text.SimpleDateFormat.
externalFormat
String. (Optional). The format required by the EDI standard you are using. If you are using the EDI ANSI standard format, you should not change the setting. Specify a string that follows the conventions described in the Java class java.text.DecimalFormat and java.text.SimpleDateFormat.
applyFormat
String. (Optional). Indicates whether the convertEDIMessageToDocument or convertDocumentToEDIMessage services should apply the converted value.
true
The service validates and updates the document to reflect the converted value.
false
The service validates, but does not update the document with the converted value.
Note: The input document array mapped to the formatConfiguration must be the output of EDI formatConfiguration operation.
Output parameters
ediDocument
Document. The document representation of the input ediMessage.
isValid
String. (Optional). Checks the validity of ediMessage.
true
validate input parameter was set to true and no errors were found.
false
validate input parameter was set to true and errors were found.
errors[]
Document List. (Optional). The validation errors, if any, that were found in edimessage. Validation errors are returned in errors only if isValid is set to true and returnErrors is set to asArray or both. The list includes the path of the errors.
statusCode
String. Status code based on success or failure.
statusMessage
String. Status message after executing the operation.

createTradacomsMessage

Creates a TRADACOMS message containing the STX header segment, payload and the END segment. When the validate parameter is set to true, the EDI application validates the content of the message.

Note:
  • You must insert a value for either tradacomsMessages or tradacomsStream input parameter.
  • When you insert the values for both tradacomsMessages and tradacomsStream input parameters, the webMethods module for EDI considers tradacomsMessages as input value.
  • When an empty space is set for tradacomsMessages, the field value is considered as unset and the value set for tradacomsStream is considered as an input value.
Input parameters
STX
Document. The document representation of TRADACOMS STX segment.
includeRSGRSG
String. (Optional). Whether the service creates an RSGRSG (reconciliation) message in the output message.
true
Creates an RSGRSG message in the output message. The default value is true.
false
Does not create an RSGRSG message.
encoding
String. (Optional). The encoding format to use in the message.
tradacomsMessages
String. (Optional). The TRADACOMS payload.
tradacomsStream
Object. (Optional). The TRADACOMS message stream.
END
Document. The document representation of TRADACOMS END segment.
validate
String. (Optional). Validates the tradacomsMessages.
true
Returns errors describing how the tradacomsMessages violates the constraints described in the flat file schema.
false
Does not return error messages describing how the tradacomsMessages differs from the specified flat file schema. The default value is false.
outputType
String. (Optional). The type of document output. The available options are string and stream. The default value is a string.
Output parameters
ediMessage
Object. (Optional). Contains the EDI message. If the input parameter outputType is set to a string, the value of ediMessage populates.
ediMessageStream
Object. (Optional). When the outputType input parameter is set to stream, the value appears for parameter ediMessageStream. If the EDI message is less than 1 MB, the value of ediMessageStream is java.io.ByteArrayInputStream. If the EDI message is greater than 1 MB, the value ediMessageStream is com.wm.ff.util.AutoCloseReservationInputStream.
errors[]
String List. (Optional). Validation errors, if any, that are found in tradacomsMessages. Validation errors are returned only if validate is set to true.
isValid
String. Checks the validity of tradacomsMessages.
true
When the validate is set to true and no errors are found.
false
When the validate is set to true, and there are errors.
statusCode
String. Status code based on success or failure.
statusMessage
String. Status message after performing the operation.

formatConfiguration

Validates and creates a format configuration based on the input provided for each format service.

A format service formats the value of a field and optionally validates the field against restrictions defined in the format service. EDI connector uses format services to convert field values into a different format as required by your system. For example, a format service can change the format of a date field from YYYYMMDD to MMDDYYYY or data from the EDI standard into a different format used by your internal application. Format services are associated with fields in EDI document type.

The following EDI operations use format services to convert the EDI field values as defined in the EDI document type:

  1. convertDocumentToEDIMessage - Converts a document that contains the internal document format to EDI standard message.
  2. convertEDIMessageToDocument - Converts an EDI standard message to document that contains the internal document format.
Note: If a field in EDI document type does not have a values, then the associated format service does not run.

To modify format conversion related configuration, use formatConfiguration operation.

By default, the external format configuration represents the EDI ANSI standard format. You must update the configuration to reflect the EDI standard and the formats of your internal application, for the system to convert field values from one format to another accurately.

The following are the default format configurations used by convertDocumentToEDIMessage and convertEDIMessageToDocument when formatConfiguration is not passed explicitly to the input.

Format name Default internalFormat value Default externalFormat value Description
formatDate6 MM/dd/yy yyMMdd Converts the date format from MM/dd/yy to yyMMdd
formatDate8 MM/dd/yyyy yyyyMMdd Converts the date format from MM/dd/yyyy to yyyyMMdd
formatDecimal #.########## #.#####E0 Converts the input to a decimal value
formatTime4_4 HH:mm HHmm Converts the timestamps from HH:mm format to HHmm
formatTime4_6 HH:mm:ss HHmmss Converts the timestamps from HH:mm:ss format to HHmmss
formatTime4_8 HH:mm:ss.SS HHmmssSS Converts the timestamps from HH:mm:ss.SS format to HHmmssSS
formatTime6_6 HH:mm:ss HHmmss Converts the timestamps from HH:mm:ss format to HHmmss
Input parameters
input
Document array. Format configuration for each format service.
formatName
String. Name of the format service.
internalFormat
String. (Optional). The format required by your internal application (for example, your back end system). Specify a string that follows the conventions described in the Java class java.text.DecimalFormat and java.text.SimpleDateFormat.
externalFormat
String. (Optional). The format required by the EDI standard you are using. If you are using the EDI ANSI standard format, you should not change the setting. Specify a string that follows the conventions described in the Java class java.text.DecimalFormat and java.text.SimpleDateFormat.
applyFormat
String. (Optional). Indicates whether the convertEDIMessageToDocument or convertDocumentToEDIMessage services should apply the converted value.
true
The service validates and updates the document to reflect the converted value.
false
The service validates, but does not update the document with the converted value.
Output parameter
formatConfiguration
Document array. (Optional). Format configuration for each format service.
formatName
String. Name of the format service.
internalFormat
String. (Optional). The format required by your internal application (for example, your back end system). Specify a string that follows the conventions described in the Java class java.text.DecimalFormat and java.text.SimpleDateFormat.
externalFormat
String. (Optional). The format required by the EDI standard you are using. If you are using the EDI ANSI standard format, you should not change the setting. Specify a string that follows the conventions described in the Java class java.text.DecimalFormat and java.text.SimpleDateFormat.
applyFormat
String. (Optional). Indicates whether the convertEDIMessageToDocument or convertDocumentToEDIMessage services should apply the converted value.
true
The service validates and updates the document to reflect the converted value.
false
The service validates, but does not update the document with the converted value.
hasError
String. Indicates whether any error exists in the input.
true
Indicates that an error in the input received that needs correction.
false
Indicates that no error in the input received.
errorMessage
String. (Optional). The error message describing the formatting error.

formatDate

Formats the input value based on the specified input and output date format.

Input parameters
value
String. The field value to format.
inputFormat
String. The date format that represents the input value. Follows the conventions described in the Java class java.text.SimpleDateFormat.
outputFormat
String. The date format that represents the output formattedvalue after conversion. Follows the conventions described in the Java class java.text.SimpleDateFormat.
Output parameters
formattedValue
String. The field value after applying outputFormat.
isValueError
Boolean. Indicates whether the value can be formatted or not. True. The value cannot be formatted. False. The value can be formatted.
errorMessage
String. (Optional). The error message describing the formatting error.

formatDecimal

Formats exponential decimal values based on the operationType.

Input parameters
value
String. The field value to format.
operationType
String. Indicates the type of operation to apply to the input value.
writeValueToFormat
Formats any nonexponential numeric value to an exponential decimal format.
readAsFormattedValue
Formats any exponential decimal value into a non-exponential numeric value.
decimalChar
String. (Optional). The character that represents the decimal. The default decimal character is '.'
Output parameters
formattedValue
String. The field value with appropriate formatting applied.
isValueError
Boolean. Indicates whether the value can be formatted or not.
True
The value cannot be formatted.
False
The value can be formatted.
errorMessage
String. (Optional). The error message describing the formatting error.

formatNumber

Formats the given numeric value by adjusting the decimal character based on the operationType.

Input parameters
value
String. The numeric value to format.
operationType
String. Indicates the type of operation to apply to the input value.
writeValueToFormat
Formats the value by placing a decimalChar after the decimalCount number of characters.
readAsFormattedValue
Format the value by placing a decimalChar before the decimalCount number of characters.
decimalCount
String. Determines the number of decimals from the value that need to be formatted.
decimalChar
String. (Optional). The character that represents the decimal. The default decimal character is '.'
Output parameters
formattedValue
String. The field value with appropriate formatting applied.
isValueError
Boolean. Indicates whether the value can be formatted or not.
True
The value cannot be formatted.
False
The value can be formatted.
errorMessage
String. (Optional). The error message describing the formatting error.

formatTime

Formats the input value based on the specified input and output time format.

Input parameters
value
String. The field value to be formatted.
inputFormat
String. The date format that represents the input value follows the conventions described in the Java class java.text.SimpleDateFormat.
outputFormat
String. The date format that represents the output formattedvalue after conversion follows the conventions described in the Java class java.text.SimpleDateFormat.
pad
String. Indicates whether to pad the value with zeros, when the value is shorter than the inputFormat. The default option is true.
True
Pad with zeros.
False
Do not pad with zeros.
Output parameter
formattedValue
String. The field value after applying outputFormat.
isValueError
Boolean. Indicates whether the value can be formatted or not.
True
The value cannot be formatted.
False
The value can be formatted.
errorMessage
String. (Optional). The error message describing the formatting error.

generateFunctionalAcknowledgement

Creates a functional acknowledgment (FA) that acknowledges all levels of an input EDI document. This operation takes an EDI document as input, performs validation and compliance check, and creates an FA as output.

Note:
  • You must insert a value for either ediMessages or ediStream input parameter.
  • When you insert the values for both ediMessage and ediStream input parameters, the webMethods module for EDI considers ediMessage as input value.
  • When an empty space is set for an ediMessage, the field value is considered as unset and the value set for ediStream is considered as an input value.
Input parameters
ediMessage
String. (Optional). An unparsed EDI document for which you want to generate an FA. Specify a value for either ediMessage or ediDocument.
ediStream
Object. (Optional). An unparsed EDI document for which you want to generate an FA. Specify a value for either edistream or ediDocument.
ediDocument
Document. (Optional). A parsed EDI document (an IData object) for which you want to generate an FA. It includes the error results. This document is the output from the processEnvelope EDI operation. Specify a value for either ediMessage or ediDocument.
delimiters
Document. (Optional). Delimiters used in the outbound FA. If you do not specify delimiters, the operation uses the delimiters from the document it is acknowledging.
segment
String. The segment terminator for the FA, for example, +. The default is the ' character.
field
String. The field separator for each EDI segment for example, !. The default is the + character.
subfield
String. The separator for composite elements, for example, ^. The default is the : character.
release
String. Character used to ignore a record, field, or subfield delimiter in a field. If a release character occurs in a field or subfield before the delimiter, it is prefixed with this character in the output.
functionalAckRequest
String. (Optional). Indicates the manner to handle potentially conflicting information in the EDI interchange header of the inbound document. For ANSI X12, the inbound document specification is in ISA14. For UN/EDIFACT, the inbound document specification is in UNB09. Specify one of the following values:
yes
The FA is generated regardless of the FA specification in the input EDI interchange header.
no
If no and the input EDI interchange header specifies that an FA is not required, the FA is not generated.
dependOnInput
The FA is generated based on the FA specification in the input EDI interchange header.
functionalAckLevel
String. (Optional). The level at which to acknowledge. If any errors occur at the level you select, the FA lists those errors at the level selected. Specify one of the following values:
default
Acknowledge at the envelope level (group for ANSI X12 and interchange for UN/EDIFACT).
transactionSet
Acknowledge at the transaction set level (ANSI X12 only).
segment
Acknowledge at the segment level (ANSI X12 only).
element
Acknowledge at the element level (ANSI X12 only).
generateControlNumber
String. (Optional). Indicates how you want the operation to obtain the control number it uses in the interchange and group headers of the generated FA. Specify one of the following values:
fromInboundDocument
Use the control number from the corresponding header in the EDI document that is being acknowledged. For example, if generating an FA for a group in an ANSI X12 document, use the control number from the group header of that group for the control number of the FA.
random
The operation randomly generates a control number.
addGroup
String. (Optional). Indicates whether you want to add group segments to the ANSI X12 or UN/EDIFACT FA (for example, a 997 or a UN/EDIFACT CONTRL).
true
Add a group to the FA.
false
Do not add a group to the FA.
addInterchangeEnvelope
String. (Optional). Whether you want to add an interchange envelope to the FA.
true
Add an interchange to the FA. The default value is true. For ANSI X12, if you add an envelope, you automatically gets the group.
false
Do not add an interchange to the FA.
syntaxErrorStatus
String. (Optional). Indicates how you want the operation to report the syntax error status for a transaction, group or UN/EDIFACT interchange. The syntax error status indicates whether there are syntax errors. For example, missing mandatory elements, violation of syntax rules, invalid field lengths, code list violations or segment repeat counts exceeded.

The operation uses the syntax error status along with the logical error status and child transaction rejected status (if applicable) to determine the FA status for a transaction, group or UN/EDIFACT interchange.

Specify one of the following to indicate how you want the EDI operation to report syntax errors:

rejected
If you want to reject elements that have syntax errors, specify rejected.
accepted, but errors were noted
If you want to know whether there are syntax errors, but do not want to reject an element because of them, specify accepted, but errors were noted.
accepted
If you do not want to check for syntax errors, specify accepted, but errors were noted.
logicalErrorStatus
String. (Optional). Indicates how you want the operation to report the logical error status for a transaction, group or UN/EDIFACT interchange. The logical error status indicates whether there are logical errors, for example:
  • The control number in a header does not match the control number in the corresponding trailer, or
  • The segment count in a trailer does not have an accurate group, transaction or segment count.

The operation uses the logical error status along with the syntax error status and child transaction rejected status (if applicable) to determine the FA status for a transaction, group or UN/EDIFACT interchange. Specify one of the following to indicate how you want the operation to report logical errors:

rejected
If you want to reject elements that have logical errors, specify rejected.
accepted, but errors were noted
If you want to know whether there are logical errors, but do not want to reject an element because of them, specify accepted, but errors were noted.
accepted
If you do not want to check for logical errors, specify accepted.
childTransactionRejectedStatus
String. (Optional). Indicates how you want the operation to report the child transaction rejected status for a group or UN/EDIFACT interchange. The child transaction rejected status indicates whether child elements of a group or UN/EDIFACT interchange have an FA status of rejected. Specify one of the following values:
rejected
Reports the status of the childTransactionRejectedStatus as:
  • rejected if the FA status of any of the child transactions is rejected.
  • accepted, but errors were noted if the FA statuses of all child transactions are "accepted" and accepted, but errors were noted.
  • accepted if the FA statuses of all the child transactions are accepted.
partially accepted
Reports the childTransactionRejectedStatus as:
  • rejected if the FA statuses of all the child transactions are rejected.
  • partially accepted if the FA status of at least one child transaction is rejected, but the FA status of other child transactions are accepted or accepted, but errors were noted.
  • accepted if the FA statuses of all the child transactions are accepted.
accepted, but errors were noted
Reports the childTransactionRejectedStatus as:
  • accepted, but errors were noted if the FA status any child transaction is rejected or accepted, but errors were noted.
  • accepted if the FA statuses of all the child transactions are accepted.
documentType
String. (Optional). The substandard of the EDI standard. Use this parameter with ediDocuments. Valid values are EANCOM, UCS, UNEDIFACT, VICS, X12 and ODETTE.
encoding
String. (optional). The encoding of the data passed to the ediMessage parameter.Note: When the generateFunctionalAcknowledgement operation is invoked manually, the value of this parameter is passed to the ediMessage parameter in both the convertToString and the convertToValue operations, as well as the generateFunctionalAcknowledgement operation.
outputType
String. (Optional). The type of document output. The available options are string and stream. The default value is string.
additionalInfo
Document. (Optional, for use with ODETTE only) Additional information about the input message to be used in the outbound FA.
code
String. A qualification and identification of the purpose and function of a text segment. Maximum length: 3 characters.
text
String. Text. Maximum length: 70 characters.
messageIdentifier
Document. (Optional). Specifies details to include in the CONTRL message.
versionNumber
String. Specifies the following values in the output CONTRL message to determine the schema to use: UNH02/S00902 (second subfield in the second field), UNG07/S00801 (first subfield in the second field, if present)
releaseNumber
String. Specifies the following values in the output CONTRL message to determine the schema to use: UNH02/S00903, UNG07/S00802 (if present)
controllingAgency
String. Specifies the following values in the output CONTRL message: UNH02/S00904, UNG07/S00803 (if present)
associationCode
String. Specifies the following values in the output CONTRL message: UNH02/S00905, UNG07/S00804 (if present)
codeListDirectoryVersionNumber
String. (Optional). Specifies the following values in the output CONTRL message: UNH02/S00906
messageTypeSubFunctionIdentification
String. (Optional). Specifies the following values in the output CONTRL message:
  • UNH02/S00907
  • If no value is provided for VersionNumber, ReleaseNumber or ControllingAgency, these input fields takes the values from the input document.
  • versionNumber and releaseNumber determine the schema to use, as follows:
    • If you specify values for both fields, the schema used is EDIFFSchema.%s_standard%.V%MessageIdentifier/VersionNumber%%MessageIdentifier/ ReleaseNumber%:TCONTRL.
    • If you specify only the value of versionNumber, the schema used is EDIFFSchema.%s_standard%.V%MessageIdentifier/VersionNumber% :TCONTRL.
    • If you specify only the value of ReleaseNumber, the default schema is used, but the UNH02/S00903 field in the output CONTRL message is populated with the value of the releaseNumber field.
generateAnyway
String. (Optional). Specifies whether the generateFunctionalAcknowledgement operation should throw a com.wm.ff.parse.ParseException exception when a delimiter is missing at the envelope level of an EDIFACT message.
true
Generate a negative CONTRL message and do not throw an exception. Note: If you set this parameter to true, you must also assign the values for the CONTRL message header fields in UNH02.
false
Throw the exception com.wm.ff.parse. ParseException. The default option is false.
UNH02_messageIdentifier
Document. (Optional). Values to assign to the CONTRL message header fields if generateAnyway is set to true.
S00902_versionNumber
String. The version number of the CONTRL message. For example, to set the version number of the CONTRL message to "D," set the value of S00902_versionNumber to D.
S00903_releaseNumber
String. The release number of the CONTRL message. For example, to set the release number of the CONTRL message to "96A," set the value of S00903_releaseNumber to 96A.
S00904_controllingAgency
String. (Optional). The controlling agency of the CONTRL message. For example, to set the version number of the CONTRL message to "UN," set the value of S00904_controllingAgency to UN.
S00905_associationCode
String. (optional). The association assigned code, 1 to 6 characters in length, for the CONTRL message.
Output parameters
Note: UN/EDIFACT and ODETTE CONTRLs both use the version 4 UN/EDIFACT CONTRL error codes.
functionalAcknowledgement
String List. (Optional). The outbound functional acknowledgment. If the input parameter outputType is set to a string, the value of functionalAcknowledgement populates.
functionalAcknowledgementStream
Object. (Optional). When the outputType input parameter is set to stream, the value appears for the parameter ediMessageStream. If the EDI message is less than 1 MB, the value of ediMessageStream is java.io.ByteArrayInputStream. If the EDI message is greater than 1 MB, the value ediMessageStream is com.wm.ff.util.AutoCloseReservationInputStream.
summaryDocument
Document List. Summary of information about the interchanges, groups and transactions from the input EDI document.

getDelimiter

Returns the first delimiter character found in the input characterString.

Input parameters
characterString
String. Input a string from which the first delimiter is identified. The input string can represent any of the following values:
  • A character (for example, normal characters - '!' or any special characters - '\r\n').
  • Hexadecimal value (for example, 0X09).
  • Octal value (for example, 009).
  • Unicode characters (for example, \uXXXX, where XXXX represents the Unicode value of the character).
Output parameters
charOut
String. The delimiter character found in the input characterString. Returns null. when the input characterString is invalid.

getEDIString

Creates a complete EDI transaction set (either string or InputStream type) from an EDI transaction set header segment.

Input parameters
Values
Document. The single EDI transaction set within a single interchange and a single functional group. This input object is part of the output of the processEnvelope operation.
Output parameters
EDIstring
Object. A single EDI transaction set in string or InputStream type.

getFirstKey

Returns the name of the first key present in the input document Doc.

Input parameters
Doc
Document. Input a document from which the name of the first key is determined.
Output parameters
firstKey
String. Name of the first key found in the Doc.

nullifyIfBlank

Returns null or blank based on the blankOrNull value when the input is null or contains only blank spaces.

Input parameters
input
String. Input data.
blankOrNull
String. (Optional). Indicates whether to return blank or null when the input string is null or contains only blank spaces. The default value is null.
blank
Returns blank if the input is null or contains only blank spaces.
null
Returns null if the input is null or contains only blank spaces.
Output parameters
output
String. Same data as input or null or blank based on the blankOrNull value.

processEnvelope

Accepts and processes the envelope of an ANSI X12/UN/EDIFACT/UCS/VICS/EANCOM EDI or TRADACOMS message and converts the envelope header segments to a document. When creating an orchestration with processEnvelope, you must select the appropriate document type. Selecting an appropriate type helps ensue the structure of an ediDocument to appear in the pipeline data when you map with another ediDocument during orchestration.

Note:
  • You must insert a value for either ediMessages or ediStream input parameter.
  • When you insert the values for both ediMessage and ediStream input parameters, the webMethods module for EDI considers ediMessage as the input value.
  • When an empty space is set for an ediMessage, the field value is considered as unset and the value set for ediStream is considered as an input value.
Input parameters
ediMessage
String. (Optional). Process the input EDI message. Input must not have manual line breaks.
ediStream
Object. (Optional). Process the input EDI stream. Input must not have manual line breaks.
validate
String. (Optional). Whether to validate the envelopes against a predefined flat file schema.
true
Validate the envelopes against a predefined flat file schema.
false
Does not validate the envelope.
complianceCheck
String. (Optional). Performs a compliance check against the interchange. Note: This parameter is not applicable to TRADACOMS messages.
true
Perform a compliance check. The parameter stops executing after encountering the first error. The default value is true.
false
Does not perform the compliance check.
iterate
Boolean. (Optional). Indicates whether the transactions are present for the iteration. Enable this parameter to iterate the multiple envelopes of an EDI document.
ediObject
Object. (Optional).ediObject is used for an internal purpose when iterate is set to true. The input parameter ediObject is auto mapped to the output parameter ediObject.
Output parameters
ediEnvelopeDocument
Document. Resulting EDI envelope document.
standard
String. The standard to which the EDI document adheres. For example, X12 or UNEDIFACT.
ediObject
Object. (Optional). ediObject is used for an internal purpose when the input parameter iterate is set to true. You should not delete this parameter from the pipeline. The input parameter ediObject is auto mapped to the output parameter ediObject
hasMore
String. (Optional). Indicates the EDI message remaining to iterate. When you enable the input parameter iterate, and there is an additional message to iterate, the value for hasMore is true; otherwise,; it is false.
hasError
String. Whether the validation or compliance check resulted in error.
false
If the validate is true, validation errors are retrieved from errorArray. Otherwise, it indicates errors from the compliance check.
true
No errors.
errors[]
Document List. (Optional). Validation errors, if any, that were found in the edimessage. Validation errors are returned in errors only if validate is set to true -AND- returnErrors is set to asArray or both. The list includes the path of the errors.
hasUndefData
String. (Optional). It is always set to true to process the data from the payload, it automatically maps when used with the convertDocumentToMessageoperation.
statusCode
String. Status code based on success or failure.
statusMessage
String. Status message after executing the operation.