Module for EDI 9.12 | Building Services with EDI Module | Part I WmEDI Package | WmEDI Util Folder | Summary of Elements in this Folder | wm.b2b.edi.util:generateFA
 
wm.b2b.edi.util:generateFA
WmEDI. Creates a functional acknowledgment (FA) that acknowledges all levels of an input EDI document.
This service takes an EDI document as input, performs validation and compliance check, and creates an FA as output.
Input Parameters
edidata
String or InputStream (optional) An unparsed EDI document for which you want to generate an FA. Specify a value for either edidata or ICValues.
ICValues
Document (optional) A parsed EDI document (an IData object) for which you want to generate an FA. This must include the error results. This is typically the output from the wm.b2b.edi:envelopeProcess service. Specify a value for either edidata or ICValues.
EDI_delimiters
Document (optional) Delimiters used in the outbound FA. If you do not specify EDI_delimiters, the service uses the delimiters from the document it is acknowledging.
Key
Description
record
String The segment terminator for the FA, e.g., +. The default is the ' character.
field
String The field separator for each EDI segment e.g., !. The default is the + character.
subfield
String The separator for composite elements, e.g., ^. 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 will be prefixed with this character in the output.
FArequest
String How 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:
Value
Meaning
yes
The FA is generated regardless of 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.
depend_on_input
The FA is generated based on the FA specification in the input EDI interchange header.
FALevel
String The level at which to acknowledge. If any errors occur at the level you select, the FA will list those errors at the level selected. Specify one of the following:
Value
Meaning
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 How you want the service to obtain the control number it uses in the interchange and group headers of the generated FA. Specify one of the following:
Value
Meaning
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 service randomly generates a control number.
FromControlNumberTable
Obtain the next control number from the EDIControlNumber table, and then increment the value of the next control number in the table entry, so it reflects the new next control number.
addGroups
String Whether you want to add group segments to the ANSI X12 or UN/EDIFACT FA (e.g., a 997 or a UN/EDIFACT CONTRL).
Value
Meaning
true
Add a group to the FA.
false
Do not add a group to the FA.
addICEnvelopes
String Whether you want to add an interchange envelope to the FA.
Value
Meaning
true
Add an interchange to the FA. This is the default. For ANSI 12, if you add an envelope, you will automatically get the group.
false
Do not add an interchange to the FA.
syntaxErrorStatus
String How you want the service 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 service 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 service to report syntax errors:
Value
Meaning
Rejected
The syntax error status is reported as "Rejected" if syntax errors are encountered. Specify Rejected if you want to reject elements that have syntax errors.
Accepted, But Errors Were Noted
The syntax error status is reported as "Accepted, But Errors Were Noted" if syntax errors are encountered. Specify 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.
Accepted
The syntax error status is always reported as "Accepted" regardless of any syntax errors that might be encountered. Specify Accepted if you do not want to check for syntax errors.
logicalErrorStatus
String How you want the service 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 service 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 service to report logical errors:
Value
Meaning
Rejected
The logical error status is reported as "Rejected" if logical errors are encountered. Specify Rejected if you want to reject elements that have logical errors.
Accepted, But Errors Were Noted
The logical error status is reported as "Accepted, But Errors Were Noted" if logical errors are encountered. Specify 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.
Accepted
The logical error status is always reported as "Accepted" regardless of any logical errors that might be encountered. Specify Accepted if you do not want to check for logical errors.
childTransactionRejectedStatus
String How you want the service 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:
Value
Meaning
Rejected
Reports the child transaction rejected status 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 child transaction rejected status as:
*"Rejected" if the FA statuses of all of 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 child transaction rejected status 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".
standardVC
String (optional) The substandard of the EDI standard. Use this parameter in conjunction with ICValues. Valid values are EANCOM, UCS, UNEDIFACT, VICS, X12, and ODETTE.
encoding
String (optional) The encoding of the data passed to the edidata parameter.
Note:
When the generateFA service is invoked manually, the value of this parameter is passed to the edidata parameter in both the convertToString and the convertToValue services, as well as the generateFA service.
ctlNumberWleadingZero
String (optional for ANSI X12) Whether to add leading zeros to the interchange control numbers to make them nine-digit numbers.
Note:
This parameter is applicable only when the value of generateControlNumber is FromControlNumberTable.
Value
Meaning
true
Do not add leading zeros to the control number. This is the default.
false
Add leading zeros to the control number to make it a nine digit number, e.g., 12 becomes 000000012.
userFFSchema
String (optional) A flat file schema that overrides the predefined flat file schema that wm.b2b.edi:convertToValues uses.
Additional_Info
Document (optional; for use with ODETTE only) Additional information about the input message, to be used in the outbound FA.
Value
Meaning
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 Specifies details to include in the CONTRL message.
Value
Meaning
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 Specifies the following values in the output CONTRL message:
*UNH02/S00906
MessageTypeSubFunctionIdentification
String Specifies the following values in the output CONTRL message:
*UNH02/S00907
*If no value is provided for VersionNumber, ReleaseNumber, or ControllingAgency, these input fields will take 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 will be EDIFFSchema.%s_standard%.V%MessageIdentifier/VersionNumber%%MessageIdentifier/ ReleaseNumber%:TCONTRL.
*If you specify only the value of VersionNumber, the schema used will be EDIFFSchema.%s_standard%.V%MessageIdentifier/VersionNumber% :TCONTRL.
*If you specify only the value of ReleaseNumber, the default schema will be used, but the UNH02/S00903 field in the output CONTRL message will be populated with the value of the ReleaseNumber field.
generateAnyway
String Specifies whether the generateFA service should throw a com.wm.ff.parse.ParseException exception when a delimiter is missing at the envelope level of an EDIFACT message.
Value
Meaning
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. This is the default.
UNH02
Document Values to assign to the CONTRL message header fields if generateAnyway is set to true.
Key
Description
S00902
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 to D.
S00903
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 to 96A.
S00904
String 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 to UN.
S00905
String (optional) The association assigned code, 1 to 6 characters in length, for the CONTRL message.
userFFSchemaForEnvelope
String Specifies the fully qualified name of a flat file schema to be used for validating the envelope. If you do not provide a value for this parameter, generateFA will use the default schema.
Output Parameters
outDocument
String List The outbound FA.
Note:
UN/EDIFACT and ODETTE CONTRLs both use the version 4 UN/EDIFACT CONTRL error codes.
Envelope
Document List Summary of information about the interchanges, groups, and transactions from the input EDI document.
Important:
This output parameter is for Module for EDI, internal use only. Do not code services that rely on the content and format of Envelope because it can change between releases of the Module for EDI.
Usage Notes
*The service does not specify what to do with the acknowledgment that it has created.
*This service can acknowledge all levels of an EDI document.
*To customize the schema to be used for validating the envelope, you can copy the wm.b2b.edi.EDIFFSchema:ICS4UNEDIFACTDEF_large schema and modify the copied schema. Be aware of the following limitations:
*Do not move the top level records in this document (UNB, UNG, UNH, UNT, UNE, UNZ, UNA).
*You can modify the contents of the records, but all records must be present and remain as children of the root node in this schema so that the schema works properly with the wm.b2b.edi.util:generateFA service.
*The Ordered parameter of the root node in the ffSchema must remain set to false.
* You can use the EDIResolveDuplicates property to control how the Module for EDI assigns FA status when you send (or receive) a document multiple times before the receiver returns an FA. For details, see the chapter on reconciling functional acknowledgments in webMethods Module for EDI Installation and User’s Guide.